Gazebo | Ignition | Community
Ask Your Question

Gazebo camera plugin does not see some models that are in the simulation

asked 2018-08-15 04:07:03 -0600

kinglm gravatar image

updated 2018-08-24 10:31:39 -0600


I created a simple rock model, the visual is a .dae file and the collision is a simple box of roughly the same size. I then add multiple clones of the rock randomly distributed on the floor of my gazebo world (at the end of the world described in test2.sdf) I have a robot equipped with the Gazebo camera plugin. If I look inside the gazebo client gui, the rocks appear along all the other elements, and with the camera previzualization activated, it seems the camera sees everything (screenshot 1). But when I open for example rqt_image_view to check out the feed from the camera topic, then my rocks disappear (screenshot 2)! All the other elements are still viewed... Any idea why? And more importantly, any ideas how to fix this? I would like my robot to be able to see the rocks, for it to be able to avoid them, pick them up, etc.

Screenshot 1

scene in gazebo

Screenshot 2

image topic view

Here are the files of my model


<?xml version="1.0"?>

  <sdf version="1.5">model.sdf</sdf>

    <name>Louis M</name>

    A Rock.


<?xml version="1.0" ?>
<sdf version="1.5">
  <model name="unit_box_1">
    <link name="link">
        <pose>-0.01 -0.012 0.15 0 0 0</pose>
      <collision name="collision">
        <pose>0 0 -0.46 0 0 0</pose>
            <size>0.05 0.05 0.2</size>
              <fdir1>0 0 0</fdir1>
      <visual name="visual">
        <pose>0 0 -0.46 0 0 0</pose>


<?xml version="1.0" encoding="UTF-8"?>
<COLLADA xmlns="" version="1.4.1">
            <authoring_tool>VCGLib | MeshLab</authoring_tool>
        <created>Wed Apr 25 01:36:10 2012</created>
        <modified>Wed Apr 25 01:36:10 2012</modified>
        <unit meter="0.00254" name="inches"/>
        <image id="texture0" name="texture0">
        <material id ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-10-10 01:50:19 -0600

kinglm gravatar image

The solution that worked for me was putting the model description directly inside the world .sdf file. Under the <model> tag, instead of <uri> I have <link> which contains the entire description (the same one that was in the model.sdf file).

So no more model.config or model.sdf. The collada (.dae) mesh file is still in a separate folder though.

I don't know what the reason behind this is, and it bloats the world file, but at least now my camera output topic contains the rocks!


edit flag offensive delete link more


My guess would be that GAZEBO_MODEL_PATH is not set correctly for rqt_image_view and thus the models are not loaded. I had similar problem when trying to run Gazebo client on another machine.

m.bahno gravatar imagem.bahno ( 2020-09-18 05:07:17 -0600 )edit

Question Tools



Asked: 2018-08-15 04:07:03 -0600

Seen: 2,923 times

Last updated: Oct 10 '18