Acmece / rl-collision-avoidance

Implementation of the paper "Towards Optimally Decentralized Multi-Robot Collision Avoidance via Deep Reinforcement Learning"
https://arxiv.org/abs/1709.10082
326 stars 92 forks source link

dynamic obstacle model #10

Closed EcustBoy closed 4 years ago

EcustBoy commented 4 years ago

nice job! Besides,I remember dynamic obstacle is also considered in the original paper, I wanna consult that how to set dynamic obstacle model in the stage simulator~~

Acmece commented 4 years ago

Hi, @EcustBoy

You may add new obstacle by modifying the .world file like (https://github.com/Acmece/rl-collision-avoidance/blob/40bf4f22b4270074d549461ea56ca2490b2e5b1c/worlds/stage1.world#L126)

After that, you can identify the id of the obstacle, say 12. Then, the ros topic robot_12/cmd_vel and robot_12/cmd_pose is for this obstacle. You can implement the moving obstacle, in the logic you want, by publishing messages to these topics. Please refer to (https://github.com/Acmece/rl-collision-avoidance/blob/40bf4f22b4270074d549461ea56ca2490b2e5b1c/stage_world1.py#L48)

I may add this feature in the future, Thank you very much.

EcustBoy commented 4 years ago

Thanks for your detailed answer! Your project gives me lots of help~