Ask Your Question
1

Robot looks different in RVIZ and Gazebo

asked 2011-10-04 22:50:34 -0600

ZdenekM gravatar image

updated 2011-10-06 23:03:55 -0600

Hello,

I make very basic URDF model of robot (ackermann like) - just box with four wheels and steering joints for front wheels. In RVIZ robot looks OK and there is no error (screenshot: http://mysharegadget.com/106788214). But when spawned in Gazebo it has no wheels and there are just rear wheels joints. Where might be problem? Robot also shakes himself and travel around, which is another problem - is it due to missing gazebo controller? I upload whole my package here.

Update: I make model simpler - without steering joints. Now I can see in Gazebo even front wheels joints, but still no wheels. Model in RVIZ looks still ok. Updated package can be downloaded here.

Thanks for advices.

edit retag flag offensive close merge delete

Comments

Link should be http://mysharegadget.com/203753753 (without the period)
David Lu gravatar imageDavid Lu ( 2011-10-05 04:35:58 -0600 )edit
Thanks! It's fixed.
ZdenekM gravatar imageZdenekM ( 2011-10-05 04:41:33 -0600 )edit

1 Answer

Sort by » oldest newest most voted
3

answered 2011-10-09 22:54:58 -0600

  • It's moving because the masses were set way too high. The inertial tensors correspond to something around 50 kg of mass, and the "mass" was set to 5 tons for the base and 0.5 tons for the wheels. Reduced that. I found Wikipedia's list of inertia tensors quite helpful.
  • The visual and collision model of base_link did not match (that's why the robot appeared to be "floating").
  • The wheels had no collision model (that's why they didn't show up).
  • Transmissions for front wheels were commented out (that's why there were no joint_states published for them).

Also, there were some minor problems:

  • use_sim_time has to be set to "true". Fixed in launch file.
  • Don't run the joint_state_publisher while gazebo is running. Both publish joint_states and will interfere. Removed it from launch file.
  • karlik.xacro: The <joint> element shouldn't have a sub-element <joint_properties>. AFAIK, it's not defined anywhere and confuses things like the joint_state_publisher. Deleted those lines.

You can get the fixed version here.

edit flag offensive delete link more

Comments

Thanks for your time! Your answer helps me a lot. So, the visual and collision model must be the same? I read somewhere that collision model can be simpler than visual so I thought they can differ.
ZdenekM gravatar imageZdenekM ( 2011-10-10 19:28:09 -0600 )edit
Yes, the collision model can be different from the visual model. However, in your case the collision model was offset quite a large distance from the visual, and so the wheels wouldn't touch the ground. You can visualize this in RViz: select "Robot model" and check the box "collision enabled".
Martin Günther gravatar imageMartin Günther ( 2011-10-10 20:49:20 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

Asked: 2011-10-04 22:50:34 -0600

Seen: 1,803 times

Last updated: Oct 09 '11