Setting up navigation on a pioneer 2 platform using amcl and p2os
Hello everyone,
I'm trying to set up the navigationstack on a pioneer 2 robot. Up to a certain point, everything works fine. But when it comes to localizing itself on a previously recorded static map, it does not work like it's supposed to work.
I am using a hokuyo laser scanner and a teleoperation device, i was able to record a map, drive the robot around, visualize the map, etc.
This is my procedure to start the navigation:
- step 1 - roscore (of course) then rosrun p2os_driver p2os pose:=odom (so move_base can use this)
- step 2 - rosrun map_server map_server /path_to_my_recorded_map map:=static_map
- step 3 - roslaunch p2os_launch gmapping_tf_lrf_p2os_teleop_joy.launch (launchfile provided by ros)
- step 4 - roslaunch p2os_launch navigation.launch
- step 5 - rosrun rviz rviz
In Rviz i was setting up everything described here.
Eventually i end up with rviz displaying everything just fine (map, footprint, etc.) After that i publish an initial goal, where the robot actually is on the recorded map. But here i encounter the problem: the footprint is not set in the particlecloud! The particlecloud moves as the robot moves and gets smaller as i move the robot, but he does actually understands that the robot is in the "middle of the cloud". Futhermore amcl announces that the sensor origin is out of map bounds - of course, because the sensor is not set in the 2d pose estimate.
Here is what my local_costmap_params.yaml looks like:
local_costmap:
global_frame: /odom
robot_base_frame: base_link
update_frequency: 5.0
publish_frequency: 2.0
static_map: false
rolling_window: false
width: 5.0
height: 5.0
resolution: 0.05
global_costmap_params.yaml
global_costmap:
global_frame: /map
robot_base_frame: base_link
update_frequency: 5.0
static_map: true
base_local_planner.yaml
TrajectoryPlannerROS:
max_vel_x: 1.2
min_vel_x: 0.2
max_rotational_vel: 0.8
min_in_place_rotational_vel: 0.3
#sim_time: 2.0
path_distance_bias: 0.6
goal_distance_bias: 0.6
acc_lim_th: 3.2
acc_lim_x: 2.5
acc_lim_y: 2.5
holonomic_robot: false