0
$\begingroup$

I have the navigation stack working in ROS Kinetic on my computer. In Stage ROS simulations, I can specify the goal and the robot navigates to it. I need to count the number of collisions (if any) that occurred as it traverses to the goal. How can I go about achieving this ?

$\endgroup$

1 Answer 1

1
$\begingroup$

Collisions with? If you have an occupancy map, then you can check with that and the robot's base_link. If the objects are static then just having their positions will be enough to check the collisions. It completely depends on the robot and the application.

$\endgroup$
3
  • $\begingroup$ I apologize, should have made this clearer. I meant collisions with obstacles (both static and dynamic) and yes I am using an occupancy grid. How do you use it to check collisions? $\endgroup$
    – rob_newbie
    Aug 9, 2021 at 21:05
  • $\begingroup$ Don't know quite about the dynamic obstacles but for static at every instant check for the occupancy grid at your robot's location, if the occupancy grid indicates an obstacle(above a certain threshold) then you can count it as a collision. If you want to avoid the obstacles then use this kind of approach.youtube.com/watch?v=JpKkfWxbqqg&t=195s . Here he uses pygame module which already has collision detection module. $\endgroup$
    – Sankeerth
    Aug 10, 2021 at 8:16
  • $\begingroup$ That makes sense. thank you. $\endgroup$
    – rob_newbie
    Aug 11, 2021 at 20:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.