Global Costmap not align with Static Map
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.
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!
Hi tky1026,
Can you please share your TF tree:
Check the transform between map and t265_pose_frame
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
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
Hi, this is the tf tree with the static transform publisher TF tree
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?
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.