Class RobotModelBuilder

Class Documentation

class RobotModelBuilder

Public Types

using SharedPtr = std::shared_ptr<RobotModelBuilder>
using ConstSharedPtr = std::shared_ptr<const RobotModelBuilder>

Public Functions

RobotModelBuilder()
virtual ~RobotModelBuilder()
virtual bool build_model(const std::string &urdf, const std::vector<std::string> &moving_joint_names, const std::vector<std::string> &controlled_joint_names, const bool robot_has_free_flyer)

Build the robot model freezing the joints that are not moving.

Parameters:
  • urdf – Content of the urdf file.

  • srdf – Content of the srdf file.

  • moving_joint_names – List of active joint name.

  • controlled_joint_names – List of actively controlled joints.

  • robot_has_free_flyer – If the robot has a free flyer or not.

virtual const std::vector<std::string> &get_moving_joint_names() const

Get the moving joint names.

Returns:

const std::vector<std::string>&

virtual const std::vector<pinocchio::Index> &get_moving_joint_ids() const

Get the moving joint ids.

Returns:

const std::vector<pinocchio::Index>&

virtual const std::vector<pinocchio::Index> &get_locked_joint_ids() const

Get the locked joint ids.

Returns:

const std::vector<pinocchio::Index>&

virtual const pinocchio::Model &get_model() const

Get the pinocchio model.

Returns:

const pinocchio::Model&

virtual pinocchio::Data &get_data()

Get the Pinocchio Data.

Returns:

pinocchio::Data&

virtual bool get_robot_has_free_flyer() const

Get if the robot model has a free flyer joint.

Returns:

true

Returns:

false

virtual const std::map<int, int> &get_pinocchio_to_hardware_interface_map() const

Get the Pinocchio To Hardware Interface Map.

Returns:

std::map<int, int>

virtual void construct_robot_state(const linear_feedback_controller_msgs::Eigen::Sensor &Sensor, Eigen::VectorXd &robot_configuration, Eigen::VectorXd &robot_velocity)
virtual int get_nq() const

Get Pinocchio joint space dimension (position) including free-flyer joint.

virtual int get_nv() const

Get Pinocchio joint space dimension (velocity) including free-flyer joint.

virtual int get_joint_pin_nq() const

Get Pinocchio joint space dimension (position) excluding free-flyer joint. In case of a continuous joint, it will add 2 to nq (cos, sin)

virtual int get_joint_hw_nq() const

Get Hardware joint space dimension (position) excluding free-flyer joint. In case of a continuous joint, it will add only 1 to nq.

virtual int get_joint_nv() const

Get Pinocchio joint space dimension (velocity) excluding free-flyer joint.

Public Members

EIGEN_MAKE_ALIGNED_OPERATOR_NEW