No obstacle avoidance with dwb controller
I am playing around with nav2 stack and I am heaving trouble getting simple obstacle avoidance to work.
I now returned to the default controller scales to see if avoidance would work with default params but also no change.
I have a fixed global plan, which goes through a local obstacle.
And I would have expected the local planner to at least plan a bit away from obstacle.
But as you see it's just going straight through and I am not sure if it's a bug or just tuning?
Adding ObstacleFootprint
plugin stops the shuttle at least before the obstacle but no avoidance.
Also coming from ROS 1, I remember a parameter which doesn't erase obstacles inside its footprint.
Found this one footprint_clearing_enabled
, but seems to have no effect if set to false.
/controller_server:
ros__parameters:
BaseObstacle.class: "BaseObstacle"
BaseObstacle.scale: 0.02
BaseObstacle.sum_scores: False
GoalAlign.aggregation_type: "last"
GoalAlign.class: "GoalAlign"
GoalAlign.forward_point_distance: 0.325
GoalAlign.scale: 0
GoalDist.aggregation_type: "last"
GoalDist.class: "GoalDist"
GoalDist.scale: 24
Oscillation.class: "Oscillation"
Oscillation.oscillation_reset_angle: 0.2
Oscillation.oscillation_reset_dist: 0.05
Oscillation.oscillation_reset_time: -1
Oscillation.scale: 1
Oscillation.x_only_threshold: 0.05
PathAlign.aggregation_type: "last"
PathAlign.class: "PathAlign"
PathAlign.forward_point_distance: 0.325
PathAlign.scale: 0
PathDist.aggregation_type: "last"
PathDist.class: "PathDist"
PathDist.scale: 32
RotateToGoal.class: "RotateToGoal"
RotateToGoal.scale: 32
RotateToGoal.xy_goal_tolerance: 0.25
acc_lim_theta: 2
acc_lim_x: 2
acc_lim_y: 0
controller_frequency: 20
controller_plugin_ids: ["FollowPath"]
controller_plugin_types: ["dwb_core::DWBLocalPlanner"]
critics: ["RotateToGoal", "Oscillation", "BaseObstacle", "GoalAlign", "PathAlign", "PathDist", "GoalDist"]
debug_trajectory_details: True
decel_lim_theta: -2
decel_lim_x: -2
decel_lim_y: 0
discretize_by_time: False
goal_checker_name: "dwb_plugins::SimpleGoalChecker"
max_speed_xy: 1.3
max_vel_theta: 1
max_vel_x: 1.3
max_vel_y: 0
min_speed_theta: 0
min_speed_xy: 0
min_theta_velocity_threshold: 0.001
min_vel_x: 0
min_vel_y: 0
min_x_velocity_threshold: 0.001
min_y_velocity_threshold: 0.5
prune_distance: 1
prune_plan: True
publish_cost_grid_pc: True
publish_evaluation: True
publish_global_plan: True
publish_local_plan: True
publish_trajectories: True
publish_transformed_plan: True
sim_time: 1.7
trajectory_generator_name: "dwb_plugins::StandardTrajectoryGenerator"
transform_tolerance: 0.2
use_sim_time: True
vx_samples: 20
vy_samples: 5
xy_goal_tolerance: 0.25
yaw_goal_tolerance: 0.25
/local_costmap/local_costmap:
ros__parameters:
3d_obstacle_layer.combination_method: 1
3d_obstacle_layer.decay_model: 0
3d_obstacle_layer.enabled: True
3d_obstacle_layer.map_save_duration: 60
3d_obstacle_layer.mapping_mode: False
3d_obstacle_layer.mark_threshold: 0
3d_obstacle_layer.observation_sources: "rgbd1_clear rgbd1_mark"
3d_obstacle_layer.publish_voxel_map: True
3d_obstacle_layer.rgbd1_clear.clear_after_reading: False
3d_obstacle_layer.rgbd1_clear.clearing: True
3d_obstacle_layer.rgbd1_clear.data_type: "PointCloud2"
3d_obstacle_layer.rgbd1_clear.decay_acceleration: 1
3d_obstacle_layer.rgbd1_clear.enabled: True
3d_obstacle_layer.rgbd1_clear.expected_update_rate: 0
3d_obstacle_layer.rgbd1_clear.horizontal_fov_angle: 1.04
3d_obstacle_layer.rgbd1_clear.inf_is_valid: False
3d_obstacle_layer.rgbd1_clear.marking: False
3d_obstacle_layer.rgbd1_clear.max_obstacle_height: 3
3d_obstacle_layer.rgbd1_clear.max_z: 10
3d_obstacle_layer.rgbd1_clear.min_obstacle_height: 0
3d_obstacle_layer.rgbd1_clear.min_z: 0.1
3d_obstacle_layer.rgbd1_clear.model_type: 0
3d_obstacle_layer.rgbd1_clear.observation_persistence: 0
3d_obstacle_layer.rgbd1_clear.obstacle_range: 2.5
3d_obstacle_layer.rgbd1_clear.sensor_frame: ""
3d_obstacle_layer.rgbd1_clear.topic: "/custom_camera/custom_points"
3d_obstacle_layer.rgbd1_clear.vertical_fov_angle: 0.7
3d_obstacle_layer.rgbd1_clear.vertical_fov_padding: 0
3d_obstacle_layer.rgbd1_clear.voxel_filter: False
3d_obstacle_layer.rgbd1_mark.clear_after_reading: True
3d_obstacle_layer.rgbd1_mark.clearing: False
3d_obstacle_layer.rgbd1_mark.data_type: "PointCloud2"
3d_obstacle_layer.rgbd1_mark.decay_acceleration: 0
3d_obstacle_layer.rgbd1_mark.enabled: True
3d_obstacle_layer.rgbd1_mark.expected_update_rate: 0
3d_obstacle_layer.rgbd1_mark.horizontal_fov_angle: 1.04
3d_obstacle_layer.rgbd1_mark.inf_is_valid: False
3d_obstacle_layer.rgbd1_mark.marking: True
3d_obstacle_layer.rgbd1_mark.max_obstacle_height: 5
3d_obstacle_layer.rgbd1_mark.max_z: 10
3d_obstacle_layer.rgbd1_mark.min_obstacle_height: 0.2
3d_obstacle_layer.rgbd1_mark.min_z: 0
3d_obstacle_layer.rgbd1_mark.model_type: 0
3d_obstacle_layer.rgbd1_mark.observation_persistence: 0
3d_obstacle_layer ...
It may also be helpful to record and examine the
/evaluation
topic to figure out why it is preferring those trajectories.prune_plan
with a distance of 1 is not the best option.. Now shuttle drives with full speed and has at least some avoidance.