Skip to content

GpuLidar issue using ogre2 as render engine #504

@dadaroce

Description

@dadaroce

Environment

  • Ubuntu 24.04
  • Binary
gz sim --versions
8.7.0

Description

  • The LiDAR GPU should perform similarly without degrading the quality of the laserScan by using OGRE2 instead of OGRE as the render engine

The image below shows a LiDAR with some tilt having the expected feedback. A straight line at the intercept and the rays do not cross the plane.
Image

  • However, when using OGRE2 as render engine, the quality is degraded, the LiDAR intercept with the ground has different measures as it moves away from the LiDAR and forms a kind of V or angles between the front of the LiDAR and the intercept (seen from above in the image below).

Image

Even at certain LiDAR tilt angles, the rays pass through the ground and go beyond the supposed intercept with the ground.

Top View:
Image

Bottom View:
Image

Steps to reproduce

  1. Using a simple plane and LiDAR in a world, and define the render engine as ogre2 made it happen

Launch the below file and make it the floor transparent, you will see something like

Image

<?xml version="1.0" ?>
<sdf version="1.7">
  <world name="default">
    <physics name="1ms" type="ignored">
        <max_step_size>0.001</max_step_size>
        <real_time_factor>1.0</real_time_factor>
    </physics>
    <plugin
        filename="gz-sim-physics-system"
        name="gz::sim::systems::Physics">
    </plugin>
    <plugin
        filename="gz-sim-user-commands-system"
        name="gz::sim::systems::UserCommands">
    </plugin>
    <plugin
        filename="gz-sim-scene-broadcaster-system"
        name="gz::sim::systems::SceneBroadcaster">
    </plugin>
    <plugin
        filename="gz-sim-sensors-system"
        name="gz::sim::systems::Sensors">
        <render_engine>ogre2</render_engine>
    </plugin>

    <!-- Define the plane object -->
    <model name="plane">
      <static>true</static>
      <pose>0 0 0.01 0 0 0</pose> <!-- Place it at the origin -->
      <link name="plane_link">
        <visual name="plane_visual">
          <geometry>
            <box>
              <size>1000 1000 0.01</size> <!-- Plane with a minimum thickness -->
            </box>
          </geometry>
          <material>
            <ambient>0.5 0.5 0.5 1</ambient> <!-- Light gray plane -->
            <diffuse>0.5 0.5 0.5 1</diffuse>
          </material>
        </visual>
      </link>
    </model>

    <!-- Define the GPU LIDAR sensor -->
    <model name="gpu_lidar">
      <static>true</static>  
      <pose>0 0 0.125 3.1354 -0.0062 0</pose> Position the lidar slightly above the ground
      <link name="lidar_link">
        <sensor name='gpu_lidar' type='gpu_lidar'>"
            <pose>0 0 0 0 0 0</pose> <!-- Keep Sensor Pose Aligned -->
            <topic>/lidar</topic>
            <update_rate>10</update_rate>
            <ray>
                <scan>
                    <horizontal>
                    <samples>640</samples>
                    <resolution>1</resolution>
                    <min_angle>0</min_angle>
                    <max_angle>6.28318530718</max_angle>
                    </horizontal>
                    <vertical>
                    <samples>1</samples>
                    <resolution>0.01</resolution>
                    <min_angle>0</min_angle>
                    <max_angle>6.28318530718</max_angle>
                    </vertical>
                </scan>
            <range>
                <min>0.08</min>
                <max>50.0</max>
                <resolution>0.01</resolution>
            </range>
            <noise>
              <type>gaussian</type>
              <mean>0.005</mean>
              <stddev>0.019</stddev>
            </noise>
            </ray>
            <always_on>1</always_on>
            <visualize>true</visualize>
        </sensor>
      </link>
    </model>

  </world>
</sdf>
  1. On the other hand, using ogre as the engine render. You'll see something similar to the image below:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Inbox

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions