Robotics StackExchange | Archived questions

How does DWA works in relation to global planner?

I'm trying to understand how DWA works by looking at this implementation

https://github.com/AtsushiSakai/PythonRobotics/blob/master/PathPlanning/DynamicWindowApproach/dynamic_window_approach.py

I try to make the connection with global planner. I don't see where global planner comes into play.

How does all of this work in the DWA implementation of ros? Thanks a lot.

Asked by kiko453 on 2019-10-23 08:19:48 UTC

Comments

Please realise that the code you link to appears to be a completely ROS-agnostic implementation. I don't know whether you'll receive any answers here, as on ROS Answers, we typically tend to discuss ROS-related topics and questions.

Asked by gvdhoorn on 2019-10-23 08:31:09 UTC

my questions are however general related and therefore also ROS related. I just wanted to cite the resource I'm learning DWA from.

Asked by kiko453 on 2019-10-23 08:38:15 UTC

I'm inclined to agree with @gvdhoorn, this isn't a ROS question. That implementation is independent to all of your followups.

Asked by stevemacenski on 2019-10-23 12:02:46 UTC

Answers

DWA is really more of a controller - not a planner. Given a trajectory (which in ROS is simply an array of geometry_msgs/Pose), and the current position of the robot (again, another Pose message), it will compute the best command to apply to the mobile base at that instant in time (in ROS, a geometry_msgs/Twist message). If you run the DWA algorithm at a high enough frequency (20-50hz), you can "follow" the plan pretty accurately.

In the ROS implementation, the "trajectory" is nothing but a series of poses - there is no time-parameterization, etc. This trajectory is created by a global planner (which, really, is the only real "planner" since DWA really is more of a "controller").

The ROS implementations are located here: https://github.com/ros-planning/navigation

Asked by fergs on 2019-10-23 21:58:01 UTC

Comments

I am also trying to sort out how this is working because I am having issues with it. But to answer your questions specifically

Looking at the ROS implementation here is more info on the inputs

The question about knowing where the obstacles are. It uses a costmap. This is set it initialize in dwa_planner_ros and then is passed to dwa_planner in its constructor

The question about the trajectory is the global plan This is set it initialize in dwa_planner_ros and then is passed to dwa_planner in its constructor. as fergs said the global plan is just a set of pose

Other information velocity max and mins are sent in and they are split into linear x and theta z velocities from the min (which should be negative) to the max and put into 2 array of potential velocities to be used. this is done in planner_util I think. Also the robot's current velocity and position are passed in.

Asked by ed on 2019-12-07 09:53:41 UTC

Comments