Road texture does not show in camera sensor data

Issue #1858 new
Nate Koenig created an issue

Comments (7)

  1. Ian Chen

    How are you creating the roads? It doesn't look like the default one that's created by the <road> sdf element. Is it a <model> with your own mesh?

  2. Unknown Name

    The roads are created by a plugin with custom material. I figured out that this issue ONLY occurs when the camera is inserted from the "insert" tab bar when gazebo is already running. When the camera is loaded from a world-file at startup, everything is shown normal.

  3. Ian Chen

    ok. Can you give more details on how the model is created in the plugin? Did you create the roads by publishing an SDF string to ~/factory topic?

    If the model only shows up in gzclient, one reason could be that it's a client-side only visual. In order for a model to show in the camera sensor, it has to be spawned on the server side.

  4. MarcZofka

    Hi,

    this issue appears with Gazebo 6.5.1 as well as with Gazebo 8.6.0. We have implemented a WorldPlugin, which parses a RoadNetwork and then heuristically converts the roads into road messages, which are published over a registered publisher:

      m_road_publisher = m_node->Advertise<msgs::Road>("~/roads", 10000); // publish for visualization
    

    Irrespectively, wether custom or the default gazebo road textures are used, such message looks like:

    name: "Road_1_3531551"
    width: 6
    point {
      x: -358.30692360555969
      y: 196.53521005846258
      z: 0.05
    }
    point {
      x: -334.35436988133006
      y: 183.50174461258575
      z: 0.05
    }
    point {
      x: -305.99414504831657
      y: 167.79828227683902
      z: 0.05
    }
    point {
      x: -288.27405962743796
      y: 158.47638747887686
      z: 0.05
    }
    point {
      x: -277.98349802428856
      y: 152.77515100967139
      z: 0.05
    }
    [...]
    
    material {
      script {
        uri: "file://media/materials/scripts/gazebo.material"
        name: "Gazebo/Primary"
      }
    }
    

    We have recognized that the gzclient as well as the server gets problems, if we publish a bunch of messages, starting from publishing ~20 messages (for each road segment or intersection a separate one): Some roads are visualized and some are not. This even differs between the gzclient and the elements visualized on the gzserver (captured by a virtual camera). We attached an exemplary screenshot to demonstrate this effect:

    Road_errors.png

    Varying the publishing rate of the publisher to 50, but also 100Hz seems also to worsen the problem. We assume that this is due to lost messages between the pugin's publisher and the gzclient and gzserver-specific subscriber.

  5. Log in to comment