How to determine whether there is an obstacle between two robots?
We are simulating a swarm of UAVs collaboratively explore an environment with inter-UAV communication based on the line of sight between them. To do this we would like to know if there is a wall or object between two robots. Is there any way we can determine if there is an object between the two UAVs?
Asked by Brytsk Nguyen on 2023-05-08 09:54:27 UTC
Answers
Maybe you can check the function gazebo::rendering::Scene::FirstContact
. It uses a camera and a pixel position (can be the camera's center) to obtain the 3D position of the first thing the ray from the camera through that pixel hits a visual. Another function is gazebo::rendering::Scene::VisualAt
, which gives you the visual instead of the hit position. Note that both see the visuals, not collisions.
Asked by Veerachart on 2023-05-11 01:52:05 UTC
Comments