Ask Your Question
0

Setting up navigation on a pioneer 2 platform using amcl and p2os

asked 2011-12-05 23:54:35 -0500

silentbutler gravatar image

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
edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
1

answered 2011-12-06 00:03:50 -0500

DimitriProsser gravatar image

updated 2011-12-07 04:43:43 -0500

I'm not sure how much of the problem is related to this, but I just noticed that for your local costmap, you have both rolling window and static map set to false. This would technically mean that you have no local costmap. In your configuration, you probably want to set rolling window to true.

EDIT: Based on your new information (which should be appended to the original question with an edit, rather than as an answer next time), all you need to do is modify navigation.launch in the p2os_launch package. Within the move_base node, you need to add a <remap>.

    <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
        ...
        <remap from="map" to="static_map" />    
    </node>

What this does is tell move_base to look at the "/static_map" topic rather than the "/map" topic.

edit flag offensive delete link more
0

answered 2011-12-07 04:13:11 -0500

silentbutler gravatar image

updated 2011-12-07 04:14:04 -0500

Ok i got it running now, but only without gmapping. Problem seems to be that amcl wanted the map from topic /map and gmapping was building its map on that topic. /static_map was totally useless in that case because no node used it. Furthermore if i give amcl an inital pose, move_base does not care. How do i get the "static_map" in peaceful coexistance with the gmapping "map"?

farshid616: maybe i need a tf from static_map to map?

edit flag offensive delete link more

Comments

I've edited my answer to address this question.
DimitriProsser gravatar image DimitriProsser  ( 2011-12-07 04:44:12 -0500 )edit
0

answered 2011-12-06 21:40:07 -0500

silentbutler gravatar image

updated 2011-12-06 21:45:19 -0500

Thanks, would have led to an error sooner or later. But did not fix the main problem...

Here is what rviz looks like. To me it seems the static map is not correctly mapped to the costmap configuration... but why? rviz screen

edit flag offensive delete link more
0

answered 2011-12-06 23:19:37 -0500

updated 2011-12-06 23:20:03 -0500

Hi i think it's tf mistake , what is your transform tree ? and what position you set for sensors tf?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-12-05 23:54:35 -0500

Seen: 1,552 times

Last updated: Dec 07 '11