dwa_planner
dwa_planner copied to clipboard
Hello,I have some fool questions
How can I realize the dwa like your gif ? Do I need the local_map ?
Thanks for your question.
There are two ways to perform.
The first is to input the LiDAR scan data. In this case, there is no need to generate the local map by yourself.
Specifically, dwa_planner
will subscribe to /scan
.
The second method is to input a pre-generated local map.
Specifically, dwa_planner
will subscribe to /local_map
.
You can switch between these by setting the USE_SCAN_AS_INPUT
parameter to true
or false
when you launch.
Thanks for your reply, I am new to ros, how can I make the moving squares like the gif shows. I realize the dwa_planner on the static map, but I want to test it with moving obstacle. Hope for your reply.
Actually, DWA can be used regardless of the dynamic or static environment.
All you have to do is to update the local map periodically according to the observations by LiDAR and so on.
(If USE_SCAN_AS_INPUT=true
, you don't even need to do that.)
The gif animation is achieved by randomly moving virtual obstacles of appropriate size. ROS comes with a visualization tool called rviz which makes it easy to visualize like the gif.
Hello, I want to use dwa algorithm as a local path planning algorithm (local path planning uses A* algorithm). We have a hierarchical map, how to use the dwa algorithm for local obstacle avoidance? Must update the local map in real time?
Hello. Yes, DWA needs local map updating in real time basically.
But if you have a LiDAR with ROS support, you can easily try obstacle avoidance using our DWA. In this case, please switch USE_SCAN_AS_INPUT parameter to true and publish a /scan topic from LiDAR before launching DWA. (Please see the comments above for details.) Our system will automatically generate or update local map, and you can see your robot avoiding obstacles.
你好。 是的,DWA 基本上需要实时更新本地地图。
但是,如果您拥有支持 ROS 的 LiDAR,则可以使用我们的 DWA 轻松尝试避障。 在这种情况下,请在启动 DWA 之前将 USE_SCAN_AS_INPUT 参数切换为 true 并从 LiDAR 发布 /scan 主题。 (详情请见上面的评论。) 我们的系统会自动生成或更新本地地图,您可以看到您的机器人避开障碍物。
How do you implement this part on ros? I tried for a long time without success, or can you share the code of this part?
You can check DWA implementation in dwa_planner/src/dwa_planner.cpp
.
What kind of errors do you encount when launching /local_planner/dwa_planner
node?
Please shere error messages with us if you can.
您可以在
dwa_planner/src/dwa_planner.cpp
. 启动/local_planner/dwa_planner
节点时会遇到什么样的错误? 如果可以,请向我们提供错误消息。
I have been unable to subscribe to sacn topics, what is the reason?