Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Gazebo's block laser plugin not printing out to a scan topic when gpu rays are used

I am trying to get a point cloud from gazebo's block laser plugin but I also have to use gpu rays since I need the rays to be able to pass through "glass". I cannot remove the collision tags of the glass for my application. Removing the visual tag is fine so I have done this and attempted to switch to gpu rays. The gpu rays appear in gazebo but they do not output to a topic. I have also tried the non-block gpu laser plugin (libgazebo_ros_gpu_laser.so) but this flattens out all the detected points as a scan on two dimensions.

Here is the gpu plugin excerpt from the robot's urdf:

<sensor name="block_lidar" type="gpu_ray">
    <visualize>true</visualize>
    <pose>0.0 0.0 0.0 0.0 0.0 0.0</pose>
    <ray>
        <scan>
            <horizontal>
                <samples>30</samples>
                <resolution>1</resolution>
                <min_angle>-0.614356</min_angle>
                <max_angle>0.614356</max_angle>
            </horizontal>
            <vertical>
                <samples>30</samples>
                <resolution>1</resolution>
                <min_angle>-0.614356</min_angle>
                <max_angle>0.614356</max_angle>
            </vertical>
        </scan>
        <range>
            <min>0.05</min>
            <max>90.0</max>
        </range>
    </ray>
    <plugin name="lidar_plugin" filename="libgazebo_ros_gpu_block_laser.so">
        <gaussianNoise>0.00</gaussianNoise>
        <alwaysOn>true</alwaysOn>
        <updateRate>20</updateRate>
        <topicName>/daedalus/laser_scan_${prefix}</topicName>
        <frameName>anchor_${prefix}</frameName>
    </plugin>
    <always_on>true</always_on>
    <update_rate>10.0</update_rate>
  </sensor>

And here is the non-block plugin excerpt:

<sensor type="gpu_ray" name="hokuyo">
        <pose>0 0 0 0 0 1</pose>
        <visualize>true</visualize>
        <update_rate>10</update_rate>
        <ray>
            <scan>
                <horizontal>
                    <samples>30</samples>
                    <resolution>1</resolution>
                    <min_angle>-0.614356</min_angle>
                    <max_angle>0.614356</max_angle>
                </horizontal>
                <vertical>
                    <samples>30</samples>
                    <resolution>1</resolution>
                    <min_angle>-0.614356</min_angle>
                    <max_angle>0.614356</max_angle>
                </vertical>
            </scan>
            <range>
                <min>0.05</min>
                <max>90.0</max>
                <resolution>0.01</resolution>
            </range>
            <noise>
                <type>gaussian</type>
                <mean>0.0</mean>
                <stddev>0.01</stddev>
            </noise>
        </ray>
        <plugin name="gazebo_laser" filename="libgazebo_ros_gpu_laser.so">
            <topicName>/daedalus/laser/scan_${prefix}</topicName>
            <frameName>anchor_${prefix}</frameName>
        </plugin>
      </sensor>

I am using ros noetic, gazebo 11.3.0 running on Ubuntu 20.04 and my graphics card is an Nvidia Geforce 940mx with driver version 450.119.03. ‚ÄčI would really appreciate any advice on how to get the gpu block laser printing to it's topic or how to get the expected 3D laser scan from the non-block laser plugin.