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

Why is Gazebo not loading a model?

asked 2017-04-24 21:38:12 -0600

matrhint gravatar image

I am trying to work with Gazebo using xacro files. It seems that it works with Rviz, but there is no model in Gazebo. Please take a look at the files here: https://github.com/matrhint/model-pro... I am running Kinetic. I am using roslaunch lawnmow_description lawnmow_rviz.launch and roslaunch lawnmow_gazebo lawnmow_world.launch to test it out.

Thank you for any assistance.

edit retag flag offensive close merge delete

Comments

In your URDF and xacro files, you shouldn't have absolute paths to resources like meshes. Use the package:// syntax instead.

Geoff gravatar image Geoff  ( 2017-04-25 02:55:44 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2017-04-25 03:00:47 -0600

Geoff gravatar image

updated 2017-04-26 20:45:35 -0600

When I changed all the mesh paths in lawnmow.xacro to use the package:// syntax, Gazebo displayed the model when I launched lawnmow_world.launch. image description

For example, the first one I changed to:

package://lawnmow_description/meshes/frame.stl

I also had to add <intertial> tags to the lfcaster and rfcaster links, because Gazebo will not simulate links that do not have inertia information.

edit flag offensive delete link more

Comments

Thank you for your fast response! That is exactly what I want. I tried: <mesh scale="0.01 0.01 0.01" filename="package://lawnmow_description/meshes/frame.stl"/> and it didn't work for me. I then changed it to <mesh filename="package://lawnmow_description/meshes/frame.stl"/> another no-go.

matrhint gravatar image matrhint  ( 2017-04-25 19:01:59 -0600 )edit

Edit: I was changing the wrong file. Your suggestion was correct. Thank you for your fast response and clear answer!

matrhint gravatar image matrhint  ( 2017-04-25 19:29:39 -0600 )edit

Any ideas why the front casters aren't showing up in gazebo?

matrhint gravatar image matrhint  ( 2017-04-25 21:20:25 -0600 )edit
2

You don't have <intertial> tags in the two caster links. Gazebo will only use links that have intertia information.

Geoff gravatar image Geoff  ( 2017-04-26 02:38:23 -0600 )edit

You are my hero, but it didn't work. I copied the <inertial> information from the left_wheel and placed it after the </visual> tab, but still no casters.

matrhint gravatar image matrhint  ( 2017-04-26 04:51:10 -0600 )edit

Can you put a copy of your lawnmow.xacro somewhere so I can see? I did exactly that and I get casters.

Geoff gravatar image Geoff  ( 2017-04-26 18:39:22 -0600 )edit

I updated it on the github. Thanks again.

matrhint gravatar image matrhint  ( 2017-04-26 18:55:21 -0600 )edit

Using your exact source in Kinetic, and running roslaunch lawnmow_gazebo lawnmow_world.launch, I get casters. Does Gazebo print any errors at all? Have you tried cleaning your workspace?

Geoff gravatar image Geoff  ( 2017-04-26 19:31:41 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2017-04-24 21:38:12 -0600

Seen: 2,314 times

Last updated: Apr 26 '17