Hello,
I would like to use both `DWAPLanner` and my own local planner on a robot, and depending on the situation switch between these two local planners.
Is it a way in Navigation stack to plug two local planners and switch between them?
Thanks
↧
Switching between Two Local Planners in Navigation
↧
DWAPlannerROS vs TrajectoryPlannerROS
Hi all,
I am currently looking to implement my own local planner plugin for the navigation stack. I was looking at DWAPlannerROS and TrajectoryPlannerROS to help me start with. Though I am not sure I understand the relation between these 2 planners. Are they just 2 different local planners or is one part of the second?
I am asking because, as far as I understand from [this wiki](http://wiki.ros.org/base_local_planner) and [the source](https://github.com/ros-planning/navigation/blob/hydro-devel/base_local_planner/include/base_local_planner/trajectory_planner_ros.h), the DWA algorithm is implemented twice. Once in TrajectoryPlannerROS and another time in DWAPlannerROS.
Am I correct in saying so? And if so, is there a reason why the DWA is coded twice?
Now, if I understand [this section](http://wiki.ros.org/base_local_planner#Generic_Local_Planning), I believe the recommended way to implement a new local planner plugin is to inherit DWAPlanner. Do you confirm?
I am asking because there is a [clean tutorial](http://wiki.ros.org/navigation/Tutorials/Writing%20A%20Global%20Path%20Planner%20As%20Plugin%20in%20ROS) so as to write custom global planners, but I could not find an equivalent for local planners.
Thanks,
Antoine.
↧
↧
Move_base/dwa parameters for a large robot with rotation center in the front
Edit 1: Video Link to Trial 1- [link text](http://youtu.be/c8W49WZOCWA)
Edit 2: Video Link to Trial N - Working but not perfect system: [here](http://youtu.be/LzyMQVSJvzY)
Dear Navigation experts and other respective ROS users,
I have been struggling with an annoying problem for a while which I hope you can help me to solve it.
**Robot properties:**
I have a robot with the following size: **70x60x50(L,W,H)**. (Volksbot RT3 differential drive, modified and bigger). This robot has two maxon 150w engines, and two maxon controllers with 74:1 gears.
The rotation centre of the robot is on the front axis of the robot, and therefore I have the base_link and base_footprint on that point. This point is 12cm behind from the front of the robot.
We use ROS Hydro, Ubuntu 12.04
Sensors:
Laser: in the front
- Front_rotating_xtion -> down sampled to leaf size of 5cm
- Back_fixed_xtion -> down sampled to leaf size of 5cm
- I use multiple obstacle layers so the sensors do not overwrite each other
Note: We started using xtions/kinect since Fuerte, and we always had to make two observation sources for one camera, and set one for marking and the other for clearing. Otherwise it wouldn't work. (Perhaps it changed but we didn't try)
**Problem**
When I give a navigation goal, the global plan is somewhat reasonable. I intentionally increased the inflation radius in the global costmap to avoid having tricky situation.
My problem is that the dwa local planner puts the robot in very a difficult situations, and the robot gets stuck easily while there is a clear solution to the movement problem. Instead of following the path, it likes to stick to obstacles, and get itself stuck. When stuck, it keeps oscillating instead of move in reverse and correct its path.
I do not penalize negative_x movement because the robot can see its behind pretty good.
I read all the documentations for all sections of move_base. I changed a lot of variables to see the effect, but none of them really satisfied me, because the robot gets stuck so easily, and it doesn't get out of it.
Below the text are my move_base parameter files (Hopefully it can be also used as a reference for people who are trying to get hydro style move_Base to work with multiple sensors):
**The things I have tried:**
For DWA robot configuration parameters, I checked the plotted cmd_vel versus the odometry reading. The perfect plot match was with the given parameters below. (I used rqt_plot)
- I fiddled around with all the Forward simulation parameters, and the trajectory scoring parameters.
- I increased/decreased the inflation radius for both local and global costmap, and increase/decreased their resolution.
- I tried changing the reference frame to the centre of the robot instead of centre of rotation.
- I fiddled around with controller_frequency and planner and controller patience.
- I checked whether the TF matches the robot (with xtions veiwing the robot)
- I will prepare a video link and add it here so you can view the problem better.
**Things I would like to know**
I would greatly appreciate any hint or direction to a better results. Meanwhile I have some more directed questions.
1. How does the dwa_local_planner know about the rotation axis length of the robot? Is it from the footprint?
2. My footprint is a simplified almost rectangular bounding box of the robot. Does it make a difference If I make it precise enough to exactly match the footprint of the robot?
3. Is the Cost value example in the dwa_local_planner webpage that is calculated from the goal_distance , path_distance and occdist values a positive (the high the better path) or negative value? On top of the page it talks about a scoring trajectory but below the example is cost, so I am a bit confused.
4. Do you know why the robot fails while there is a clear solution available?
Move_base launch file:
Common Costmap params:
map_type: costmap
footprint: [ [0.1, -0.28], [0.1, 0.28], [-0.58, 0.25], [-0.58, -0.25] ]
footprint_padding: 0.0
inflation_radius: 0.2
obstacle_layer_xtions:
back_point_cloud_sensor: {clearing: false, data_type: PointCloud2, expected_update_rate: 0.4, obstacle_range: 1.5, raytrace_range: 2, marking: true, min_obstacle_height: 0.1, sensor_frame: back_xtion_link, topic: back_xtion_voxel_grid/output}
back_point_cloud_sensor2: {clearing: true, data_type: PointCloud2, expected_update_rate: 0.4, obstacle_range: 1.5, raytrace_range: 2, marking: false, min_obstacle_height: -0.1, sensor_frame: back_xtion_link, topic: back_xtion_voxel_grid/output}
front_point_cloud_sensor: {clearing: false, data_type: PointCloud2, expected_update_rate: 0.4, obstacle_range: 2.5, raytrace_range: 3, marking: true, min_obstacle_height: 0.1, sensor_frame: front_xtion_link, topic: front_xtion_voxel_grid/output}
front_point_cloud_sensor2: {clearing: true, data_type: PointCloud2, expected_update_rate: 0.4, obstacle_range: 2.5, raytrace_range: 3, marking: false, min_obstacle_height: -0.1, sensor_frame: front_xtion_link, topic: front_xtion_voxel_grid/output}
obstacle_layer_laser:
laser_scan_sensor: {clearing: true, data_type: LaserScan, expected_update_rate: 0.1, marking: true, obstacle_range: 4, raytrace_range: 6, sensor_frame: laser, topic: scan}
Local Costmap:
local_costmap:
global_frame: map
robot_base_frame: base_footprint
height: 5
width: 5
origin_x: -4.0
origin_y: -4.0
rolling_window: true
publish_frequency: 2.0
resolution: 0.025
static_map: false
transform_tolerance: 0.3
update_frequency: 5.0
plugins:
- {name: obstacle_layer_xtions, type: 'costmap_2d::ObstacleLayer'}
- {name: obstacle_layer_laser, type: 'costmap_2d::ObstacleLayer'}
- {name: inflation_layer, type: 'costmap_2d::InflationLayer'}
inflation_layer: {cost_scaling_factor: 10.0, enabled: true, inflation_radius: 0.2}
obstacle_layer_xtions:
observation_sources: front_point_cloud_sensor front_point_cloud_sensor2 back_point_cloud_sensor back_point_cloud_sensor2
enabled: true
track_unknown_space: false
obstacle_layer_laser:
observation_sources: laser_scan_sensor
track_unknown_space: true
enabled: true
obstacle_layer_footprint: {enabled: true}
Global Costmap:
global_costmap:
global_frame: /map
robot_base_frame: base_footprint
#Height and width of costmap
height: 15
width: 15
origin_x: -7
origin_y: -7
publish_frequency: 0.5
resolution: 0.05
transform_tolerance: 0.5
update_frequency: 1.0
plugins:
- {name: static_layer, type: 'costmap_2d::StaticLayer'}
- {name: obstacle_layer_laser, type: 'costmap_2d::ObstacleLayer'}
- {name: obstacle_layer_xtions, type: 'costmap_2d::ObstacleLayer'}
- {name: inflation_layer, type: 'costmap_2d::InflationLayer'}
static_layer: {enabled: true}
static_map: true
inflation_layer: {cost_scaling_factor: 10.0, enabled: true, inflation_radius: 0.2}
obstacle_layer_xtions:
observation_sources: front_point_cloud_sensor front_point_cloud_sensor2 back_point_cloud_sensor back_point_cloud_sensor2
track_unknown_space: true
enabled: true
obstacle_layer_laser:
observation_sources: laser_scan_sensor
track_unknown_space: true
enabled: true
obstacle_layer_footprint: {enabled: true}
dwa_local_planner params:
DWAPlannerROS:
#Robot Config Params
acc_lim_theta: 0.35
acc_lim_x: 0.3
acc_lim_y: 0.0
acc_limit_trans: 0.35
max_vel_x: 0.25
min_vel_x: -0.1
max_vel_y: 0.0
min_vel_y: 0.0
max_trans_vel: 0.25
min_trans_vel: 0.01
max_rot_vel: 0.25
min_rot_vel: 0.01
#Forward Simulation Parameters
sim_time: 10
sim_granularity: 0.025
vx_samples: 30
vy_samples: 0
vtheta_samples: 40
penalize_negative_x: false
#Trajectory Scoring Parameters
goal_distance_bias: 32.0
path_distance_bias: 24
occdist_scale: 0.01
stop_time_buffer: 0.2
forward_point_distance: 0.325
scaling_speed: 0.1
max_scaling_factor: 0.2
#Goal Tolerance Parameters
xy_goal_tolerance: 0.2
yaw_goal_tolerance: 0.17
latch_xy_goal_tolerance: true
rot_stopped_vel: 0.001
trans_stopped_vel: 0.001
#Oscillation Prevention Param
oscillation_reset_dist: 0.05
#Global Plan PArameters
prune_plan: true


↧
dwa_local_planner: in place rotation FIRST goal does not work
When running the navigation with dwa_local_planner, and give the **first** goal as an in place rotation, the robot won't move (except for recovery behaviors), and gives the below output. But, if you give a translation goal first, it moves normally, and from then on, it can rotate in place without a problem.
[ERROR] [...]: Footprint spec is empty, maybe missing call to setFootprint?
[ WARN] [...]: Invalid Trajectory 0.000000, 0.000000, -0.401014, cost: -9.000000
[ WARN] [...]: Rotation cmd in collision
[ INFO] [...]: Error when rotating.
I think the error actually comes from line 80 in [obstacle_cost_function.cpp](https://github.com/ros-planning/navigation/blob/indigo-devel/base_local_planner/src/obstacle_cost_function.cpp) at base_local_planner, something about the footprint is not properly initialized:
double ObstacleCostFunction::scoreTrajectory(Trajectory &traj) {
...
if (footprint_spec_.size() == 0) {
// Bug, should never happen
ROS_ERROR("Footprint spec is empty, maybe missing call to setFootprint?");
return -9;
}
...
All this is easy to reproduce running, for example, turtlebot simulator and navigation amcl demo:
$ roslaunch turtlebot_gazebo turtlebot_world.launch
$ roslaunch turtlebot_gazebo amcl_demo.launch
$ roslaunch turtlebot_rviz_launchers view_navigation.launch
EDIT:
The local costmap config used in the example above is the one from turtlebot packages, which can be found here: [local_costmap_params.yaml](https://github.com/turtlebot/turtlebot_apps/blob/indigo/turtlebot_navigation/param/local_costmap_params.yaml)
EDIT2: I use ROS Indigo on Ubuntu 14.04.2, but i've also tried with Hydro on 12.04. And yes, I have all installed via apt-get
↧
Dynamically changing the origin of costmap2D
Hello everyone,
For a project I'm working on, we are using only the dwa_local_planner from the navigation stack. We generate and publish our own occupancy grid as a nav_msgs::OccupancyGrid message and give it to costmap2D. However, the origin of the occupancy grid and thus the costmap2D needs to change dynamically as the robot moves. What is a good way to change the origin of the cost map which it seems to be pulling from the costmap2D config file each time? Will the OccupancyGrid message change it automatically since I will be publishing the dynamically changing origin as a part of the map meta data in the message?
↧
↧
LocalPathPlanner PoseStamped
Hello Guys,
I want to use the data by the localpath planner.
The Data Type is nav_msgs/Path and I am using with my node a pointer to get for example the x coordinate:
ROS_INFO("Data x [%f]", pathConstPtr->pose[i].pose.position.x);
Which works fine, but I have no idea how I can find out how many poses I have?
Are there some kind of methods to get the size of the posestamped?
↧
robot rotates instead of going to the goal (dwa_local_planner)
Please see the following two videos about the behaviour of the robot ([video1](https://youtu.be/2_va6733bbU), [video2](https://youtu.be/_u4eBcbD2xM)). The robot sometimes moves pretty well, but sometimes just keep spinning around. Such behaviour really confuses me, and your help to solve it is greatly appreciated.
I use ROS navigation stack with dwa_local_planner. I have two computers: one on the robot the publish odometry and laser scan, and the other desktop running the navigation stack. Both computers are on a local network, and I use chrony to sync their time. However, my hunch is that the negative delay shown in tf_monitor (see videos above) might be the cause of it, but I'm not totally sure. Also, if you find other things in the video don't seem right, please let me know too.
Here is the setting of dwa_local_planner.
DWAPlannerROS:
# Robot configuration parameters
acc_lim_x: 2.5
acc_lim_y: 0
acc_lim_th: 3.2
max_vel_x: 0.5
min_vel_x: 0.0
max_vel_y: 0
min_vel_y: 0
max_trans_vel: 0.5
min_trans_vel: 0.1
max_rot_vel: 1.0
min_rot_vel: 0.2
# Goal Tolerance Parameters
yaw_goal_tolerance: 0.2
xy_goal_tolerance: 0.2
latch_xy_goal_tolerance: false
# Forward Simulation Parameters
vy_samples: 0
# Trajectory scoring parameters
occdist_scale: 5
Here is the tf_tree

Thanks for your help in advance!
↧
which local planner to use for negative velocities/ backward motion
Hi all,
I have a mobile robot which is navigating around a room. I am using [move_base](http://wiki.ros.org/move_base) for planning with TrajectoryPlannerROS as the local planner and the default A* as the global planner. Now, I would like it to give negative velocities/ backward motion to the robot. As far as I know TrajectoryPlannerROS does not support negative velocities (correct me if I am wrong). The only local planner left is [dwa_local_planner](http://wiki.ros.org/dwa_local_planner) which can support negative velocities or backward motion. Are there any other local planners which can be used to provide backward motion? I have the option of using both default A* global planner and sbpl_lattice_planner.
Any help will be appreciated.
Thanks in advance.
Naman Kumar
↧
parameter tuning for dwa_local_planner: unable to turn properly
Hi all,
I have a mobile robot which is navigating around a room. It has hokuyo laser and Kinect for navigation and obstacle avoidance. I am using wheel_encoders for odometry, [amcl](http://wiki.ros.org/amcl) for localization, [move_base](http://wiki.ros.org/move_base) for planning with default global planner and Trajectory Planner as the local planner and everything seems to be working fine. After that, I started using [dwa_local_planner](http://wiki.ros.org/dwa_local_planner) as a local planner and I am having issues when the robot is turning. The robot is able to go forward without any issues, the problem occurs only when its turning and the planner has to give some angular velocity. I feel the local planner is not able to give enough velocity for the robot to turn and I have to turn the robot manually:

I have specified:
max_rot_vel: 1.0
min_rot_vel: 0.8
but sometimes, it does not seem to be following it (sometimes it does, angular.z = -0.8 or 0.8 and it turns correctly). **In short, the problem is when the robot is trying to turn, the dwa_local_planner sends angular velocity (angular.z = -0.3199) which is not enough for the robot to turn.** Does any one have any idea why is the robot not able to turn properly and what parameters should I tune for it?
**dwa_local_planner_params.yaml**
DWAPlannerROS:
acc_lim_x: 2.0
acc_lim_y: 0
acc_lim_th: 3.0
max_trans_vel: 0.5
min_trans_vel: 0.0
max_vel_x: 0.5
min_vel_x: 0.0
max_vel_y: 0
min_vel_y: 0
max_rot_vel: 1.0
min_rot_vel: 0.8
yaw_goal_tolerance: 0.17
xy_goal_tolerance: 0.15
latch_xy_goal_tolerance: false
sim_time: 1.5
sim_granularity: 0.025
vx_samples: 10
vy_samples: 0
vtheta_samples: 20
controller_frequency: 10
penalize_negative_x: true
path_distance_bias: 1.0
goal_distance_bias: 0.8
occdist_scale: 0.01
forward_point_distance: 0.325
stop_time_buffer: 0.2
scaling_speed: 0.25
max_scaling_factor: 0.2
oscillation_reset_dist: 0.05
prune_plan: false
sim_period: 0.1
rot_stopped_vel: 0.01
trans_stopped_vel: 0.01
The video is [here](https://www.youtube.com/watch?v=huV-wcRIiZc&feature=youtu.be). The 1st goal is in the direction of east, 2nd goal towards west and 3rd goal towards north. All the three times, I have to rotate the robot manually because the local planner is not able to give enough angular velocity and the robot does not turn properly.
Please let me know if you need more information from me. Any help will be appreciated.
Thanks in advance.
Naman Kumar
↧
↧
robot unable to rotate in place for dwa_local_planner
Hi all,
I am using [dwa_local_planner](http://wiki.ros.org/dwa_local_planner) as a local planner and is having some issues while the robot is turning (that is, rotating in place). The robot is able to go forward without any issues and is able to reach the goal within `xy_tolerance` but when it comes to correcting the orientation so that it is within `yaw_goal_tolerance`, dwa_local_planner is just not able to send enough angular velocity (`angular.z = -0.3199` and `linear.x = 0`) and hence the robot is not able to rotate in place and is not able to correct its orientation. I have specified following parameters:
max_rot_vel: 1.0
min_rot_vel: 0.8
but the dwa_local_planner gives angular velocity which is less than 0.8 (it gives values like -0.32,0.2,etc..) and hence the robot does not rotate in place. My robot requires minimum of 0.7 or 0.8 angular velocity to rotate in place and therefore, I have specified `min_rot_vel: 0.8` but it looks like the dwa_local_planner is not considering that. Is there any parameter similar to `min_in_place_rotational_vel` (which is there for TrajectoryPlannerROS) in case of dwa_local_planner which can be modified for in place rotation in case of dwa_local_planner? Or, does anyone have any idea why is this happening and how can it be solved?
**dwa_local_planner_params.yaml**
DWAPlannerROS:
acc_lim_x: 2.0
acc_lim_y: 0
acc_lim_th: 3.0
max_trans_vel: 0.5
min_trans_vel: 0.0
max_vel_x: 0.5
min_vel_x: 0.0
max_vel_y: 0
min_vel_y: 0
max_rot_vel: 1.0
min_rot_vel: 0.8
yaw_goal_tolerance: 0.17
xy_goal_tolerance: 0.15
latch_xy_goal_tolerance: false
sim_time: 1.5
sim_granularity: 0.025
vx_samples: 10
vy_samples: 0
vtheta_samples: 20
controller_frequency: 10
penalize_negative_x: true
path_distance_bias: 1.0
goal_distance_bias: 0.8
occdist_scale: 0.01
forward_point_distance: 0.325
stop_time_buffer: 0.2
scaling_speed: 0.25
max_scaling_factor: 0.2
oscillation_reset_dist: 0.05
prune_plan: false
sim_period: 0.1
rot_stopped_vel: 0.01
trans_stopped_vel: 0.01
Please let me know if you need more information from me. Any help will be appreciated.
Thanks in advance.
Naman Kumar
↧
what are the specific critics forms of the DWA's cost function,when scoring trajectories?
Hello,all
i learned the theory of DWA, when i looked at the sources of the [navigation](https://github.com/ros-planning/navigation/tree/hydro-devel),i found out `dwa_local_planner` package have a lot connection with the `base_local_planner` package. In the line 319 of the [dwa_planner.cpp](https://github.com/ros-planning/navigation/blob/hydro-devel/dwa_local_planner/src/dwa_planner.cpp),it calls the `SimpleScoredSamplingPlanner::findBestTrajectory(.)` to found the best trajectory ,when i looked into the [simple_scored_sampling_planner.cpp](https://github.com/ros-planning/navigation/blob/hydro-devel/base_local_planner/src/simple_scored_sampling_planner.cpp),there is one question confuses me .
Q: what are the specific cost function forms of the DWA? I just saw in the constructor of the DWAPlanner ,lines 167~179, [dwa_planner.cpp](https://github.com/ros-planning/navigation/blob/hydro-devel/dwa_local_planner/src/dwa_planner.cpp),the ''critics'' was set up, the " generator_list" was set up ,and then class SimpleScoredSamplingPlanner of object "scored_sampling_planner_ "was instantiated.when i looked into the [obstacle_cost_function.cpp](https://github.com/ros-planning/navigation/blob/hydro-devel/base_local_planner/src/obstacle_cost_function.cpp), [oscillation_cost_function.cpp](https://github.com/ros-planning/navigation/blob/hydro-devel/base_local_planner/src/oscillation_cost_function.cpp),[map_grid_cost_function.cpp](https://github.com/ros-planning/navigation/blob/hydro-devel/base_local_planner/src/map_grid_cost_function.cpp),i can understand how the critics `oscillation_costs_`and the `obstacle_costs_`scores trajectories,but when i don't figure out how the global goal critics `path_costs_`&`alignment_costs_`and the local goal critics `goal_costs_`& `goal_front_costs_`scores
trajectories. In the [map_grid.cpp](https://github.com/ros-planning/navigation/blob/hydro-devel/base_local_planner/src/map_grid.cpp), `MapGrid::setTargetCells (.)` aimed at `global goal critics` ,`MapGrid::setLocalGoal(.)`aimed at `local goal critics`,what are the principles of the two cost functions respectively ??
Any help will be appreciated much,thanks a lot :)
↧
dwa_local_planner penalize POSITIVE x
Hello everyone,
I am currently working in a student project and want to be able to navigate with the youbot from KUKA.
Everything works fine with the dwa_local_planner but in my specific case, I need the robot to drive backwards since the laserscanner is mounted at the back.
I wanted to adapt the source code of the dwa_local_planner to my needs, but I could not find out where the variable 'penalize_negative_x' is used. My plan was to start from there on to penalize **POSITIVE** x.
I am also quite new to ROS and seem to be a bit helpless. Maybe you can give me some advice, how I can force the dwa_local_planner to drive backwards.
Thanks for your reply and kind regards,
Raphael
↧
Cause path planning to take wider turns
I am having trouble getting my robot to find a path through doorways. Sometimes the global costmap just doesn't give enough space.
*A* solution is to decrease the inflation_radius,
however the result is that it plans paths with very tight corners, meaning sometimes the robot runs over items near the wall that stick out below the sensor level.
Is there a way to coerce the planner into accepting tight spaces when there is no alternative, like doorways, but take a wide birth around corners when it is possible?
It feels like a need another "inflation" box for "desired personal space".
↧
↧
Running move_base with DWA_local_planner
Hi everyone,
I would like to use the navigation stack on a differential drive wheelchair to perform local path planning. Up to now I have odometry from the chair as well as a local cost map coming from sensor data. After some research, I have decided that the 'Dynamic window approach' would be ideal for my application but i cannot seem to get move_base to use DWA_local_planner as its planning algorithm, actual, i cannot get move_base working at all. I run it within a launch file as below:
But the terminal keeps outputting this error:
process[move_base-2]: started with pid [5257]
terminate called after throwing an instance of 'boost::exception_detail::clone_impl>'
what(): boost: mutex lock failed in pthread_mutex_lock: Invalid argument
[move_base-2] process has died [pid 5257, exit code -6, cmd /opt/ros/indigo/lib/move_base/move_base __name:=move_base __log:=/home/rocky/.ros/log/fac44b2a-6d80-11e5-8d64-d30c77a21d38/move_base-2.log].
log file: /home/rocky/.ros/log/fac44b2a-6d80-11e5-8d64-d30c77a21d38/move_base-2*.log
I am not sure what is causing this error, could anyone please help? Thanks,
Thibault
↧
dwa_local_planner penalize negative x velocities
Hi all,
I am using [dwa_local_planner](http://wiki.ros.org/dwa_local_planner) as my local planner and there is a parameter `penalize_negative_x` in the yaml file. In my case, it does not seem to have any effect, if I give my `min_vel_x: -0.2`, it prefers to go in the reverse direction for long duration although `penalize_negative_x : true` whereas it should just turn in place and go forward. Also, I was not able to find `penalize_negative_x` parameter anywhere in the source code of `dwa_local_planner` which makes me think if its really being used or not?
Any help will be appreciated. Let me know if you need more information from me.
Thanks in advance.
Naman Kumar
↧
robot unable to turn in place using dwa_local_planner
Hi,
I am using `dwa_local_planner` as a local planner and is having some issues while the robot is turning in place. When a goal is given to the robot, instead of turning in place, it prefers to take a long curve with both translational and angular velocity and there is no case where it turns in place (that is, has only angular velocities) and because of it, it gets stuck sometimes when its not possible to take a long curve because of obstacles, etc. . What should be done to make sure `dwa_local_planner` gives proper trajectories for the robot to turn in place? and Why does robot never turns in place when using `dwa_local_planner` (except when at the goal and `latchedStopRotateController` is being used) ?
**Update:**
If I set `min_vel_x: 0.0`, then the robot is unable to turn in place because the `dwa_local_planner` is not able to send enough angular velocity (`angular.z: -0.252`) although `min_rot_vel : 0.9`. Also, if `use_dwa: true`, `angular.z: -0.319` and if `use_dwa: false`, `angular.z: -0.252`. I think it has do something with how the sampling is taking place. Any idea why is this happening and how can I make sure that `dwa_local_planner` sends enough angular velocity for the robot to turn in place?
**dwa_local_planner.yaml**
#For full documentation of the parameters in this file, and a list of all the
#parameters available for DWAPlannerROS, please see
#http://www.ros.org/wiki/dwa_local_planner
DWAPlannerROS:
acc_lim_x: 2.5
acc_lim_y: 0
acc_lim_th: 3.0
max_trans_vel: 0.4
min_trans_vel: 0.2
max_vel_x: 0.4
min_vel_x: 0.2
max_vel_y: 0
min_vel_y: 0
max_rot_vel: 1.2
min_rot_vel: 0.9
yaw_goal_tolerance: 0.20
xy_goal_tolerance: 0.30
latch_xy_goal_tolerance: false
sim_time: 1.5
sim_granularity: 0.025
vx_samples: 3
vy_samples: 0
vtheta_samples: 30
controller_frequency: 10
penalize_negative_x: true
path_distance_bias: 20.0
goal_distance_bias: 24.0
occdist_scale: 0.1
forward_point_distance: 0
stop_time_buffer: 0.5
scaling_speed: 0.25
max_scaling_factor: 0.2
oscillation_reset_dist: 0.05
prune_plan: false
sim_period: 0.1
rot_stopped_vel: 0.01
trans_stopped_vel: 0.01
Some info. about the robot : The center of rotation of the robot is at the back of the robot and this is where its `base_link` is present.
Any help will be appreciated. Please let me know if you need more information from me.
Thanks in advance.
Naman Kumar
↧
robot turning in place towards the obstacle using dwa_local_planner
Hi all,
I have a mobile robot with lidar, Kinect, wheel_enoders and IMU which is able to navigate properly using [move_base](http://wiki.ros.org/move_base). I am using `SBPL_Lattice_Planner` as the global planner which works perfectly. I am using [dwa_local_planner](http://wiki.ros.org/dwa_local_planner) as the local planner and sometimes, it generates in place velocities towards the obstacle although the global plan is good. I have attached two images below which shows this clearly :
**Before Planning:**

**After Planning:**

As you can see in the second image, the robot turned clockwise towards the obstacle. It is really weird because the robot had enough space to turn anti-clockwise and go towards the goal instead of going in the wrong direction.
**dwa_local_planner_params.yaml**
#For full documentation of the parameters in this file, and a list of all the
#parameters available for DWAPlannerROS, please see
#http://www.ros.org/wiki/dwa_local_planner
DWAPlannerROS:
acc_lim_x: 2.5
acc_lim_y: 0
acc_lim_th: 3.0
max_trans_vel: 0.3
min_trans_vel: 0.1
max_vel_x: 0.3
min_vel_x: 0.0
max_vel_y: 0
min_vel_y: 0
max_rot_vel: 0.6
min_rot_vel: 0.4
yaw_goal_tolerance: 0.20
xy_goal_tolerance: 0.20
latch_xy_goal_tolerance: false
sim_time: 1.5
sim_granularity: 0.025
vx_samples: 10
vy_samples: 0
vtheta_samples: 20
controller_frequency: 10
penalize_negative_x: true
path_distance_bias: 1.0
goal_distance_bias: 0.8
occdist_scale: 0.05
forward_point_distance: 0.0
stop_time_buffer: 0.2
scaling_speed: 0.25
max_scaling_factor: 0.2
oscillation_reset_dist: 0.05
prune_plan: false
sim_period: 0.1
rot_stopped_vel: 0.01
trans_stopped_vel: 0.01
Does anyone have any idea why is this happening? Any suggestions will be appreciated.
Naman
↧
↧
DWA Planner is struggling at the near to end of the path
Hi,
I'm using `dwa_local_planner/DWAPlannerROS` as local planner and, `global_planner/GlobalPlanner` as global planner.
When the goal point is in near to obstacles(1), Robot tries going directly to goal, it doesn't thinks about rotating at goal point. So, It stucks(2) at the end:
[ WARN] [1455116051.009469819, 8907.527000000]: DWA planner failed to produce path.
[ WARN] [1455116051.230953083, 8907.627000000]: Rotate recovery behavior started.
[ERROR] [1455116051.231075332, 8907.627000000]: Rotate recovery can't rotate in place because there is a potential collision. Cost: -1.00
Here is screenshot:

EDIT: I've set `forward_point_distance` to `0.0` and `vy_samples` to 0 by [this](http://answers.ros.org/question/201535/move_basedwa-parameters-for-a-large-robot-with-rotation-center-in-the-front/?answer=201782#post-id-201782) answer, now robot tries better ways but struggling at goal point's near too (its not about goal tolerance, struggling at far than the `0.06`). I've just updated navigation from ubuntu's repo's. I'll add screenshots after looking how the new packages works.
EDIT2: After updating navigation packages, It is trying to escape infinitely with struggling with little movements at near to end of the path, changing `path_distance_bias` and `goal_distance_bias` parameters doesn't make sense:
[ INFO] [1455190327.742058584, 6646.566000000]: Got new plan
[ INFO] [1455190327.908304049, 6646.664000000]: Got new plan
[ INFO] [1455190328.263322957, 6646.864000000]: Got new plan
[ INFO] [1455190328.617373718, 6647.064000000]: Got new plan
[ INFO] [1455190328.925895750, 6647.264000000]: Got new plan
[ INFO] [1455190329.222412376, 6647.465000000]: Got new plan
And screenshot:

Here is [video](https://youtu.be/MeK8Dz6q_g0). How can I configure `dwa_local_planner` to create 3rd screenshot's like plan? (Or Can I configure?) (Or Are there any global planner to operate this?)
Here is all parameters:
DWAPlannerROS:
use_dwa: true
# Robot Configuration Parameters
acc_lim_x: 20.0
acc_lim_y: 0.0
acc_lim_theta: 10.0
acc_limit_trans: 0.1
max_trans_vel: 0.55
min_trans_vel: 0.01
trans_stopped_vel: 0.01
rot_stopped_vel: 0.01
max_vel_x: 0.55
min_vel_x: -0.55
max_vel_y: 0.0
min_vel_y: 0.0
max_rot_vel: 1.5
min_rot_vel: 0.02
# Goal Tolerance Parameters
yaw_goal_tolerance: 0.03
xy_goal_tolerance: 0.06
latch_xy_goal_tolerance: false
# Forward Simulation Parameters
sim_time: 1.0
sim_granularity: 0.1
vx_samples: 15
vy_samples: 10
vtheta_samples: 20
controller_frequency: 10.0
# Trajectory Scoring Parameters
path_distance_bias: 0.0 #32.0
goal_distance_bias: 24.0
occdist_scale: 0.01
forward_point_distance: 0.0 # 2.0 # 0.325
stop_time_buffer: 0.2
scaling_speed: 0.25
max_scaling_factor: 0.2
#Oscillation Prevention Parameters
oscillation_reset_dist: 0.05
oscillation_reset_angle: 0.2
prune_plan: false
TrajectoryPlannerROS: # For RotateRecovery
yaw_goal_tolerance: 0.03
acc_lim_th: 10.0
max_rotational_vel: 1.0
min_in_place_rotational_vel: -1.0
EDIT3: Added video and updated some parameters.
↧
Error in move_base while simulating navigation stack
When i launch the navigation launch file the robot fails to keep the plan and mess up in the middle, It throws the below warning and an error in Rviz (Ref image)> [ WARN] [1455133160.311617027, 27.096000000]: MessageFilter [target=map ]: Discarding message from [/move_base] due to empty frame_id. This message will only print once.>> [ WARN] [1455133160.311926656,> 27.096000000]: Invalid argument passed to canTransform argument source_frame> in tf2 frame_ids cannot be empty>> [ WARN] [1455133160.710917579,> 27.118000000]: Invalid argument passed to canTransform argument source_frame> in tf2 frame_ids cannot be empty


Edit 1:
I am using AMCL localization and dwa planner, even base_planner resulted in same error.
[Here](https://www.dropbox.com/sh/rwpvvxs2y7unl55/AAAKvedtBhNtvGzmt5sPuTsGa?dl=0) is the link for my navigation stack
[Here](https://youtu.be/-PNZsCE3jrI) is the video of my robots behavior
rqt_graph result

↧
Navigation stack Holonomic: true not working
Though i set navigation stack holonomic parameter to true it doesn't generate y velocity. Any suggestions
I am using ROS indigo and Ubuntu 14.04.
Thank you
**EDIT:**
Here are the launch files & output of roswtf:
**base_local_planner_params.yaml**
TrajectoryPlannerROS:
acc_lim_th: 3.2
acc_lim_x: 2.5
acc_lim_y: 2.5
max_vel_x: 0.65
min_vel_x: 0.0
max_vel_y: 0.1
min_vel_y: -0.1
max_trans_vel: 0.65
min_trans_vel: 0.1
max_rot_vel: 0.5
min_rot_vel: 2.0
sim_time: 1.7
sim_granularity: 0.025
goal_distance_bias: 32.0
path_distance_bias: 24.0
occdist_scale: 0.01
stop_time_buffer: 0.2
oscillation_reset_dist: 0.05
forward_point_distance: 0.325
scaling_speed: 0.25
max_scaling_factor: 0.2
vx_samples: 3
vy_samples: 10
vtheta_samples: 20
sim_period: 0.1
xy_goal_tolerance: 0.2
yaw_goal_tolerance: 0.17
rot_stopped_vel: 0.01
trans_stopped_vel: 0.01
holonomic_robot: true
y_vels: [-0.6, -0.1, 0.1, 0.6]
**Costmap_common_params.yaml**
obstacle_range: 1
raytrace_range: 1.5
footprint: [[-0.2,-0.2],[-0.2,0.2], [0.2, 0.2], [0.2,-0.2]]
#robot_radius: ir_of_robot
inflation_radius: 3
observation_sources: scan
scan: {sensor_frame: /laser, data_type: LaserScan, topic: /scan, marking: true, clearing: true}
**global_costmap_params.yaml**
global_costmap:
global_frame: /map
robot_base_frame: /base_link
update_frequency: 1.0
publish_frequency: 0.5
static_map: false
transform_tolerance: 1.5
static_map: false
rolling_window: true
width: 100.0
height: 100.0
**local_comstmap_params.yaml**
local_costmap:
global_frame: /map
robot_base_frame: /base_link
update_frequency: 5.0
publish_frequency: 2.0
static_map: false
rolling_window: true
width: 6.0
height: 6.0
resolution: 0.05
transform_tolerance: 1.5
planner_frequency: 1.0
planner_patience: 5.0
**Output of roswtf**
WARNING: Package "ompl" does not follow the version conventions. It should not contain leading zeros (unless the number is 0).
WARNING: Package name "twist_Converter" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits and underscores.
Loaded plugin tf.tfwtf
No package or stack in context
================================================================================
Static checks summary:
No errors or warnings
================================================================================
Beginning tests of your ROS graph. These may take awhile...
analyzing graph...
... done analyzing graph
running graph rules...
... done running graph rules
running tf checks, this will take a second...
... tf checks complete
Online checks summary:
Found 1 warning(s).
Warnings are things that may be just fine, but are sometimes at fault
WARNING The following node subscriptions are unconnected:
* /mavros:
* /mavros/setpoint_raw/global
* /mavros/setpoint_raw/attitude
* /mavros/setpoint_velocity/cmd_vel
* /mavros/setpoint_position/local
* /tf_static
* /mavlink/to
* /mavros/rc/override
* /mavros/setpoint_raw/local
* /mavros/setpoint_accel/accel
* /move_base:
* /tf_static
* /move_base/cancel
* /rviz:
* /tf_static
Found 1 error(s).
ERROR The following nodes should be connected but aren't:
* /move_base->/move_base (/move_base/global_costmap/footprint)
* /move_base->/move_base (/move_base/local_costmap/footprint)
**UPDATE:**
I changed to DWA local planner. It too doesnt output linear y velocities.
Edited move_base.local
dwa_local_planner_params.yaml
DWAPlannerROS:
acc_lim_th: 3.2
acc_lim_x: 2.5
acc_lim_y: 2.5
max_vel_x: 0.65
min_vel_x: 0.0
max_vel_y: 0.65
min_vel_y: -0.1
max_trans_vel: 0.65
min_trans_vel: 0.1
max_rot_vel: 1.0
min_rot_vel: 0.4
sim_time: 1.7
sim_granularity: 0.025
goal_distance_bias: 32.0
path_distance_bias: 24.0
occdist_scale: 0.01
stop_time_buffer: 0.2
oscillation_reset_dist: 0.05
forward_point_distance: 0.325
scaling_speed: 0.25
max_scaling_factor: 0.2
vx_samples: 3
vy_samples: 10
vtheta_samples: 20
sim_period: 0.1
xy_goal_tolerance: 0.2
yaw_goal_tolerance: 0.17
rot_stopped_vel: 0.01
trans_stopped_vel: 0.01
holonomic_robot: true
↧