Robot does not percieve other robots as obstacles
I have a multi robot system where they all have a version of the navstack with different namespaces. They all share the same costmap parameters but again in a different namespace.
The problem is that when I give a 2d nav goal to a robot, it moves somewhat biasedly in a straight line, and runs straight into another robot. There is plenty of space to navigate around it, but it seems it does not percieve it as an obstacle, even though it is visible that it shows up on the laserscan.
Please take a look at the linked video. https://imgur.com/a/6d81brc I apologize for the bad quality, I tried to use kazam, but it just recorded a black screen of rviz.
Here are the costmap and planner parameters:
Global costmap parameter:
global_costmap:
global_frame: map
robot_base_frame: base_footprint
update_frequency: 10.0
publish_frequency: 10.0
transform_tolerance: 0.5
static_map: true
Local costmap parameter:
local_costmap:
global_frame: odom
robot_base_frame: base_footprint
update_frequency: 10.0
publish_frequency: 10.0
transform_tolerance: 0.5
static_map: false
rolling_window: true
width: 3
height: 3
resolution: 0.05
Costmap common parameter:
obstacle_range: 3.0
raytrace_range: 3.5
footprint: [[-0.105, -0.105], [-0.105, 0.105], [0.041, 0.105], [0.041, -0.105]]
#robot_radius: 0.105
inflation_radius: 1.75 #default 1.0
cost_scaling_factor: 20 #default 3.0
map_type: costmap
observation_sources: scan
scan: {sensor_frame: base_scan, data_type: LaserScan, topic: scan, marking: true, clearing: true}
Global planner parameter:
GlobalPlanner:
old_navfn_behavior: false
use_quadratic: true
use_dijkstra: true
use_grid_path: false
allow_unknown: true
planner_window_x: 0.0 # default 0.0
planner_window_y: 0.0 # default 0.0
default_tolerance: 0.0
publish_scale: 100
planner_costmap_publish_frequency: 0.0 # default 0.0
lethal_cost: 253 # default 253
neutral_cost: 50 # default 50
cost_factor: 3.0 # default 3.0
publish_potential: true
DWA local planner parameter:
DWAPlannerROS:
# Robot Configuration Parameters
max_vel_x: 0.22
min_vel_x: -0.22
max_vel_y: 0.0
min_vel_y: 0.0
# The velocity when robot is moving in a straight line
max_vel_trans: 0.22
min_vel_trans: 0.11
max_vel_theta: 5.0 #Default 2.75
min_vel_theta: 2.5 #default 1.37
acc_lim_x: 2.5
acc_lim_y: 0.0
acc_lim_theta: 3.2
# Goal Tolerance Parametes
xy_goal_tolerance: 0.05
yaw_goal_tolerance: 0.17
latch_xy_goal_tolerance: false
# Forward Simulation Parameters
sim_time: 4.5 #Default 1.5
vx_samples: 20
vy_samples: 0
vth_samples: 40
controller_frequency: 10.0
# Trajectory Scoring Parameters
path_distance_bias: 32.0
goal_distance_bias: 8.0 #Default 20.0
occdist_scale: 0.00 #Default 0.02
forward_point_distance: 0.0 #Default 0.325
stop_time_buffer: 0.2
scaling_speed: 0.25
max_scaling_factor: 0.2
# Oscillation Prevention Parameters
oscillation_reset_dist: 0.05
# Debugging
publish_traj_pc : true
publish_cost_grid_pc: true
Are odom, base_footprint, and base_scan the same as in the current tf? I think it is possible that
base_scan
does not exist. It may work if you changesensor_frame: base_scan
tosensor_frame: base_footprint
.It worked by adding a namespace before
base_scan
andscan
:@WarTurtle Congratulations on the resolution. You can create your own answer and make it resolved.
@miura Yes, I will do that when I figure out how to make it more general e.g.