Problems when using lidar and camera on the same robot on Ignition

asked 2022-05-04 13:42:53 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi, I am trying to create a simple two-wheeled robot in Ignition using a xacro description file. I intend to spawn this robot with a lidar and a camera sensor and for both of each I use the plugin named "ignition::gazebo::systems::Sensors". The sensors are added to the robot xacro via macros, which contain the following snipets of code:

<gazebo reference="cam_front">
        <sensor name='${name}' type='camera'>
            <pose>${body_dim_x/2} 0 ${body_dim_z/2} 0 0 0</pose>
                <!-- <horizontal_fov>1.047</horizontal_fov> -->
                    <!-- <width>320</width>
                    <height>240</height> -->
                    <!-- <format>B8G8R8</format> -->
                <!-- <clip>
                </clip> -->

            <plugin filename="" name="ignition::gazebo::systems::CameraVideoRecorder">

<gazebo reference="base_lidar">
        <sensor name="${name}" type='gpu_lidar'>
            <pose>0 0 ${body_height*0.6} 0 0 0</pose>
            <!-- <pose>0 0 1.0 0 0 0</pose> -->
                        <!-- <samples>90</samples> -->
                    <!-- <min>0.08</min> -->

            <plugin filename="" name="ignition::gazebo::systems::Sensors">

When I try to spawn the robot with each sensor separately, they work correctly, as it can be seen in the image below.

image description

However when both of the sensors are included in the xacro, the simulator crashes and displays the following error:

image description

Could someone help me find what is causing this issue?

Gratefully, Lucas

edit retag flag offensive close merge delete