ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The best way is to create a model of your robot in URDF (or, in a .xacro file that is converted to URDF by xacro). That's an XML model of each of the links and joints in your robot. Each link will have a reference frame, and each joint will have a joint angle. You use the robot_state_publisher
and joint_state_publisher
nodes to automatically publish appropriate frame transformations for your link frames. You can then publish new joint angles and the frame transformations will be updated automatically by those nodes.
I've only used rolling robots with ROS so far, with fixed joint angles, so I'm working from the tutorial information here. You need to do the following:
robot_state_publisher
and joint_state_publisher
, configuring joint_state_publisher
with the topics on which you want to publish joint states.You'll want to read the URDF tutorials: http://wiki.ros.org/urdf/Tutorials
Start with the tf
tutorial, then read 2.1, 2.2, and 2.4. Also read 4.5, which talks about how to publish joint states.
You'll probably also need to read the documentation for robot_state_publisher
and joint_state_publisher
:
And maybe the xacro documentation: http://wiki.ros.org/xacro