Go to the documentation of this file.
17 #ifndef _GAZEBO_JOINTCONTROLLER_HH_
18 #define _GAZEBO_JOINTCONTROLLER_HH_
23 #include <ignition/msgs.hh>
37 class JointControllerPrivate;
70 const std::string &_name,
double _position,
int _index = 0);
75 const std::map<std::string, double> &_jointPositions);
84 public: std::map<std::string, JointPtr>
GetJoints()
const;
97 const double _target);
110 const double _target);
117 public:
bool SetForce(
const std::string &_jointName,
const double _force);
132 public: std::map<std::string, double>
GetForces()
const;
151 private:
bool OnJointCmdReq(
const ignition::msgs::StringMsg &_req,
152 ignition::msgs::JointCmd &_rep);
156 private:
void OnJointCommand(
const ignition::msgs::JointCmd &_msg);
176 JointPtr _joint,
double _position,
int _index = 0);
179 private: JointControllerPrivate *dataPtr;
std::map< std::string, common::PID > GetPositionPIDs() const
Get all the position PID controllers.
Forward declarations for the common classes.
Definition: Animation.hh:27
std::map< std::string, double > GetPositions() const
Get all the position PID set points.
A Time class, can be used to hold wall- or sim-time. stored as sec and nano-sec.
Definition: Time.hh:48
boost::shared_ptr< Model > ModelPtr
Definition: PhysicsTypes.hh:93
Forward declarations for transport.
void Update()
Update the joint control.
void SetJointPosition(JointPtr _joint, double _position, int _index=0)
Set the positions of a Joint by name The position is specified in native units, which means,...
void SetJointPositions(const std::map< std::string, double > &_jointPositions)
Set the positions of a set of Joint's.
default namespace for gazebo
void Reset()
Reset all commands.
std::map< std::string, common::PID > GetVelocityPIDs() const
Get all the velocity PID controllers.
Base class for all joints.
Definition: Joint.hh:51
std::map< std::string, JointPtr > GetJoints() const
Get all the joints.
void SetPositionPID(const std::string &_jointName, const common::PID &_pid)
Set the position PID values for a joint.
bool SetVelocityTarget(const std::string &_jointName, const double _target)
Set the target velocity for the velocity PID controller.
bool SetForce(const std::string &_jointName, const double _force)
Set the applied effort for the specified joint.
std::map< std::string, double > GetVelocities() const
Get all the velocity PID set points.
Generic PID controller class. Generic proportiolnal-integral-derivative controller class that keeps t...
Definition: PID.hh:37
void AddJoint(JointPtr _joint)
Add a joint to control.
boost::shared_ptr< Joint > JointPtr
Definition: PhysicsTypes.hh:117
void RemoveJoint(Joint *_joint)
Remove a joint from control.
common::Time GetLastUpdateTime() const
Get the last time the controller was updated.
A class for manipulating physics::Joint.
Definition: JointController.hh:45
virtual ~JointController()
Destructor.
void SetVelocityPID(const std::string &_jointName, const common::PID &_pid)
Set the velocity PID values for a joint.
JointController(ModelPtr _model)
Constructor.
std::map< std::string, double > GetForces() const
Get all the applied forces.
void SetJointPosition(const std::string &_name, double _position, int _index=0)
Set the positions of a Joint by name.
bool SetPositionTarget(const std::string &_jointName, const double _target)
Set the target position for the position PID controller.