# Sensor raytrace error when maps set to voxel

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


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

Sort by » oldest newest most voted

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.

more

No worries! :-)

( 2013-09-10 13:29:29 -0500 )edit

Thanks for sharing! This was actually my problem too

( 2017-08-18 15:19:11 -0500 )edit