Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Querying collision geometry primitives from ROS in Gazebo 9?

Is there a way to query Gazebo from ROS to get the parameters of a <collision> geometry for the currently loaded world? For example, the radius of a sphere or the dimensions of a box?

I know I can query the world with a /gazebo/get_world_properties service call (or equivalent from C++) and get a list of model names.

I can query each model name and see the geom_names that make up the collision geometry, but I don't see a way to actually query those geometries further?

I can get the obstacles' poses easily enough with /gazebo/get_model_state service calls, but I'm not seeing where I can get the shape and size of the collision geometries to communicate that to my non-ROS planning code.

I can probably figure out how to side-load from the SDF or I can switch to spawning my obstacles from another node that posts their dimensions to the parameter server or something for later queries. But it'd be a fun bonus to actually read out the obstacles' current shape and size so I can also use Scale Mode in the GUI.

Is there a best-practices recipe for communicating the collision geometries of obstacles to ROS code?

Can this be done with a plugin?