Global Costmap not align with Static Map

asked 2020-08-02 05:17:49 -0500

tky1026 gravatar image

updated 2020-08-10 21:31:36 -0500

Dear all,

I am pretty new to ROS navigation and I am planning to use Intel RealSense D435 and T265 for navigation.

I am able to create the 2D occupancy grid map from the from the occupancy package provided on the realsense-ros.

So far, my idea is to convert the depth image to laser scan using the depthimage_to_laser_scan package and use the scan topic for move_base node similar to most of the implementation using planar laser.

However, when I proceed to setting up the move_base node for path planning, I receive warnings as shown below :

The origin for the sensor at (0.03, 0.02) is out of map bounds. So, the costmap cannot raytrace for it.

Furthermore, my global cost map does not align with the static map from map_server.

Link to image of global costmap in RViz

Note: I do not mount on any mobile robot, and is simply clipped the cameras in front of my laptop to simulate the usage.

Mounting image

Below are my config files for move_base:


common_costmap_params.yaml

obstacle_range: 5.0
raytrace_range: 6.0
footprint: [[0.1, 0.1], [0.1, -0.1], [-0.1, -0.1], [-0.1, 0.1]]
inflation_radius: 0.3
map_topic: /map
subscribe_to_updates: true
observation_sources: laser_scan_sensor
laser_scan_sensor: {sensor_frame: d400_link, data_type: LaserScan, topic: scan, marking: true, clearing: true}
always_send_full_costmap: true

global_costmap_params.yaml

global_costmap:
update_frequency: 2.5
publish_frequency: 2.5
transform_tolerance: 0.3
width: 10
height: 10
origin_x: -5
origin_y: -5
static_map: true
resolution: 0.05
global_frame: map
robot_base_frame: t265_pose_frame

local_costmap_params.yaml

local_costmap:
update_frequency: 5
publish_frequency: 5
transform_tolerance: 0.25
static_map: false
rolling_window: true
width: 3
height: 3
origin_x: -1.5
origin_y: -1.5
resolution: 0.01
global_frame: t265_odom_frame
robot_base_frame: t265_pose_frame

trajectory_planner.yaml

TrajectoryPlannerROS:
max_vel_x: 0.1
min_vel_x: 0.01
max_vel_theta: 2.5
min_vel_theta: -2.5
min_in_place_vel_theta: 0.25
acc_lim_theta: 5.0
acc_lim_x: 1.5
acc_lim_Y: 1.5
holonomic_robot: false
meter_scoring: true
xy_goal_tolerance: 0.1
yaw_goal_tolerance: 0.05

Can anyone please provide some guidance whether I am doing wrongly at some point. Thank you!


Link to the TF tree

edit retag flag offensive close merge delete

Comments

Hi tky1026,

Can you please share your TF tree:

rosrun rqt_tf_tree rqt_tf_tree

Check the transform between map and t265_pose_frame

Andres A. gravatar image Andres A.  ( 2020-08-10 11:00:09 -0500 )edit

Hi, I don’t see the map in the TF-tree. Just for testing purposes you can publish a static TF between the map and the t265_odom_frame

rosrun tf static_transform_publisher 0 0 0 0 0 0 map t265_odom_frame 100
Andres A. gravatar image Andres A.  ( 2020-08-11 08:13:12 -0500 )edit

I have added to link to the TF tree, the map is published in t265_odom frame so the transform between the map frame (t265_odom_frame) to t265_pose_frame is simply equal to visual odometry published in topic /t265/odom/sample

tky1026 gravatar image tky1026  ( 2020-08-11 09:51:57 -0500 )edit

Hi, this is the tf tree with the static transform publisher TF tree

tky1026 gravatar image tky1026  ( 2020-08-11 09:55:11 -0500 )edit

Did that fix the issue? or is the global costmap still not aligned? If not, can you share the urdf file used by the /robot_state_publisher?

Andres A. gravatar image Andres A.  ( 2020-08-11 11:00:04 -0500 )edit

The problem was temporarily solved by setting the static_map option to false. I believe the main problem comes from the map frame convention published by the mapping package. Anyway this temporary solved my issue.

tky1026 gravatar image tky1026  ( 2020-08-28 23:15:47 -0500 )edit