Home | Tutorials | Wiki | Issues
Ask Your Question

Revision history [back]

Each physics engine implements a ray shape. For example, here is ODE's ray shape.

You really only need to worry about the main definition of ray shape .

If you are using a RaySensor, then most of the modifications you can do to the ray shape are exposed through SDF. Here is the SDF ray sensor spec.

Can you describe what you're trying to do?

Each physics engine implements a ray shape. For example, here is ODE's ray shape.

You really only need to worry about the main definition of ray shape .

If you are using a RaySensor, then most of the modifications you can do to the ray shape are exposed through SDF. Here is the SDF ray sensor spec.

Can you describe what you're trying to do?

Edit

Thanks for updating your question. Your project sounds like a great idea. Here is some background. A RayShape is a single line that with a start and end point. The primary purpose of a RayShape is to detect collisions. RayShapes are used primarily by CPU-based LiDAR sensors in Gazebo.

The "shape" of a RayShape can only be a straight line, see the RayShape API. A MultiRayShape is basically a collection of RayShapes, see the MultiRayShape API. You could construct a cone multiray shape using MultiRayShape::SetRay.

The MultiRayShape was intended to be used for LiDAR sensors. For exampl, its Init function creates the individual rays based on SDF data.

However, you should be able to use MultiRayShape in your own Sonar Sensor by using MultiRayShape's API.