How to stop robot if it encounters with dynamic object ?

asked 2018-07-03 11:14:50 -0500

Developer gravatar image

updated 2018-07-03 11:16:11 -0500

Hi

I want my robot just to stop if it encounters with a dynamic obstacle. Currently, I stop the robot with the laser sensor distance value (if any obstacle is in the range, then stop), but it is not an elegant and reliable solution. How can I do that?

thanks

edit retag flag offensive close merge delete

Comments

Please elaborate, especially why the solution you have is not sufficient. This is the way I would have done it as well (or have it integrated into the local planner). Also, what does stop mean for you? Stop completely? Drive around (actually, dwa_local_planner) should do that already...

mgruhler gravatar image mgruhler  ( 2018-07-04 01:11:08 -0500 )edit

@mgruhler: Hi. My solution is not sufficient, because it is not integrated into local planner. It means, robot stops not only against dynamic objects,but also static object (for example: if any wall is in the range). Stop means for me: just holds the robot its position (stop completely). Thanks

Developer gravatar image Developer  ( 2018-07-04 02:50:19 -0500 )edit

alright, but this requires you to distinguish between a dynamic and a static object. This is not possible directly in ROS. You would have to implement this classification yourself. You could work around this by making dynamic=unknown and static=known objects, loading a map and removing all the ...

mgruhler gravatar image mgruhler  ( 2018-07-04 05:34:40 -0500 )edit

objects you already know. For this, I'd suggest to implement a costmap layer that reads a static_map topic, treats those values as "to be removed" and just adds the ones that are not in there yet...

mgruhler gravatar image mgruhler  ( 2018-07-04 05:35:33 -0500 )edit

I got it. Thanks for the suggestion. What you think about this idea: In ROS DWA woks to create velocity commands (control) and to make collision avoidance. So, Do you think,is it somehow possible to manipulate DWA to create zero velocities, if it detects a dynamic object (for example another robot).

Developer gravatar image Developer  ( 2018-07-04 06:14:41 -0500 )edit

move_base and thus any local planner plugin works on costmaps. So you still have the same problem with distinguishing static from dynamic obstacles. Thus, you are still stuck with the same problem. If this is solved, sure. Make DWA send zero velocities or abort the plan.

mgruhler gravatar image mgruhler  ( 2018-07-04 06:27:42 -0500 )edit

I got it. Than, for the second part of your comment: How would you let DWA generate not new trajectories, but zero velocity?

Developer gravatar image Developer  ( 2018-07-04 06:39:22 -0500 )edit