Gazebo | Ignition | Community
Ask Your Question

Ignition Gazebo: RayQuery()

asked 2020-02-10 15:22:34 -0500

jmoxoby gravatar image

Hi all,

I'm new to Ignition Gazebo and trying to understand the general architectural structure of it.

I'm building a new simple range sensor system plugin that will measure the distance along some direction using a ray query. To create a ray query I need a pointer to the underlying world scene (scene->CreateRayQuery()). My question is: how do I get a pointer to the scene when implementing the Configure/Update/PostUpdate functions?

Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-03-24 17:04:48 -0500

chapulina gravatar image

That sounds similar to a GPU lidar that has a single ray. Maybe using that sensor with the appropriate number of samples could work?

Creating custom sensors isn't well documented or well supported right now. But here are some ideas:

Here's the GPU lidar sensor implementation. On Ignition Gazebo, that's managed by the Sensors system. It should be possible for you to create a new sensor type, but I think some changes will be needed on ign-sensors and ign-gazebo to make sure you can load your sensor. I ticketed an issue for that.

Another option for now could be not to use ign-sensors and do all the calculations in an Ignition Gazebo system. You can create your own scene, or load the Sensors system and access its scene through the engine singleton. But you need to be careful about threading, since each system's PostUpdate runs in a different thread.

edit flag offensive delete link more


Can you please explain how to load Sensors system and access the scene in a plugin with Configure, Update, PostUpdate functions? I have been trying to write my sensor plugin but I cannot access the sensor itself.

agayev169 gravatar imageagayev169 ( 2020-05-15 02:46:26 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-02-10 15:22:34 -0500

Seen: 114 times

Last updated: Mar 24 '20