ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
As far as I can tell you have all the pieces in place, you just need to change one thing:
<param name="use_gui" value="$(arg gui)"/> <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
Setting the use_gui
parameter will tell the joint_state_publisher
that you want it to broadcast (fake) joint states based on the values of the sliders in the UI that it spawns for you.
As in this case you already have a node publishing joint states, you don't need joint_state_publisher
at all. Just leave it out of your launch file and I expect things will start to work.
Note that in some situations, joint_state_publisher
is actually needed even when you have driver nodes interfacing with real hardware. One example would be if you have multiple drivers each publishing on a different topic and you want a single joint_states
topic that aggregates all the partial ones into a global JointState
. In that case you'd use the source_list
parameter to tell joint_state_publisher
which topics it should merge. See wiki/joint_state_publisher - Parameters for more info on that.
2 | No.2 Revision |
As far as I can tell you have all the pieces in place, you just need to change one thing:
<param name="use_gui" value="$(arg gui)"/> <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
Setting the use_gui
parameter will tell the joint_state_publisher
that you want it to broadcast (fake) joint states based on the values of the sliders in the UI that it spawns for you.
As in this case you already have a node publishing joint states, you don't need joint_state_publisher
at all. Just leave it out of your launch file and I expect things will start to work.
Note that in some situations, joint_state_publisher
is actually needed even when you have driver nodes interfacing with real hardware. One example would be if you have multiple drivers each publishing on a different topic and you want a single joint_states
topic that aggregates all the partial ones into a global JointState
. In that case you'd use the source_list
parameter to tell joint_state_publisher
which topics it should merge. See wiki/joint_state_publisher - Parameters for more info on that.
Edit: just noticed:
I tried removing the joint_state_publisher node in the launch file, thinking that was interfering with my custom publisher, but then when I launch Rviz, my model looks all mangled and it reports "no transformation" for all of my links. How do I fix that?
Make sure you have nodes publishing JointState
s for all the joints in your URDF. If you don't, robot_state_publisher
will not be able to do FK for all joints, leading to missing TF frames, and the error you saw.