robot_model_visualization: joint_state_publisher
Package Summary
A node for publishing joint angles, either through a gui, or with default values.
- Author: David Lu!!
- License: BSD
- Repository: wg-kforge
- Source: hg https://kforge.ros.org/robotmodel/visualization
Contents
Overview
This package publishes sensor_msgs/JointState messages for a robot. The package reads the robot_description parameter, finds all of the non-fixed joints and publishes a JointState message with all those joints defined.
There are four possible sources for the value of each JointState.
- Values directly input through the GUI
JointState messages that the node subscribes to (see the source_list parameter)
- The value of another joint. Currently this is implemented through the dependent_joints parameter. In the future it will use the mimic tag.
- The default value. The default value is zero, or if zero is not a permissible value, (max+min)/2.
If a GUI is present, the package displays the joint positions in a window as sliders. Each slider is set to the joints' min and max limits, except for continuous joints, which range from -Pi to +Pi.
This node also lets you constrain certain joints to be equal to other joints, or multiples of other joints. For example, if you had two separate joints for two wheels, but wanted them to turn at the same rate, you could constrain the rotation of one to be equal to the other. Or, if you had two unequally sized pulleys, and wanted to have one pulley drive the other, you could constrain the second pulley to turn 3 times as fast as the other. As mentioned above, this is set with a parameter currently, but in the future will use the mimic tag information.
joint_controller
Publishes joint states, read from GUI. Can be used in conjunction with the robot_state_publisher node to publish joint states and transforms.Published Topics
/joint_states (sensor_msgs/JointState)- Joint State for each non-fixed joint in the robot
Parameters
/robot_description (String, default: None)- Contents of the URDF file for the robot
- The keys in the map are the names of the constrained joints. The values are maps which define a parent joint name, and optionally, a factor which to multiply the parent's value by to get the constrained joints value. An example yaml file can be seen below.
- Rate at which joint states are published
- Boolean flag to use the GUI or not
- A list of topics to listen on for Joint States.
Example yaml File for dependent_joints Parameter
dependent_joints:
joint_D: {parent: joint_A, factor: 3 }
joint_E: {parent: joint_B }
joint_F: {parent: joint_C, factor: -1 }





