0
$\begingroup$

Rosanswers logo

Hello,

I am trying to run navigation on a Turtlebot 2 with Kinect on ROS Groovy and Ubuntu 12.04 64 bit.

I have previously been able to run the gmapping demo to create maps just fine, and have been using it to experiment with the "explore" algorithm. My issue thus far as been that, while I have been able to get explore working with 2D costmaps, this is not enough because the Kinect cannot locate some obstacles on the ground and has been crashing into things. I would like to have gmapping also take the bump sensor on the Kobuki into account, and it seems the only reasonable way to do that is by using voxel maps instead of 2d costmaps, as per this question: http://answers.ros.org/question/58111/bumper-in-the-gmapping-costmap-turtlebot/

I have changed my gmapping parameter files to do this. I then run the following:

roslaunch turtlebot_bringup minimal.launch
roslaunch turtlebot_navigation gmapping_demo.launch

After gmapping launches, I immediately get this repeated error:

Registering First Scan
[ INFO] [1378838179.754750699]: Still waiting on map...

[ INFO] [1378838180.763781769]: Received a 320 X 512 map at 0.050000 m/pix

[ INFO] [1378838181.463125972]: MAP SIZE: 320, 512
[ INFO] [1378838181.477537345]: Subscribed to Topics: scan bump
[ INFO] [1378838182.150699492]: Sim period is set to 0.20
[ WARN] [1378838182.179434911]: Trajectory Rollout planner initialized with param meter_scoring not set. Set it to true to make your settins robust against changes of costmap resolution.
[ WARN] [1378838183.486340527]: The origin for the sensor at (-0.09, 0.01, 0.30) is out of map bounds. So, the costmap cannot raytrace for it.
[ WARN] [1378838184.684260669]: The origin for the sensor at (-0.09, 0.01, 0.30) is out of map bounds. So, the costmap cannot raytrace for it.
[ WARN] [1378838185.686235306]: The origin for the sensor at (-0.09, 0.01, 0.30) is out of map bounds. So, the costmap cannot raytrace for it.
[ WARN] [1378838186.686290364]: The origin for the sensor at (-0.09, 0.01, 0.30) is out of map bounds. So, the costmap cannot raytrace for it.

This did not happen before I made my changes, so I must not be setting the voxel maps properly. The following are my param files:

base_local_planner_params.yaml

controller_frequency: 5.0
TrajectoryPlannerROS:
  max_vel_x: 0.50
  min_vel_x: 0.10
  max_rotational_vel: 1.5
  min_in_place_rotational_vel: 1.0
  acc_lim_th: 0.75
  acc_lim_x: 0.50
  acc_lim_y: 0.50

  holonomic_robot: false
  yaw_goal_tolerance: 0.3
  xy_goal_tolerance: 0.15

  goal_distance_bias: 0.8
  path_distance_bias: 0.6
  sim_time: 1.5
  heading_lookahead: 0.325
  oscillation_reset_dist: 0.05

  vx_samples: 6
  vtheta_samples: 20
  dwa: true

costmap_common_params.yaml

origin_z: 0.0
z_resolution: .1
z_voxels: 2


max_obstacle_height: 0.60  # assume something like an arm is mounted on top of the robot
obstacle_range: 2.5
raytrace_range: 3.0
robot_radius: 0.18
inflation_radius: 0.50
observation_sources: scan bump

scan: {data_type: LaserScan, topic: /scan, marking: true, clearing: true, min_obstacle_height: 0.1, max_obstacle_height: 0.6}

# Current bump cloud configuration
bump: {data_type: PointCloud2, topic: mobile_base/sensors/bumper_pointcloud, marking: true, clearing: false, min_obstacle_height: 0.0, max_obstacle_height: 0.1}

# These were for the create, but I think weren't getting used. 
# Can we merge to a common configuration - DJS?
# scan: {data_type: LaserScan, topic: /scan, marking: true, clearing: true}
# left_bump: {data_type: PointCloud2, topic: /bump_sensor_left, marking: true, clearing: true}
# right_bump: {data_type: PointCloud2, topic: /bump_sensor_right, marking: true, clearing: true}

global_costmap_params.yaml

global_costmap:
   map_type: voxel
   global_frame: /map
   robot_base_frame: /base_footprint
   update_frequency: 3.0
   publish_frequency: 0.0
   static_map: true
   transform_tolerance: 0.5
   track_unknown_space: true
   unknown_cost_value: 255

local_costmap_params.yaml

local_costmap:
   map_type: voxel
   global_frame: /odom
   robot_base_frame: /base_footprint
   update_frequency: 5.0
   publish_frequency: 5.0
   static_map: false
   rolling_window: true
   width: 4.0
   height: 4.0
   resolution: 0.1
   transform_tolerance: 0.5

If anyone can see what I am doing wrong, I will greatly appreciate any assistance. I haven't been able to find any good tutorials for setting voxel maps.

Thanks in advance.


Originally posted by BlitherPants on ROS Answers with karma: 504 on 2013-09-10

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Hi Answers Community, This was a silly question. My z_voxels should not have been 2. That was the equivalent of saying my map should only be 20 cm high, so of course the Kinect was off the map.

I changed z_voxels to 10 (the map is now a meter high) and the error is gone now. Sorry for jumping the gun on the question! Hopefully my mistake can help others.


Originally posted by BlitherPants with karma: 504 on 2013-09-10

This answer was ACCEPTED on the original site

Post score: 6


Original comments

Comment by bit-pirate on 2013-09-10:
No worries! :-)

Comment by jubeira on 2017-08-18:
Thanks for sharing! This was actually my problem too

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.