|
XBotInterface
2.4.1
XBotInterface provides a generic API to model and control a robot.
|
#include <RobotInterface.h>
Inheritance diagram for XBot::RobotInterface:
Collaboration diagram for XBot::RobotInterface:Public Types | |
| typedef std::shared_ptr< RobotInterface > | Ptr |
| typedef std::shared_ptr< const RobotInterface > | ConstPtr |
Public Types inherited from XBot::XBotInterface | |
| typedef std::shared_ptr< XBotInterface > | Ptr |
| typedef std::shared_ptr< const XBotInterface > | ConstPtr |
Public Member Functions | |
| RobotInterface () | |
| Default constructor. More... | |
| virtual | ~RobotInterface ()=default |
| ModelInterface & | model () |
| Getter for the internal model instance. More... | |
| RobotInterface & | operator= (const RobotInterface &other)=delete |
| RobotInterface (const RobotInterface &other)=delete | |
| virtual double | getTime () const =0 |
| Getter for the time in the robot framework. More... | |
| virtual bool | isRunning () const =0 |
| ... More... | |
| bool | sense (bool sync_model=true, bool sync_references=false) |
| Reads the current state of the robot calling sense_internal() and read_sensors() implemented by the derived class. More... | |
| bool | move () |
| Moves the robot calling the move_internal() implemented by the derived class. More... | |
| RobotChain & | operator() (const std::string &chain_name) |
| Getter for the robot chain with a certain chain_name. More... | |
| const RobotChain & | operator() (const std::string &chain_name) const |
| RobotChain & | chain (const std::string &chain_name) |
| Getter for the robot chain with a certain chain_name. More... | |
| const RobotChain & | chain (const std::string &chain_name) const |
| RobotChain & | arm (int arm_id) |
| Getter for the standard kinematic group arm: you can quickly access the i-th arm in the order specified in the SRDF. More... | |
| const RobotChain & | arm (int arm_id) const |
| RobotChain & | leg (int leg_id) |
| Getter for the standard kinematic group leg: you can quickly access the i-th leg in the order specified in the SRDF. More... | |
| const RobotChain & | leg (int leg_id) const |
| template<typename... SyncFlags> | |
| bool | setReferenceFrom (const ModelInterface &model, SyncFlags... flags) |
| Sets the robot references according to a ModelInterface. More... | |
| bool | setControlMode (const ControlMode &control_mode) |
| virtual bool | setControlMode (const std::string &chain_name, const ControlMode &control_mode) |
| bool | setControlMode (const std::map< std::string, ControlMode > &control_mode) |
| bool | setControlMode (const std::map< int, ControlMode > &control_mode) |
| void | getControlMode (std::map< std::string, ControlMode > &control_mode) const |
| void | getControlMode (std::map< int, ControlMode > &control_mode) const |
| double | getTimestampRx () const |
| Get the RX timestamp: it corresponds to the last call to sense() More... | |
| double | getTimestampTx () const |
| Get the TX timestamp: it corresponds to the last call to move() More... | |
| bool | getJointPosition (Eigen::VectorXd &q) const |
| Gets the robot joint positions as an Eigen vector. More... | |
| bool | getJointPosition (JointIdMap &q) const |
| Gets the robot joint positions as a JointIdMap, i.e. More... | |
| bool | getJointPosition (JointNameMap &q) const |
| Gets the robot joint postions as a JointNameMap, i.e. More... | |
| bool | getMotorPosition (Eigen::VectorXd &q) const |
| Gets the robot motor positions as an Eigen vector. More... | |
| bool | getMotorPosition (JointIdMap &q) const |
| Gets the robot motor positions as a JointIdMap, i.e. More... | |
| bool | getMotorPosition (JointNameMap &q) const |
| Gets the robot motor postions as a JointNameMap, i.e. More... | |
| bool | getJointVelocity (Eigen::VectorXd &qdot) const |
| Gets the robot joint velocities as an Eigen vector. More... | |
| bool | getJointVelocity (JointIdMap &qdot) const |
| Gets the robot joint velocities as a JointIdMap, i.e. More... | |
| bool | getJointVelocity (JointNameMap &qdot) const |
| Gets the robot joint velocities as a JointNameMap, i.e. More... | |
| bool | getMotorVelocity (Eigen::VectorXd &qdot) const |
| Gets the robot motor velocities as an Eigen vector. More... | |
| bool | getMotorVelocity (JointIdMap &qdot) const |
| Gets the robot motor velocities as a JointIdMap, i.e. More... | |
| bool | getMotorVelocity (JointNameMap &qdot) const |
| Gets the robot motor velocities as a JointNameMap, i.e. More... | |
| bool | getJointEffort (Eigen::VectorXd &tau) const |
| Gets the robot joint efforts as an Eigen vector. More... | |
| bool | getJointEffort (JointIdMap &tau) const |
| Gets the robot joint efforts as a JointIdMap, i.e. More... | |
| bool | getJointEffort (JointNameMap &tau) const |
| Gets the robot joint efforts as a JointNameMap, i.e. More... | |
| bool | getTemperature (Eigen::VectorXd &temp) const |
| Gets the robot joint temperatures as an Eigen vector. More... | |
| bool | getTemperature (JointIdMap &temp) const |
| Gets the robot joint temperatures as a JointIdMap, i.e. More... | |
| bool | getTemperature (JointNameMap &temp) const |
| Gets the robot joint temperatures as a JointNameMap, i.e. More... | |
| bool | getPositionReference (Eigen::VectorXd &q) const |
| Gets the robot position references as an Eigen vector. More... | |
| bool | getPositionReference (JointIdMap &q) const |
| Gets the robot position references as a JointIdMap, i.e. More... | |
| bool | getPositionReference (JointNameMap &q) const |
| Gets the robot postion references as a JointNameMap, i.e. More... | |
| bool | getVelocityReference (Eigen::VectorXd &qdot) const |
| Gets the robot velocity references as an Eigen vector. More... | |
| bool | getVelocityReference (JointIdMap &qdot) const |
| Gets the robot velocity references as a JointIdMap, i.e. More... | |
| bool | getVelocityReference (JointNameMap &qdot) const |
| Gets the robot velocity references as a JointNameMap, i.e. More... | |
| bool | getEffortReference (Eigen::VectorXd &tau) const |
| Gets the robot effort references as an Eigen vector. More... | |
| bool | getEffortReference (JointIdMap &tau) const |
| Gets the robot effort references as a JointIdMap, i.e. More... | |
| bool | getEffortReference (JointNameMap &tau) const |
| Gets the robot effort references as a JointNameMap, i.e. More... | |
| bool | getStiffness (Eigen::VectorXd &K) const |
| Gets the robot stiffness as an Eigen vector. More... | |
| bool | getStiffness (JointIdMap &K) const |
| Gets the robot stiffness as a JointIdMap, i.e. More... | |
| bool | getStiffness (JointNameMap &K) const |
| Gets the robot stiffness as a JointNameMap, i.e. More... | |
| bool | getDamping (Eigen::VectorXd &D) const |
| Gets the robot damping as an Eigen vector. More... | |
| bool | getDamping (JointIdMap &D) const |
| Gets the robot damping as a JointIdMap, i.e. More... | |
| bool | getDamping (JointNameMap &D) const |
| Gets the robot damping as a JointNameMap, i.e. More... | |
| bool | setPositionReference (const Eigen::VectorXd &q) |
| Sets the XBotInterface internal joint position references according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods. More... | |
| bool | setPositionReference (const JointIdMap &q) |
| Sets the XBotInterface internal joint position references according to the input JointIdMap (i.e. More... | |
| bool | setPositionReference (const JointNameMap &q) |
| Sets the XBotInterface internal joint position references according to the input JointNameMap (i.e. More... | |
| bool | setVelocityReference (const Eigen::VectorXd &qdot) |
| Sets the XBotInterface internal joint velocity references according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods. More... | |
| bool | setVelocityReference (const JointIdMap &qdot) |
| Sets the XBotInterface internal joint velocity references according to the input JointIdMap (i.e. More... | |
| bool | setVelocityReference (const JointNameMap &qdot) |
| Sets the XBotInterface internal joint velocity references according to the input JointNameMap (i.e. More... | |
| bool | setEffortReference (const Eigen::VectorXd &tau) |
| Sets the XBotInterface internal joint effort references according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods. More... | |
| bool | setEffortReference (const JointIdMap &tau) |
| Sets the XBotInterface internal joint effort references according to the input JointIdMap (i.e. More... | |
| bool | setEffortReference (const JointNameMap &tau) |
| Sets the XBotInterface internal joint effort references according to the input JointNameMap (i.e. More... | |
| bool | setStiffness (const Eigen::VectorXd &K) |
| Sets the XBotInterface internal joint stiffness according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods. More... | |
| bool | setStiffness (const JointIdMap &K) |
| Sets the XBotInterface internal joint stiffness according to the input JointIdMap (i.e. More... | |
| bool | setStiffness (const JointNameMap &K) |
| Sets the XBotInterface internal joint stiffness according to the input JointNameMap (i.e. More... | |
| bool | setDamping (const Eigen::VectorXd &D) |
| Sets the XBotInterface internal joint damping according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods. More... | |
| bool | setDamping (const JointIdMap &D) |
| Sets the XBotInterface internal joint damping according to the input JointIdMap (i.e. More... | |
| bool | setDamping (const JointNameMap &D) |
| Sets the XBotInterface internal joint damping according to the input JointNameMap (i.e. More... | |
Public Member Functions inherited from XBot::XBotInterface | |
| XBotInterface () | |
| XBotInterface (const XBotInterface &other) | |
| XBotInterface & | operator= (const XBotInterface &rhs) |
| virtual | ~XBotInterface () |
| bool | init (const std::string &path_to_cfg) |
| bool | init (const ConfigOptions &options) |
| const ConfigOptions & | getConfigOptions () const |
| Gets the configuration struct that has been used to build the XBotInterface. More... | |
| const std::string & | getPathToConfig () const |
| Gets the path to the YAML config file used to build the XBotInterface. More... | |
| const urdf::ModelInterface & | getUrdf () const |
| Getter for the robot URDF model corresponding to the URDF xml file specified in the YAML config file. More... | |
| const std::string & | getUrdfPath () const |
| getUrdfPath Getter for the path to the URDF model More... | |
| const srdf_advr::Model & | getSrdf () const |
| Getter fot the robot SRDF model corresponding to the SRDF xml file specified in the YAML config file. More... | |
| const std::string & | getSrdfPath () const |
| getSrdfPath Getter for the path to the SRDF model More... | |
| const std::string & | getUrdfString () const |
| Returns the robot URDF xml as a string. More... | |
| const std::string & | getSrdfString () const |
| Returns the robot SRDF xml as a string. More... | |
| bool | getRobotState (const std::string &state_name, Eigen::VectorXd &q) const |
| Gets the robot joints group state configuration as specified in the robot SRDF. More... | |
| bool | getRobotState (const std::string &state_name, JointIdMap &q) const |
| Gets the robot joints group state configuration as specified in the robot SRDF. More... | |
| bool | getRobotState (const std::string &state_name, JointNameMap &q) const |
| Gets the robot joints group state configuration as specified in the robot SRDF. More... | |
| std::vector< std::string > | getChainNames () const |
| Return a vector of available chain names as strings. More... | |
| bool | hasChain (const std::string &chain_name) const |
| A method for determining if a chain with name "chain_name" is defined inside the interface. More... | |
| int | legs () const |
| Returns the number of legs defined inside the interface. More... | |
| int | arms () const |
| Returns the number of arms defined inside the interface. More... | |
| const std::vector< std::string > & | getEnabledJointNames () const |
| Returns a vector of enabled joint names. More... | |
| const std::vector< int > & | getEnabledJointId () const |
| Returns a vector of enabled joint IDs. More... | |
| bool | hasJoint (const std::string &joint_name) const |
| Checks that a joint with name "joint_name" is defined as an enabled joint inside the interface. More... | |
| bool | hasJoint (int joint_id) const |
| Checks that a joint with ID "joint_id" is defined as an enabled joint inside the interface. More... | |
| int | getJointNum () const |
| Getter for the number of enabled joints. More... | |
| XBot::Joint::ConstPtr | getJointByName (const std::string &joint_name) const |
| Gets the joint with name "joint_name" if it is defined as enabled. More... | |
| XBot::Joint::ConstPtr | getJointByID (int joint_id) const |
| Gets the joint with ID "joint_id" if it is defined as enabled. More... | |
| XBot::Joint::ConstPtr | getJointByDofIndex (int idx) const |
| Gets the joint with the required dof index. More... | |
| int | getDofIndex (const std::string &joint_name) const |
| Gets the Eigen ID of the joint with name "joint_name". More... | |
| int | getDofIndex (int joint_id) const |
| Gets the Eigen ID of the joint with ID "joint_id". More... | |
| bool | getDofIndex (const std::string &chain_name, std::vector< int > &ids) const |
| Gets dof indices of all joints inside chain "chain_name". More... | |
| void | initLog (MatLogger2::Ptr logger, int buffer_size=-1, int interleave=1, std::string prefix="") |
| Pre-allocates memory for logging the robot state to a mat file. More... | |
| void | log (MatLogger2::Ptr logger, double timestamp, const std::string &prefix="") const |
| Logs the current robot state. More... | |
| std::map< std::string, ForceTorqueSensor::ConstPtr > | getForceTorque () const |
| Getter for the force-torque sensor map pertaining to the whole robot. More... | |
| ForceTorqueSensor::ConstPtr | getForceTorque (const std::string &parent_link_name) const |
| Returns a force-torque sensor given its parent-link name. More... | |
| ForceTorqueSensor::ConstPtr | getForceTorque (int ft_id) const |
| Returns a force-torque sensor given its sensor ID. More... | |
| std::map< std::string, ImuSensor::ConstPtr > | getImu () |
| Getter for the IMU sensor map pertaining to the chain. More... | |
| ImuSensor::ConstPtr | getImu (const std::string &parent_link_name) const |
| Returns an IMU sensor given its parent-link name. More... | |
| ImuSensor::ConstPtr | getImu (int imu_id) const |
| Returns an IMU sensor given its sensor ID. More... | |
| std::map< std::string, Hand::Ptr > | getHand () |
| Getter for the hands map pertaining to the whole robot. More... | |
| Hand::Ptr | getHand (int hand_id) const |
| Returns a hand given its hand ID. More... | |
| bool | eigenToMap (const Eigen::VectorXd &vector, JointNameMap &name_map) const |
| Converts a state vector for the whole robot to its JointNameMap representation. More... | |
| bool | eigenToMap (const Eigen::VectorXd &vector, JointIdMap &id_map) const |
| Converts a state vector for the whole robot to its JointIdMap representation. More... | |
| bool | mapToEigen (const JointNameMap &map, Eigen::VectorXd &vector) const |
| Converts a state vector for an arbitrary subset of the robot state (specified as a JointNameMap) to its Eigen representation. More... | |
| bool | mapToEigen (const JointIdMap &map, Eigen::VectorXd &vector) const |
| Converts a state vector for an arbitrary subset of the robot state (specified as a JointIdMap) to its Eigen representation. More... | |
| bool | getJointPosition (Eigen::VectorXd &q) const |
| Gets the robot joint positions as an Eigen vector. More... | |
| bool | getMotorPosition (Eigen::VectorXd &q) const |
| Gets the robot motor positions as an Eigen vector. More... | |
| bool | getJointVelocity (Eigen::VectorXd &qdot) const |
| Gets the robot joint velocities as an Eigen vector. More... | |
| bool | getMotorVelocity (Eigen::VectorXd &qdot) const |
| Gets the robot motor velocities as an Eigen vector. More... | |
| bool | getJointAcceleration (Eigen::VectorXd &qddot) const |
| Gets the robot joint accelerations as an Eigen vector. More... | |
| bool | getJointEffort (Eigen::VectorXd &tau) const |
| Gets the robot joint efforts as an Eigen vector. More... | |
| bool | getTemperature (Eigen::VectorXd &temp) const |
| Gets the robot joint temperatures as an Eigen vector. More... | |
| bool | getJointPosition (JointIdMap &q) const |
| Gets the robot joint positions as a JointIdMap, i.e. More... | |
| bool | getMotorPosition (JointIdMap &q) const |
| Gets the robot motor positions as a JointIdMap, i.e. More... | |
| bool | getJointVelocity (JointIdMap &qdot) const |
| Gets the robot joint velocities as a JointIdMap, i.e. More... | |
| bool | getMotorVelocity (JointIdMap &qdot) const |
| Gets the robot motor velocities as a JointIdMap, i.e. More... | |
| bool | getJointAcceleration (JointIdMap &qddot) const |
| Gets the robot joint accelerations as a JointIdMap, i.e. More... | |
| bool | getJointEffort (JointIdMap &tau) const |
| Gets the robot joint efforts as a JointIdMap, i.e. More... | |
| bool | getTemperature (JointIdMap &temp) const |
| Gets the robot joint temperatures as a JointIdMap, i.e. More... | |
| bool | getJointPosition (JointNameMap &q) const |
| Gets the robot joint postions as a JointNameMap, i.e. More... | |
| bool | getMotorPosition (JointNameMap &q) const |
| Gets the robot motor postions as a JointNameMap, i.e. More... | |
| bool | getJointVelocity (JointNameMap &qdot) const |
| Gets the robot joint velocities as a JointNameMap, i.e. More... | |
| bool | getMotorVelocity (JointNameMap &qdot) const |
| Gets the robot motor velocities as a JointNameMap, i.e. More... | |
| bool | getJointAcceleration (JointNameMap &qddot) const |
| Gets the robot joint accelerations as a JointNameMap, i.e. More... | |
| bool | getJointEffort (JointNameMap &tau) const |
| Gets the robot joint efforts as a JointNameMap, i.e. More... | |
| bool | getTemperature (JointNameMap &temp) const |
| Gets the robot joint temperatures as a JointNameMap, i.e. More... | |
| bool | setJointPosition (const Eigen::VectorXd &q) |
| Sets the XBotInterface internal joint positions according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods. More... | |
| bool | setMotorPosition (const Eigen::VectorXd &q) |
| Sets the XBotInterface internal motor positions according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods. More... | |
| bool | setJointVelocity (const Eigen::VectorXd &qdot) |
| Sets the XBotInterface internal joint velocities according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods. More... | |
| bool | setMotorVelocity (const Eigen::VectorXd &qdot) |
| Sets the XBotInterface internal motor velocities according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods. More... | |
| bool | setJointAcceleration (const Eigen::VectorXd &qddot) |
| Sets the XBotInterface internal joint accelerations according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods. More... | |
| bool | setJointEffort (const Eigen::VectorXd &tau) |
| Sets the XBotInterface internal joint efforts according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods. More... | |
| bool | setTemperature (const Eigen::VectorXd &temp) |
| Sets the XBotInterface internal joint temperatures according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods. More... | |
| bool | setJointPosition (const JointIdMap &q) |
| Sets the XBotInterface internal joint positions according to the input JointIdMap (i.e. More... | |
| bool | setMotorPosition (const JointIdMap &q) |
| Sets the XBotInterface internal motor positions according to the input JointIdMap (i.e. More... | |
| bool | setJointVelocity (const JointIdMap &qdot) |
| Sets the XBotInterface internal joint velocities according to the input JointIdMap (i.e. More... | |
| bool | setMotorVelocity (const JointIdMap &qdot) |
| Sets the XBotInterface internal motor velocities according to the input JointIdMap (i.e. More... | |
| bool | setJointAcceleration (const JointIdMap &qddot) |
| Sets the XBotInterface internal joint accelerations according to the input JointIdMap (i.e. More... | |
| bool | setJointEffort (const JointIdMap &tau) |
| Sets the XBotInterface internal joint efforts according to the input JointIdMap (i.e. More... | |
| bool | setTemperature (const JointIdMap &temp) |
| Sets the XBotInterface internal motor temperatures according to the input JointIdMap (i.e. More... | |
| bool | setJointPosition (const JointNameMap &q) |
| Sets the XBotInterface internal joint positions according to the input JointNameMap (i.e. More... | |
| bool | setMotorPosition (const JointNameMap &q) |
| Sets the XBotInterface internal motor positions according to the input JointNameMap (i.e. More... | |
| bool | setJointVelocity (const JointNameMap &qdot) |
| Sets the XBotInterface internal joint velocities according to the input JointNameMap (i.e. More... | |
| bool | setMotorVelocity (const JointNameMap &qdot) |
| Sets the XBotInterface internal motor velocities according to the input JointNameMap (i.e. More... | |
| bool | setJointAcceleration (const JointNameMap &qddot) |
| Sets the XBotInterface internal joint accelerations according to the input JointNameMap (i.e. More... | |
| bool | setJointEffort (const JointNameMap &tau) |
| Sets the XBotInterface internal joint efforts according to the input JointNameMap (i.e. More... | |
| bool | setTemperature (const JointNameMap &temp) |
| Sets the XBotInterface internal joint temperatures according to the input JointNameMap (i.e. More... | |
| bool | getPositionReference (Eigen::VectorXd &q) const |
| Gets the robot position references as an Eigen vector. More... | |
| bool | getVelocityReference (Eigen::VectorXd &qdot) const |
| Gets the robot velocity references as an Eigen vector. More... | |
| bool | getEffortReference (Eigen::VectorXd &tau) const |
| Gets the robot effort references as an Eigen vector. More... | |
| bool | getStiffness (Eigen::VectorXd &K) const |
| Gets the robot stiffness as an Eigen vector. More... | |
| bool | getDamping (Eigen::VectorXd &D) const |
| Gets the robot damping as an Eigen vector. More... | |
| bool | getPositionReference (JointIdMap &q) const |
| Gets the robot position references as a JointIdMap, i.e. More... | |
| bool | getVelocityReference (JointIdMap &qdot) const |
| Gets the robot velocity references as a JointIdMap, i.e. More... | |
| bool | getEffortReference (JointIdMap &tau) const |
| Gets the robot effort references as a JointIdMap, i.e. More... | |
| bool | getStiffness (JointIdMap &K) const |
| Gets the robot stiffness as a JointIdMap, i.e. More... | |
| bool | getDamping (JointIdMap &D) const |
| Gets the robot damping as a JointIdMap, i.e. More... | |
| bool | getPositionReference (JointNameMap &q) const |
| Gets the robot postion references as a JointNameMap, i.e. More... | |
| bool | getVelocityReference (JointNameMap &qdot) const |
| Gets the robot velocity references as a JointNameMap, i.e. More... | |
| bool | getEffortReference (JointNameMap &tau) const |
| Gets the robot effort references as a JointNameMap, i.e. More... | |
| bool | getStiffness (JointNameMap &K) const |
| Gets the robot stiffness as a JointNameMap, i.e. More... | |
| bool | getDamping (JointNameMap &D) const |
| Gets the robot damping as a JointNameMap, i.e. More... | |
| bool | setPositionReference (const Eigen::VectorXd &q) |
| Sets the XBotInterface internal joint position references according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods. More... | |
| bool | setVelocityReference (const Eigen::VectorXd &qdot) |
| Sets the XBotInterface internal joint velocity references according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods. More... | |
| bool | setEffortReference (const Eigen::VectorXd &tau) |
| Sets the XBotInterface internal joint effort references according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods. More... | |
| bool | setStiffness (const Eigen::VectorXd &K) |
| Sets the XBotInterface internal joint stiffness according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods. More... | |
| bool | setDamping (const Eigen::VectorXd &D) |
| Sets the XBotInterface internal joint damping according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods. More... | |
| bool | setPositionReference (const JointIdMap &q) |
| Sets the XBotInterface internal joint position references according to the input JointIdMap (i.e. More... | |
| bool | setVelocityReference (const JointIdMap &qdot) |
| Sets the XBotInterface internal joint velocity references according to the input JointIdMap (i.e. More... | |
| bool | setEffortReference (const JointIdMap &tau) |
| Sets the XBotInterface internal joint effort references according to the input JointIdMap (i.e. More... | |
| bool | setStiffness (const JointIdMap &K) |
| Sets the XBotInterface internal joint stiffness according to the input JointIdMap (i.e. More... | |
| bool | setDamping (const JointIdMap &D) |
| Sets the XBotInterface internal joint damping according to the input JointIdMap (i.e. More... | |
| bool | setPositionReference (const JointNameMap &q) |
| Sets the XBotInterface internal joint position references according to the input JointNameMap (i.e. More... | |
| bool | setVelocityReference (const JointNameMap &qdot) |
| Sets the XBotInterface internal joint velocity references according to the input JointNameMap (i.e. More... | |
| bool | setEffortReference (const JointNameMap &tau) |
| Sets the XBotInterface internal joint effort references according to the input JointNameMap (i.e. More... | |
| bool | setStiffness (const JointNameMap &K) |
| Sets the XBotInterface internal joint stiffness according to the input JointNameMap (i.e. More... | |
| bool | setDamping (const JointNameMap &D) |
| Sets the XBotInterface internal joint damping according to the input JointNameMap (i.e. More... | |
| void | getJointLimits (Eigen::VectorXd &q_min, Eigen::VectorXd &q_max) const |
| Gets a vector of the robot joint limits, as specified in the URDF file. More... | |
| void | getVelocityLimits (Eigen::VectorXd &qdot_max) const |
| Gets a vector of the robot joint velocity limits, as specified in the URDF file. More... | |
| void | getEffortLimits (Eigen::VectorXd &tau_max) const |
| Gets a vector of the robot joint effort limits, as specified in the URDF file. More... | |
| bool | checkJointLimits (const Eigen::VectorXd &q, std::vector< std::string > &violating_joints) const |
| Check the input joint position vector against joint limits. More... | |
| bool | checkVelocityLimits (const Eigen::VectorXd &qdot, std::vector< std::string > &violating_joints) const |
| Check the input joint velocity vector against joint limits. More... | |
| bool | checkEffortLimits (const Eigen::VectorXd &tau, std::vector< std::string > &violating_joints) const |
| Check the input joint effort vector against joint limits. More... | |
| bool | checkJointLimits (const Eigen::VectorXd &q) const |
| Check the input joint position vector against joint limits. More... | |
| bool | checkVelocityLimits (const Eigen::VectorXd &qdot) const |
| Check the input joint velocity vector against joint limits. More... | |
| bool | checkEffortLimits (const Eigen::VectorXd &tau) const |
| Check the input joint effort vector against joint limits. More... | |
| bool | enforceJointLimits (JointIdMap &q) const |
| Modifies the input joint position map by enforcing joint limits. More... | |
| bool | enforceJointLimits (JointNameMap &q) const |
| Modifies the input joint position map by enforcing joint limits. More... | |
| bool | enforceJointLimits (Eigen::VectorXd &q) const |
| Modifies the input joint position vector by enforcing joint limits. More... | |
| bool | enforceEffortLimit (Eigen::VectorXd &tau) const |
| Modifies the input joint effort vector by enforcing effort limits. More... | |
| bool | enforceVelocityLimit (Eigen::VectorXd &qdot) const |
| Modifies the input joint velcoity vector by enforcing joint limits. More... | |
| template<typename... SyncFlags> | |
| bool | sync (const XBotInterface &other, SyncFlags... flags) |
| Synchronize the current XBotInterface with another XBotInterface object: only the common chains will be taken into account. More... | |
| const std::map< std::string, XBot::KinematicChain::Ptr > & | getChainMap () const |
| Getter for the chain map inside the XBotInterface. More... | |
| void | print () const |
| Print a pretty table about the robot state. More... | |
| void | printTracking () const |
| Print a pretty table about the robot tracking. More... | |
Static Public Member Functions | |
| static void | clearRobotMap (void) |
| static RobotInterface::Ptr | getRobot (const ConfigOptions &config, const std::string &robot_name="") |
| ... More... | |
| static RobotInterface::Ptr | getRobot (const std::string &path_to_cfg, const std::string &robot_name="", AnyMapConstPtr any_map=AnyMapConstPtr(), const std::string &framework="") |
| Getter for the robot singleton. More... | |
Protected Member Functions | |
| virtual bool | post_init () |
| virtual bool | sense_internal (bool sync_references)=0 |
| virtual bool | read_sensors ()=0 |
| virtual bool | sense_hands ()=0 |
| virtual bool | move_internal ()=0 |
| virtual bool | move_hands ()=0 |
| virtual bool | init_robot (const ConfigOptions &config)=0 |
| virtual bool | set_control_mode_internal (int joint_id, const ControlMode &control_mode) |
| bool | setJointPosition (const Eigen::VectorXd &q) |
| Sets the XBotInterface internal joint positions according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods. More... | |
| bool | setJointPosition (const JointIdMap &q) |
| Sets the XBotInterface internal joint positions according to the input JointIdMap (i.e. More... | |
| bool | setJointPosition (const JointNameMap &q) |
| Sets the XBotInterface internal joint positions according to the input JointNameMap (i.e. More... | |
| bool | setMotorPosition (const Eigen::VectorXd &q) |
| Sets the XBotInterface internal motor positions according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods. More... | |
| bool | setMotorPosition (const JointIdMap &q) |
| Sets the XBotInterface internal motor positions according to the input JointIdMap (i.e. More... | |
| bool | setMotorPosition (const JointNameMap &q) |
| Sets the XBotInterface internal motor positions according to the input JointNameMap (i.e. More... | |
| bool | setJointVelocity (const Eigen::VectorXd &qdot) |
| Sets the XBotInterface internal joint velocities according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods. More... | |
| bool | setJointVelocity (const JointIdMap &qdot) |
| Sets the XBotInterface internal joint velocities according to the input JointIdMap (i.e. More... | |
| bool | setJointVelocity (const JointNameMap &qdot) |
| Sets the XBotInterface internal joint velocities according to the input JointNameMap (i.e. More... | |
| bool | setMotorVelocity (const Eigen::VectorXd &qdot) |
| Sets the XBotInterface internal motor velocities according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods. More... | |
| bool | setMotorVelocity (const JointIdMap &qdot) |
| Sets the XBotInterface internal motor velocities according to the input JointIdMap (i.e. More... | |
| bool | setMotorVelocity (const JointNameMap &qdot) |
| Sets the XBotInterface internal motor velocities according to the input JointNameMap (i.e. More... | |
| bool | setJointEffort (const Eigen::VectorXd &tau) |
| Sets the XBotInterface internal joint efforts according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods. More... | |
| bool | setJointEffort (const JointIdMap &tau) |
| Sets the XBotInterface internal joint efforts according to the input JointIdMap (i.e. More... | |
| bool | setJointEffort (const JointNameMap &tau) |
| Sets the XBotInterface internal joint efforts according to the input JointNameMap (i.e. More... | |
| bool | setTemperature (const Eigen::VectorXd &temp) |
| Sets the XBotInterface internal joint temperatures according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods. More... | |
| bool | setTemperature (const JointIdMap &temp) |
| Sets the XBotInterface internal motor temperatures according to the input JointIdMap (i.e. More... | |
| bool | setTemperature (const JointNameMap &temp) |
| Sets the XBotInterface internal joint temperatures according to the input JointNameMap (i.e. More... | |
| bool | setJointAcceleration (const Eigen::VectorXd &qddot) |
| Sets the XBotInterface internal joint accelerations according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods. More... | |
| bool | setJointAcceleration (const JointIdMap &qddot) |
| Sets the XBotInterface internal joint accelerations according to the input JointIdMap (i.e. More... | |
| bool | setJointAcceleration (const JointNameMap &qddot) |
| Sets the XBotInterface internal joint accelerations according to the input JointNameMap (i.e. More... | |
| bool | getJointAcceleration (Eigen::VectorXd &qddot) const |
| Gets the robot joint accelerations as an Eigen vector. More... | |
| bool | getJointAcceleration (JointIdMap &qddot) const |
| Gets the robot joint accelerations as a JointIdMap, i.e. More... | |
| bool | getJointAcceleration (JointNameMap &qddot) const |
| Gets the robot joint accelerations as a JointNameMap, i.e. More... | |
| template<typename... SyncFlags> | |
| bool | sync (const XBotInterface &other, SyncFlags... flags) |
| Synchronize the current XBotInterface with another XBotInterface object: only the common chains will be taken into account. More... | |
| const std::map< std::string, XBot::KinematicChain::Ptr > & | getChainMap () const |
| Getter for the chain map inside the XBotInterface. More... | |
Protected Member Functions inherited from XBot::XBotInterface | |
| Joint::Ptr | getJointByNameInternal (const std::string &joint_name) const |
| Joint::Ptr | getJointByIdInternal (int joint_id) const |
| Joint::Ptr | getJointByDofIndexInternal (int dof_index) const |
| const std::map< std::string, ForceTorqueSensor::Ptr > & | getForceTorqueInternal () const |
| const std::map< std::string, ImuSensor::Ptr > & | getImuInternal () const |
| const std::vector< std::string > & | getModelOrderedChainName () const |
Additional Inherited Members | |
Protected Attributes inherited from XBot::XBotInterface | |
| XBotCoreModel | _XBotModel |
| std::map< std::string, XBot::KinematicChain::Ptr > | _chain_map |
| std::vector< Joint::Ptr > | _ordered_joint_vector |
| std::vector< Joint::Ptr > | _joint_vector |
| std::map< std::string, ForceTorqueSensor::Ptr > | _ft_map |
| std::map< int, ForceTorqueSensor::Ptr > | _ft_id_map |
| std::map< std::string, ImuSensor::Ptr > | _imu_map |
| std::map< int, ImuSensor::Ptr > | _imu_id_map |
| std::map< std::string, Hand::Ptr > | _hand_map |
| std::map< int, Hand::Ptr > | _hand_id_map |
| std::vector< std::string > | _ordered_chain_names |
| std::map< int, int > | _joint_id_to_eigen_id |
| std::map< std::string, int > | _joint_name_to_eigen_id |
| typedef std::shared_ptr<const RobotInterface> XBot::RobotInterface::ConstPtr |
| typedef std::shared_ptr<RobotInterface> XBot::RobotInterface::Ptr |
| XBot::RobotInterface::RobotInterface | ( | ) |
Default constructor.
|
virtualdefault |
|
delete |
| XBot::RobotChain & XBot::RobotInterface::arm | ( | int | arm_id | ) |
Getter for the standard kinematic group arm: you can quickly access the i-th arm in the order specified in the SRDF.
| arm_id | the id of the requested arm (i.e. the index as specifed in the SRDF group |
| const XBot::RobotChain & XBot::RobotInterface::arm | ( | int | arm_id | ) | const |
| XBot::RobotChain & XBot::RobotInterface::chain | ( | const std::string & | chain_name | ) |
Getter for the robot chain with a certain chain_name.
| chain_name | the requested chain name |
| const XBot::RobotChain & XBot::RobotInterface::chain | ( | const std::string & | chain_name | ) | const |
|
static |
|
protected |
Getter for the chain map inside the XBotInterface.
| void XBot::RobotInterface::getControlMode | ( | std::map< int, ControlMode > & | control_mode | ) | const |
| void XBot::RobotInterface::getControlMode | ( | std::map< std::string, ControlMode > & | control_mode | ) | const |
| bool XBot::XBotInterface::getDamping |
Gets the robot damping as an Eigen vector.
The joint order inside the vector can be queried by calling the getEnabledJointNames/getEnabledJointId methods.
| D | A reference to an Eigen vector to be filled with the requested joint state. If the provided vector has wrong size it is resized automatically. |
| bool XBot::XBotInterface::getDamping |
Gets the robot damping as a JointIdMap, i.e.
a map whose key represents the joint ID and whose value represents the required joint state.
| D | A reference to a JointIdMap to be filled with the requested joint state. It is the user responsibility to clear the map before it is filled (if required). |
| bool XBot::XBotInterface::getDamping |
Gets the robot damping as a JointNameMap, i.e.
a map whose key represents the joint human-readable name and whose value represents the required joint state.
| D | A reference to a JointIdMap to be filled with the requested joint state. It is the user responsibility to clear the map before it is filled (if required). |
| bool XBot::XBotInterface::getEffortReference |
Gets the robot effort references as an Eigen vector.
The joint order inside the vector can be queried by calling the getEnabledJointNames/getEnabledJointId methods.
| tau | A reference to an Eigen vector to be filled with the requested joint state. If the provided vector has wrong size it is resized automatically. |
| bool XBot::XBotInterface::getEffortReference |
Gets the robot effort references as a JointIdMap, i.e.
a map whose key represents the joint ID and whose value represents the required joint state.
| tau | A reference to a JointIdMap to be filled with the requested joint state. It is the user responsibility to clear the map before it is filled (if required). |
| bool XBot::XBotInterface::getEffortReference |
Gets the robot effort references as a JointNameMap, i.e.
a map whose key represents the joint human-readable name and whose value represents the required joint state.
| tau | A reference to a JointIdMap to be filled with the requested joint state. It is the user responsibility to clear the map before it is filled (if required). |
|
protected |
Gets the robot joint accelerations as an Eigen vector.
The joint order inside the vector can be queried by calling the getEnabledJointNames/getEnabledJointId methods.
| qddot | A reference to an Eigen vector to be filled with the requested joint state. If the provided vector has wrong size it is resized automatically. |
|
protected |
Gets the robot joint accelerations as a JointIdMap, i.e.
a map whose key represents the joint ID and whose value represents the required joint state.
| qddot | A reference to a JointIdMap to be filled with the requested joint state. It is the user responsibility to clear the map before it is filled (if required). |
|
protected |
Gets the robot joint accelerations as a JointNameMap, i.e.
a map whose key represents the joint human-readable name and whose value represents the required joint state.
| qddot | A reference to a JointIdMap to be filled with the requested joint state. It is the user responsibility to clear the map before it is filled (if required). |
| bool XBot::XBotInterface::getJointEffort |
Gets the robot joint efforts as an Eigen vector.
The joint order inside the vector can be queried by calling the getEnabledJointNames/getEnabledJointId methods.
| tau | A reference to an Eigen vector to be filled with the requested joint state. If the provided vector has wrong size it is resized automatically. |
| bool XBot::XBotInterface::getJointEffort |
Gets the robot joint efforts as a JointIdMap, i.e.
a map whose key represents the joint ID and whose value represents the required joint state.
| tau | A reference to a JointIdMap to be filled with the requested joint state. It is the user responsibility to clear the map before it is filled (if required). |
| bool XBot::XBotInterface::getJointEffort |
Gets the robot joint efforts as a JointNameMap, i.e.
a map whose key represents the joint human-readable name and whose value represents the required joint state.
| tau | A reference to a JointIdMap to be filled with the requested joint state. It is the user responsibility to clear the map before it is filled (if required). |
| bool XBot::XBotInterface::getJointPosition |
Gets the robot joint positions as an Eigen vector.
The joint order inside the vector can be queried by calling the getEnabledJointNames/getEnabledJointId methods.
| q | A reference to an Eigen vector to be filled with the requested joint state. If the provided vector has wrong size it is resized automatically. |
| bool XBot::XBotInterface::getJointPosition |
Gets the robot joint positions as a JointIdMap, i.e.
a map whose key represents the joint ID and whose value represents the required joint state.
| q | A reference to a JointIdMap to be filled with the requested joint state. It is the user responsibility to clear the map before it is filled (if required). |
| bool XBot::XBotInterface::getJointPosition |
Gets the robot joint postions as a JointNameMap, i.e.
a map whose key represents the joint human-readable name and whose value represents the required joint state.
| q | A reference to a JointIdMap to be filled with the requested joint state. It is the user responsibility to clear the map before it is filled (if required). |
| bool XBot::XBotInterface::getJointVelocity |
Gets the robot joint velocities as an Eigen vector.
The joint order inside the vector can be queried by calling the getEnabledJointNames/getEnabledJointId methods.
| qdot | A reference to an Eigen vector to be filled with the requested joint state. If the provided vector has wrong size it is resized automatically. |
| bool XBot::XBotInterface::getJointVelocity |
Gets the robot joint velocities as a JointIdMap, i.e.
a map whose key represents the joint ID and whose value represents the required joint state.
| qdot | A reference to a JointIdMap to be filled with the requested joint state. It is the user responsibility to clear the map before it is filled (if required). |
| bool XBot::XBotInterface::getJointVelocity |
Gets the robot joint velocities as a JointNameMap, i.e.
a map whose key represents the joint human-readable name and whose value represents the required joint state.
| qdot | A reference to a JointIdMap to be filled with the requested joint state. It is the user responsibility to clear the map before it is filled (if required). |
| bool XBot::XBotInterface::getMotorPosition |
Gets the robot motor positions as an Eigen vector.
The joint order inside the vector can be queried by calling the getEnabledJointNames/getEnabledJointId methods.
| q | A reference to an Eigen vector to be filled with the requested joint state. If the provided vector has wrong size it is resized automatically. |
| bool XBot::XBotInterface::getMotorPosition |
Gets the robot motor positions as a JointIdMap, i.e.
a map whose key represents the joint ID and whose value represents the required joint state.
| q | A reference to a JointIdMap to be filled with the requested joint state. It is the user responsibility to clear the map before it is filled (if required). |
| bool XBot::XBotInterface::getMotorPosition |
Gets the robot motor postions as a JointNameMap, i.e.
a map whose key represents the joint human-readable name and whose value represents the required joint state.
| q | A reference to a JointIdMap to be filled with the requested joint state. It is the user responsibility to clear the map before it is filled (if required). |
| bool XBot::XBotInterface::getMotorVelocity |
Gets the robot motor velocities as an Eigen vector.
The joint order inside the vector can be queried by calling the getEnabledJointNames/getEnabledJointId methods.
| qdot | A reference to an Eigen vector to be filled with the requested joint state. If the provided vector has wrong size it is resized automatically. |
| bool XBot::XBotInterface::getMotorVelocity |
Gets the robot motor velocities as a JointIdMap, i.e.
a map whose key represents the joint ID and whose value represents the required joint state.
| qdot | A reference to a JointIdMap to be filled with the requested joint state. It is the user responsibility to clear the map before it is filled (if required). |
| bool XBot::XBotInterface::getMotorVelocity |
Gets the robot motor velocities as a JointNameMap, i.e.
a map whose key represents the joint human-readable name and whose value represents the required joint state.
| qdot | A reference to a JointIdMap to be filled with the requested joint state. It is the user responsibility to clear the map before it is filled (if required). |
| bool XBot::XBotInterface::getPositionReference |
Gets the robot position references as an Eigen vector.
The joint order inside the vector can be queried by calling the getEnabledJointNames/getEnabledJointId methods.
| q | A reference to an Eigen vector to be filled with the requested joint state. If the provided vector has wrong size it is resized automatically. |
| bool XBot::XBotInterface::getPositionReference |
Gets the robot position references as a JointIdMap, i.e.
a map whose key represents the joint ID and whose value represents the required joint state.
| q | A reference to a JointIdMap to be filled with the requested joint state. It is the user responsibility to clear the map before it is filled (if required). |
| bool XBot::XBotInterface::getPositionReference |
Gets the robot postion references as a JointNameMap, i.e.
a map whose key represents the joint human-readable name and whose value represents the required joint state.
| q | A reference to a JointIdMap to be filled with the requested joint state. It is the user responsibility to clear the map before it is filled (if required). |
|
static |
|
static |
Getter for the robot singleton.
| path_to_cfg | path to the config file where the robot parameters(e.g. control framework, internal model ...) are specified |
| any_map | a map with objects needed by RobotInterface actual implementations |
| bool XBot::XBotInterface::getStiffness |
Gets the robot stiffness as an Eigen vector.
The joint order inside the vector can be queried by calling the getEnabledJointNames/getEnabledJointId methods.
| K | A reference to an Eigen vector to be filled with the requested joint state. If the provided vector has wrong size it is resized automatically. |
| bool XBot::XBotInterface::getStiffness |
Gets the robot stiffness as a JointIdMap, i.e.
a map whose key represents the joint ID and whose value represents the required joint state.
| K | A reference to a JointIdMap to be filled with the requested joint state. It is the user responsibility to clear the map before it is filled (if required). |
| bool XBot::XBotInterface::getStiffness |
Gets the robot stiffness as a JointNameMap, i.e.
a map whose key represents the joint human-readable name and whose value represents the required joint state.
| K | A reference to a JointIdMap to be filled with the requested joint state. It is the user responsibility to clear the map before it is filled (if required). |
| bool XBot::XBotInterface::getTemperature |
Gets the robot joint temperatures as an Eigen vector.
The joint order inside the vector can be queried by calling the getEnabledJointNames/getEnabledJointId methods.
| temp | A reference to an Eigen vector to be filled with the requested joint state. If the provided vector has wrong size it is resized automatically. |
| bool XBot::XBotInterface::getTemperature |
Gets the robot joint temperatures as a JointIdMap, i.e.
a map whose key represents the joint ID and whose value represents the required joint state.
| temp | A reference to a JointIdMap to be filled with the requested joint state. It is the user responsibility to clear the map before it is filled (if required). |
| bool XBot::XBotInterface::getTemperature |
Gets the robot joint temperatures as a JointNameMap, i.e.
a map whose key represents the joint human-readable name and whose value represents the required joint state.
| temp | A reference to a JointIdMap to be filled with the requested joint state. It is the user responsibility to clear the map before it is filled (if required). |
|
pure virtual |
Getter for the time in the robot framework.
| double XBot::RobotInterface::getTimestampRx | ( | ) | const |
Get the RX timestamp: it corresponds to the last call to sense()
| double XBot::RobotInterface::getTimestampTx | ( | ) | const |
Get the TX timestamp: it corresponds to the last call to move()
| bool XBot::XBotInterface::getVelocityReference |
Gets the robot velocity references as an Eigen vector.
The joint order inside the vector can be queried by calling the getEnabledJointNames/getEnabledJointId methods.
| qdot | A reference to an Eigen vector to be filled with the requested joint state. If the provided vector has wrong size it is resized automatically. |
| bool XBot::XBotInterface::getVelocityReference |
Gets the robot velocity references as a JointIdMap, i.e.
a map whose key represents the joint ID and whose value represents the required joint state.
| qdot | A reference to a JointIdMap to be filled with the requested joint state. It is the user responsibility to clear the map before it is filled (if required). |
| bool XBot::XBotInterface::getVelocityReference |
Gets the robot velocity references as a JointNameMap, i.e.
a map whose key represents the joint human-readable name and whose value represents the required joint state.
| qdot | A reference to a JointIdMap to be filled with the requested joint state. It is the user responsibility to clear the map before it is filled (if required). |
|
protectedpure virtual |
|
pure virtual |
...
| XBot::RobotChain & XBot::RobotInterface::leg | ( | int | leg_id | ) |
Getter for the standard kinematic group leg: you can quickly access the i-th leg in the order specified in the SRDF.
| arm_id | the id of the requested leg (i.e. the index as specifed in the SRDF group |
| const XBot::RobotChain & XBot::RobotInterface::leg | ( | int | leg_id | ) | const |
| XBot::ModelInterface & XBot::RobotInterface::model | ( | ) |
Getter for the internal model instance.
| bool XBot::RobotInterface::move | ( | ) |
Moves the robot calling the move_internal() implemented by the derived class.
|
protectedpure virtual |
|
protectedpure virtual |
| XBot::RobotChain & XBot::RobotInterface::operator() | ( | const std::string & | chain_name | ) |
Getter for the robot chain with a certain chain_name.
| chain_name | the requested chain name |
| const XBot::RobotChain & XBot::RobotInterface::operator() | ( | const std::string & | chain_name | ) | const |
|
delete |
|
protectedvirtual |
Reimplemented from XBot::XBotInterface.
|
protectedpure virtual |
| bool XBot::RobotInterface::sense | ( | bool | sync_model = true, |
| bool | sync_references = false |
||
| ) |
Reads the current state of the robot calling sense_internal() and read_sensors() implemented by the derived class.
It synchronizes the internal model if the sync_model param is true.
| sync_model | sync flag: true if the internal model needs to be synchronized with the robot |
| sync_references | sync flag: if true, reference fields (pos ref, vel ref, tor ref, stiffness, damping) are synchronized with the robot controller |
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedvirtual |
| bool XBot::RobotInterface::setControlMode | ( | const ControlMode & | control_mode | ) |
| bool XBot::RobotInterface::setControlMode | ( | const std::map< int, ControlMode > & | control_mode | ) |
| bool XBot::RobotInterface::setControlMode | ( | const std::map< std::string, ControlMode > & | control_mode | ) |
|
virtual |
| bool XBot::XBotInterface::setDamping |
Sets the XBotInterface internal joint damping according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods.
| D | The vector of input joint states. |
| bool XBot::XBotInterface::setDamping |
Sets the XBotInterface internal joint damping according to the input JointIdMap (i.e.
a map whose key represents the joint ID and whose value represents the joint state), which can include joint states for an arbitrary subset of the whole robot.
| K | The input JointIdMap |
| bool XBot::XBotInterface::setDamping |
Sets the XBotInterface internal joint damping according to the input JointNameMap (i.e.
a map whose key represents the joint name and whose value represents the joint state), which can include joint states for an arbitrary subset of the whole robot.
| D | The input JointIdMap |
| bool XBot::XBotInterface::setEffortReference |
Sets the XBotInterface internal joint effort references according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods.
| tau | The vector of input joint states. |
| bool XBot::XBotInterface::setEffortReference |
Sets the XBotInterface internal joint effort references according to the input JointIdMap (i.e.
a map whose key represents the joint ID and whose value represents the joint state), which can include joint states for an arbitrary subset of the whole robot.
| tau | The input JointIdMap |
| bool XBot::XBotInterface::setEffortReference |
Sets the XBotInterface internal joint effort references according to the input JointNameMap (i.e.
a map whose key represents the joint name and whose value represents the joint state), which can include joint states for an arbitrary subset of the whole robot.
| tau | The input JointIdMap |
|
protected |
Sets the XBotInterface internal joint accelerations according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods.
| qddot | The vector of input joint states. |
|
protected |
Sets the XBotInterface internal joint accelerations according to the input JointIdMap (i.e.
a map whose key represents the joint ID and whose value represents the joint state), which can include joint states for an arbitrary subset of the whole robot.
| qddot | The input JointIdMap |
|
protected |
Sets the XBotInterface internal joint accelerations according to the input JointNameMap (i.e.
a map whose key represents the joint name and whose value represents the joint state), which can include joint states for an arbitrary subset of the whole robot.
| qddot | The input JointIdMap |
|
protected |
Sets the XBotInterface internal joint efforts according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods.
| tau | The vector of input joint states. |
|
protected |
Sets the XBotInterface internal joint efforts according to the input JointIdMap (i.e.
a map whose key represents the joint ID and whose value represents the joint state), which can include joint states for an arbitrary subset of the whole robot.
| tau | The input JointIdMap |
|
protected |
Sets the XBotInterface internal joint efforts according to the input JointNameMap (i.e.
a map whose key represents the joint name and whose value represents the joint state), which can include joint states for an arbitrary subset of the whole robot.
| tau | The input JointIdMap |
|
protected |
Sets the XBotInterface internal joint positions according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods.
| q | The vector of input joint states. |
|
protected |
Sets the XBotInterface internal joint positions according to the input JointIdMap (i.e.
a map whose key represents the joint ID and whose value represents the joint state), which can include joint states for an arbitrary subset of the whole robot.
| q | The input JointIdMap |
|
protected |
Sets the XBotInterface internal joint positions according to the input JointNameMap (i.e.
a map whose key represents the joint name and whose value represents the joint state), which can include joint states for an arbitrary subset of the whole robot.
| q | The input JointIdMap |
|
protected |
Sets the XBotInterface internal joint velocities according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods.
| qdot | The vector of input joint states. |
|
protected |
Sets the XBotInterface internal joint velocities according to the input JointIdMap (i.e.
a map whose key represents the joint ID and whose value represents the joint state), which can include joint states for an arbitrary subset of the whole robot.
| qdot | The input JointIdMap |
|
protected |
Sets the XBotInterface internal joint velocities according to the input JointNameMap (i.e.
a map whose key represents the joint name and whose value represents the joint state), which can include joint states for an arbitrary subset of the whole robot.
| qdot | The input JointIdMap |
|
protected |
Sets the XBotInterface internal motor positions according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods.
| q | The vector of input joint states. |
|
protected |
Sets the XBotInterface internal motor positions according to the input JointIdMap (i.e.
a map whose key represents the joint ID and whose value represents the joint state), which can include joint states for an arbitrary subset of the whole robot.
| q | The input JointIdMap |
|
protected |
Sets the XBotInterface internal motor positions according to the input JointNameMap (i.e.
a map whose key represents the joint name and whose value represents the joint state), which can include joint states for an arbitrary subset of the whole robot.
| q | The input JointIdMap |
|
protected |
Sets the XBotInterface internal motor velocities according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods.
| qdot | The vector of input joint states. |
|
protected |
Sets the XBotInterface internal motor velocities according to the input JointIdMap (i.e.
a map whose key represents the joint ID and whose value represents the joint state), which can include joint states for an arbitrary subset of the whole robot.
| qdot | The input JointIdMap |
|
protected |
Sets the XBotInterface internal motor velocities according to the input JointNameMap (i.e.
a map whose key represents the joint name and whose value represents the joint state), which can include joint states for an arbitrary subset of the whole robot.
| qdot | The input JointIdMap |
| bool XBot::XBotInterface::setPositionReference |
Sets the XBotInterface internal joint position references according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods.
| q | The vector of input joint states. |
| bool XBot::XBotInterface::setPositionReference |
Sets the XBotInterface internal joint position references according to the input JointIdMap (i.e.
a map whose key represents the joint ID and whose value represents the joint state), which can include joint states for an arbitrary subset of the whole robot.
| q | The input JointIdMap |
| bool XBot::XBotInterface::setPositionReference |
Sets the XBotInterface internal joint position references according to the input JointNameMap (i.e.
a map whose key represents the joint name and whose value represents the joint state), which can include joint states for an arbitrary subset of the whole robot.
| q | The input JointIdMap |
| bool XBot::RobotInterface::setReferenceFrom | ( | const ModelInterface & | model, |
| SyncFlags... | flags | ||
| ) |
Sets the robot references according to a ModelInterface.
Flags can be specified to select a part of the state to be synchronized.
@usage robot.setReferenceFrom(model, XBot::Sync::Position, XBot::Sync::Effort) @usage robot.setReferenceFrom(other_model, XBot::Sync::Position)
| model | The ModelInterface whose state is used as a reference for the robot. model. |
| flags | Flags to specify what part of the model state must be used a reference. By default (i.e. if this argument is omitted) the whole state is used. 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: |
| bool XBot::XBotInterface::setStiffness |
Sets the XBotInterface internal joint stiffness according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods.
| K | The vector of input joint states. |
| bool XBot::XBotInterface::setStiffness |
Sets the XBotInterface internal joint stiffness according to the input JointIdMap (i.e.
a map whose key represents the joint ID and whose value represents the joint state), which can include joint states for an arbitrary subset of the whole robot.
| K | The input JointIdMap |
| bool XBot::XBotInterface::setStiffness |
Sets the XBotInterface internal joint stiffness according to the input JointNameMap (i.e.
a map whose key represents the joint name and whose value represents the joint state), which can include joint states for an arbitrary subset of the whole robot.
| K | The input JointIdMap |
|
protected |
Sets the XBotInterface internal joint temperatures according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods.
| temp | The vector of input joint states. |
|
protected |
Sets the XBotInterface internal motor temperatures according to the input JointIdMap (i.e.
a map whose key represents the joint ID and whose value represents the joint state), which can include joint states for an arbitrary subset of the whole robot.
| temp | The input JointIdMap |
|
protected |
Sets the XBotInterface internal joint temperatures according to the input JointNameMap (i.e.
a map whose key represents the joint name and whose value represents the joint state), which can include joint states for an arbitrary subset of the whole robot.
| temp | The input JointIdMap |
| bool XBot::XBotInterface::setVelocityReference |
Sets the XBotInterface internal joint velocity references according to the provided vector, which must be ordered as specified by the getEnabledJointNames/getEnabledJointId methods.
| qdot | The vector of input joint states. |
| bool XBot::XBotInterface::setVelocityReference |
Sets the XBotInterface internal joint velocity references according to the input JointIdMap (i.e.
a map whose key represents the joint ID and whose value represents the joint state), which can include joint states for an arbitrary subset of the whole robot.
| qdot | The input JointIdMap |
| bool XBot::XBotInterface::setVelocityReference |
Sets the XBotInterface internal joint velocity references according to the input JointNameMap (i.e.
a map whose key represents the joint name and whose value represents the joint state), which can include joint states for an arbitrary subset of the whole robot.
| qdot | The input JointIdMap |
|
protected |
Synchronize the current XBotInterface with another XBotInterface object: only the common chains will be taken into account.
| flags | ... |
| other | The XBotInterface object from which we synchronize the current object |
1.8.17