|
XBotInterface
2.4.1
XBotInterface provides a generic API to model and control a robot.
|
Container for the Joint state and information. More...
#include <Joint.h>
Collaboration diagram for XBot::Joint:Public Types | |
| typedef std::shared_ptr< Joint > | Ptr |
| typedef std::shared_ptr< const Joint > | ConstPtr |
Public Member Functions | |
| Joint () | |
| Default constructor. More... | |
| Joint (const std::string &joint_name, int joint_id, urdf::JointConstSharedPtr urdf_joint, const std::string &chain_name) | |
| Construct using the joint name, joint id, urdf joint and chain name. More... | |
| const std::string & | getJointName () const |
| Getter for the joint name. More... | |
| int | getJointId () const |
| Getter for the joint id. More... | |
| const std::string & | getChainName () const |
| Getter for the parent chain name. More... | |
| void | getJointLimits (double &qmin, double &qmax) const |
| Getter for the joint position limits in the urdf. More... | |
| void | getVelocityLimit (double &qdot_max) const |
| Getter for the joint velocity limit in the urdf. More... | |
| void | getEffortLimit (double &tau_max) const |
| Getter for the joint effort limit in the urdf. More... | |
| bool | checkJointLimits (double q) const |
| check that the param q is inside the position limits More... | |
| bool | checkVelocityLimit (double qdot) const |
| check that the param qdot is below the joint velocity limit More... | |
| bool | checkEffortLimit (double tau) const |
| check that the param tau is below the joint effort limit More... | |
| void | enforceJointLimits (double &q) const |
| void | enforceVelocityLimit (double &qdot) const |
| void | enforceEffortLimit (double &tau) const |
| urdf::JointConstSharedPtr | getUrdfJoint () const |
| Getter for the urdf Joint object. More... | |
| void | print () const |
| Prints a pretty table about joint state. More... | |
| void | printTracking () const |
| Prints a pretty table about joint tracking error. More... | |
| bool | isFixedControlledJoint () const |
| return true if the joint is specified fixed in the model, but inside the controlled_joints group of the SRDF e.g. More... | |
| void | setJointPosition (double link_pos) |
| Setter for the link side encoder reading. More... | |
| void | setMotorPosition (double motor_pos) |
| setter for the motor side encoder reading More... | |
| void | setJointVelocity (double link_vel) |
| setter for the link side velocity More... | |
| void | setMotorVelocity (double motor_vel) |
| setter for the motor side velocity More... | |
| void | setJointAcceleration (double link_acc) |
| setter for the link side acceleration More... | |
| void | setJointEffort (double effort) |
| setter for the joint effort (generalized force) More... | |
| void | setTemperature (double temperature) |
| setter for the joint temperature More... | |
| double | getJointPosition () const |
| getter for the link side encoder reading More... | |
| double | getMotorPosition () const |
| getter for the motor side encoder reading More... | |
| double | getJointVelocity () const |
| getter for the link side velocity More... | |
| double | getMotorVelocity () const |
| getter for the motor side velocity More... | |
| double | getJointAcceleration () const |
| getter for the link side acceleration More... | |
| double | getJointEffort () const |
| getter for the joint effort (generalized force) More... | |
| double | getTemperature () const |
| getter for the joint temperature More... | |
| void | setPositionReference (double pos_ref) |
| setter for the motor position reference More... | |
| void | setVelocityReference (double vel_ref) |
| setter for the velocity reference More... | |
| void | setEffortReference (double effort_ref) |
| setter for the effort (generalized force) reference More... | |
| void | setStiffness (double stiffness) |
| set the joint stiffness More... | |
| void | setDamping (double damping) |
| set the joint damping More... | |
| double | getPositionReference () const |
| getter for the commanded motor position reference More... | |
| double | getVelocityReference () const |
| getter for the commanded velocity reference More... | |
| double | getEffortReference () const |
| getter for the commanded effort (generalized force) reference More... | |
| double | getStiffness () const |
| get the commanded joint stiffness More... | |
| double | getDamping () const |
| get the commanded joint damping More... | |
| void | setControlMode (const ControlMode &control_mode) |
| void | getControlMode (ControlMode &control_mode) const |
Protected Member Functions | |
| void | setJointName (const std::string &joint_name) |
| Setter for the joint name. More... | |
| void | setJointId (int joint_id) |
| Setter for the joint id. More... | |
| template<typename... SyncFlags> | |
| bool | syncFrom (const Joint &other, SyncFlags... flags) |
| Synchronize the current Joint with another Joint object. More... | |
| template<typename... SyncFlags> | |
| bool | setReferenceFrom (const Joint &other, SyncFlags... flags) |
| Set the joint references (TX) from other joint state (RX) More... | |
| const XBot::Joint & | operator<< (const XBot::Joint &from) |
| operator << to synchronize the current Joint with another Joint object More... | |
| bool | isVirtualJoint () const |
| return true if the joint is virtual More... | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const XBot::Joint &j) |
| ostream operator << for a Joint object More... | |
Container for the Joint state and information.
| typedef std::shared_ptr<const Joint> XBot::Joint::ConstPtr |
| typedef std::shared_ptr<Joint> XBot::Joint::Ptr |
| XBot::Joint::Joint | ( | ) |
Default constructor.
| XBot::Joint::Joint | ( | const std::string & | joint_name, |
| int | joint_id, | ||
| urdf::JointConstSharedPtr | urdf_joint, | ||
| const std::string & | chain_name | ||
| ) |
Construct using the joint name, joint id, urdf joint and chain name.
| joint_name | the joint name |
| joint_id | the joint id |
| urdf_joint | shared pointer to urdf::Joint struct |
| joint_name | the parent chain name |
| bool XBot::Joint::checkEffortLimit | ( | double | tau | ) | const |
check that the param tau is below the joint effort limit
| tau | the effort to check |
| bool XBot::Joint::checkJointLimits | ( | double | q | ) | const |
check that the param q is inside the position limits
| q | the position to check |
| bool XBot::Joint::checkVelocityLimit | ( | double | qdot | ) | const |
check that the param qdot is below the joint velocity limit
| qdot | the velocity to check |
| void XBot::Joint::enforceEffortLimit | ( | double & | tau | ) | const |
| void XBot::Joint::enforceJointLimits | ( | double & | q | ) | const |
| void XBot::Joint::enforceVelocityLimit | ( | double & | qdot | ) | const |
| const std::string & XBot::Joint::getChainName | ( | ) | const |
Getter for the parent chain name.
| void XBot::Joint::getControlMode | ( | XBot::ControlMode & | control_mode | ) | const |
| double XBot::Joint::getDamping | ( | ) | const |
get the commanded joint damping
| void XBot::Joint::getEffortLimit | ( | double & | tau_max | ) | const |
Getter for the joint effort limit in the urdf.
| tau_max | joint effort limit |
| double XBot::Joint::getEffortReference | ( | ) | const |
getter for the commanded effort (generalized force) reference
| double XBot::Joint::getJointAcceleration | ( | ) | const |
getter for the link side acceleration
| double XBot::Joint::getJointEffort | ( | ) | const |
getter for the joint effort (generalized force)
| int XBot::Joint::getJointId | ( | ) | const |
Getter for the joint id.
| void XBot::Joint::getJointLimits | ( | double & | qmin, |
| double & | qmax | ||
| ) | const |
Getter for the joint position limits in the urdf.
| qmin | lower position limit of the joint |
| qmax | upper position limit of the joint |
| const std::string & XBot::Joint::getJointName | ( | ) | const |
Getter for the joint name.
| double XBot::Joint::getJointPosition | ( | ) | const |
getter for the link side encoder reading
| double XBot::Joint::getJointVelocity | ( | ) | const |
getter for the link side velocity
| double XBot::Joint::getMotorPosition | ( | ) | const |
getter for the motor side encoder reading
| double XBot::Joint::getMotorVelocity | ( | ) | const |
getter for the motor side velocity
| double XBot::Joint::getPositionReference | ( | ) | const |
getter for the commanded motor position reference
| double XBot::Joint::getStiffness | ( | ) | const |
get the commanded joint stiffness
| double XBot::Joint::getTemperature | ( | ) | const |
getter for the joint temperature
| urdf::JointConstSharedPtr XBot::Joint::getUrdfJoint | ( | ) | const |
| void XBot::Joint::getVelocityLimit | ( | double & | qdot_max | ) | const |
Getter for the joint velocity limit in the urdf.
| qdot_max | joint velocity limit |
| double XBot::Joint::getVelocityReference | ( | ) | const |
getter for the commanded velocity reference
| bool XBot::Joint::isFixedControlledJoint | ( | ) | const |
return true if the joint is specified fixed in the model, but inside the controlled_joints group of the SRDF e.g.
Hands
|
protected |
return true if the joint is virtual
|
protected |
operator << to synchronize the current Joint with another Joint object
| from | the Joint object from which we synchronize the current object |
| void XBot::Joint::print | ( | ) | const |
Prints a pretty table about joint state.
| void XBot::Joint::printTracking | ( | ) | const |
Prints a pretty table about joint tracking error.
| void XBot::Joint::setControlMode | ( | const ControlMode & | control_mode | ) |
| void XBot::Joint::setDamping | ( | double | damping | ) |
set the joint damping
| damping | the joint damping to set |
| void XBot::Joint::setEffortReference | ( | double | effort_ref | ) |
setter for the effort (generalized force) reference
| effort_ref | the effort (generalized force) reference to set |
| void XBot::Joint::setJointAcceleration | ( | double | link_acc | ) |
setter for the link side acceleration
| link_acc | the link side velocity to set |
| void XBot::Joint::setJointEffort | ( | double | effort | ) |
setter for the joint effort (generalized force)
| effort | the joint effort (generalized force) to set |
|
protected |
Setter for the joint id.
| joint_id | the joint id to set |
|
protected |
Setter for the joint name.
| joint_name | the joint name to set |
| void XBot::Joint::setJointPosition | ( | double | link_pos | ) |
Setter for the link side encoder reading.
| link_pos | the link side encoder reading to set |
| void XBot::Joint::setJointVelocity | ( | double | link_vel | ) |
setter for the link side velocity
| link_vel | the link side velocity to set |
| void XBot::Joint::setMotorPosition | ( | double | motor_pos | ) |
setter for the motor side encoder reading
| motor_pos | the motor side encoder reading to set |
| void XBot::Joint::setMotorVelocity | ( | double | motor_vel | ) |
setter for the motor side velocity
| motor_vel | the motor side velocity to set |
| void XBot::Joint::setPositionReference | ( | double | pos_ref | ) |
setter for the motor position reference
| pos_ref | the motor position reference to set |
|
protected |
Set the joint references (TX) from other joint state (RX)
| other | The Joint object which references are read from |
| flags | Flags to specify what part of the state must be synchronized. By default (i.e. if this argument is omitted) the whole state is synchronized. Otherwise, an arbitrary number of flags can be specified in order to select a subset of the state. The flags must be of the enum type XBot::Sync, which can take the following values: |
| void XBot::Joint::setStiffness | ( | double | stiffness | ) |
set the joint stiffness
| stiffness | the joint stiffness to set |
| void XBot::Joint::setTemperature | ( | double | temperature | ) |
setter for the joint temperature
| temperature | the joint temperature |
| void XBot::Joint::setVelocityReference | ( | double | vel_ref | ) |
setter for the velocity reference
| vel_ref | the velocity reference to set |
|
protected |
Synchronize the current Joint with another Joint object.
| other | The Joint object from which we synchronize the current object |
| flags | Flags to specify what part of the state must be synchronized. By default (i.e. if this argument is omitted) the whole state is synchronized. Otherwise, an arbitrary number of flags can be specified in order to select a subset of the state. The flags must be of the enum type XBot::Sync, which can take the following values: |
|
friend |
1.8.17