I have an issue spawning my URDF model in gazebo. It works fine in rviz but when I launch it in gazebo the model shows up in model parameters but I don't get any visuals.


My theory is that since gazebo converts URDF to SDF when spawning, the path pointing to the model changes in from.

In my code (URDF):

    xyz="0 0 0"
    rpy="0 0 0" />
      filename="package://diff_drive/meshes/visual/casterWheelLeft.STL" />
      rgba="0.752941176470588 0 0 1" />

In Gazebo:


This is my full code: github.com/drec0xy/diff_drive

I'm using ROS2 Humble and Gazebo 11.

To reproduce the error add the package in a colcon work space and build using colcon, run the launch file: launch.py


2 Answers 2


If you replace all the mesh filenames from:



filename="file://$(find diff_drive)/meshes/visual/casterWheelLeft.STL"

and also remove the following line from the launch file:

os.environ['GAZEBO_MODEL_PATH'] = os.path.join(get_package_share_directory(package_name),'meshes','visual')

I think gazebo was just not able to load the mesh files, since you can see the center of masses, inertias, wireframes, but only the model was not visible (you can see those using the view option in gazebo GUI).

Additionally, raise the spawning z-coordinate.

  • $\begingroup$ Thank y'all very much for taking time to look at my issue I really appreciate. $\endgroup$
    – drec0xy
    Jan 5 at 21:26

I could solve the issue by adding this line to package.xml

<gazebo_ros gazebo_model_path = "/home/drec0xy/willa_bot/install/diff_drive/share/"/> <!--line added-->

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.