ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Visualizing continuous and revolute joint types in rviz

asked 2011-02-19 00:51:17 -0600

updated 2011-06-29 20:29:12 -0600

mmwise gravatar image

When creating a URDF file for a robot with a head on a pan and tilt mechanism, whenever I try to use a joint type "continuous" or "revolute" in a manner similar to that shown in the tutorials the model is displayed within Rviz as a disorganized jumble. If I change the joint type to "fixed" then the model displays normally. The model also seems to check out ok using check_urdf, and no URDF errors show up when Rviz is loading. This seems to be a bug, since the same thing happens with the tutorial file 06-flexible.urdf

I'm using the current cturtle full binary installation on Ubuntu 10.10.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
4

answered 2011-02-19 02:11:55 -0600

updated 2011-06-29 19:25:27 -0600

hsu gravatar image

For non-fixed joints you need some source that publishes the joint states, otherwise the model cannot be displayed correctly, as the state of the joints is unknown.

A simple launch files for testing a URDF model in rviz using the joint_state_publisher looks like this:

<launch>
<param name="robot_description" command="$(find xacro)/xacro.py $(find yourrobot_urdf)/yourrobot/robot_base.urdf.xacro" />
<param name="use_gui" value="True"/>
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" ></node>
<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
<node name="rviz" pkg="rviz" type="rviz" />
</launch>
edit flag offensive delete link more

Comments

Ah, ok, that could be it!
JediHamster gravatar image JediHamster  ( 2011-02-19 02:16:28 -0600 )edit

Should I change robot_description to others? I got error "Cannot load command parameter [robot_description]: ...". I'm using Groovy. Thanks!

Yantian_Zha gravatar image Yantian_Zha  ( 2014-04-21 19:42:09 -0600 )edit

Hard to say what is wrong in your case without more information. You should probably create a new question with a detailed problem description.

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2014-04-21 20:57:31 -0600 )edit
0

answered 2011-02-20 01:39:41 -0600

Panic over. The solution ended up being firstly to install joint_state_publisher (it would be helpful if there was some reference to this in the tutorial), then subsequent problems turned out to be an error in my URDF file. An XML comment inside an XML comment left urdf_check unphased, but tripped up the XML document parser used by joint_state_publisher.

edit flag offensive delete link more
-1

answered 2011-02-19 09:32:55 -0600

Hmmm. Looks like it can't find the joint_state_publisher package:

ERROR: cannot launch node of type [joint_state_publisher/joint_state_publisher]: Cannot locate installation of package joint_state_publisher: [rospack] couldn't find package [joint_state_publisher].

edit flag offensive delete link more

Comments

David Lu gravatar image David Lu  ( 2011-02-19 10:08:51 -0600 )edit
Even with joint_state_publisher installed and built, I still get the error: [joint_state_publisher-2] process has died [pid 3166, exit code 1] on Rviz startup. Is there anything else that this package requires?
JediHamster gravatar image JediHamster  ( 2011-02-19 21:07:57 -0600 )edit
Does running joint_state_publisher from outside of the launch file give you any additional error message?
David Lu gravatar image David Lu  ( 2011-02-20 01:18:34 -0600 )edit

Try checking your permissions. I know when I had this error, it was easily corrected when I added executable permissions

mortonjt gravatar image mortonjt  ( 2013-05-22 05:47:53 -0600 )edit

Question Tools

Stats

Asked: 2011-02-19 00:51:17 -0600

Seen: 3,660 times

Last updated: Jun 29 '11