Skip to content
Snippets Groups Projects
  • Thomas Moulard's avatar
    876acbcc
    Read the joint names in the robot model to fill the joint_states message. · 876acbcc
    Thomas Moulard authored
    Previous version of abstract-robot-dynamics did not contain the joint
    name. Therefore, we had no way to forward the joint names to ROS.
    
    This patch changes the ros_joint_state entity to add a
    retrieveJointNames command. This command uses the pool to retrieve an
    instance of the Dynamic entity (i.e. robot.dynamic) by using the
    entity name. It then iterates on the robot structure to fill the joint
    names in the message.
    
    This command is automatically called in the Ros class so this change
    is transparent for the end-user.
    
    However, no more assumptions are made on the robot structure so the
    sent message is exactly matching the robot structure loaded in the
    dynamic entity. In particular, the free floating DOFs are sent and the
    hard coded hand values have been removed.
    
    ROS, in fact, requires DOF names and not joint names. Therefore, the
    names are computed as follow:
    - 0 dof: ignored,
    - 1 dof: dof name is the joint name,
    - >1 dof: <joint name>_<dof id>
    876acbcc
    History
    Read the joint names in the robot model to fill the joint_states message.
    Thomas Moulard authored
    Previous version of abstract-robot-dynamics did not contain the joint
    name. Therefore, we had no way to forward the joint names to ROS.
    
    This patch changes the ros_joint_state entity to add a
    retrieveJointNames command. This command uses the pool to retrieve an
    instance of the Dynamic entity (i.e. robot.dynamic) by using the
    entity name. It then iterates on the robot structure to fill the joint
    names in the message.
    
    This command is automatically called in the Ros class so this change
    is transparent for the end-user.
    
    However, no more assumptions are made on the robot structure so the
    sent message is exactly matching the robot structure loaded in the
    dynamic entity. In particular, the free floating DOFs are sent and the
    hard coded hand values have been removed.
    
    ROS, in fact, requires DOF names and not joint names. Therefore, the
    names are computed as follow:
    - 0 dof: ignored,
    - 1 dof: dof name is the joint name,
    - >1 dof: <joint name>_<dof id>