Gazebo | Ignition | Community
Ask Your Question

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

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

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

1 Answer

Sort by ยป oldest newest most voted

answered 2023-05-04 06:15:54 -0600

Torben gravatar image

have you tried moving the plugin out of the sensors xacro files in to the Robot xacro files for me this is working fine. Cleaner and future proof would be to call the plugin from the world file like but I'm also currently strugeling on this step but as long as you have only one robot in the simulation this will work.

edit flag offensive delete link more

Question Tools



Asked: 2022-05-04 13:42:53 -0600

Seen: 204 times

Last updated: May 04