why local costmap rotates with robot [closed]
Hi: I got a strange problem. I am simulating a robot in gazebo and visualizing in rviz. My local costmap rotates as robot traverses along its planned path. I tried all options, double check with frames naming. Please refer to an image below.
costmap configuration files are as follow:
costmap_common_params_sim.yaml
footprint: [[-0.18,-0.20],[-0.28,-0.10],[-0.28,0.10],[-0.18,0.20],[0.070,0.20],[0.180,0.10],[0.180,-0.10],[0.07,-0.20]]
inflation_radius: 0.75
cost_scaling_factor: 10.0
transform_tolerance: 2.0
observation_sources: laser_scan_sensor sonar_scan_sensor point_cloud_sensor
laser_scan_sensor: {sensor_frame: base_scan_link, data_type: LaserScan, topic: /scan,marking: true, clearing: true, obstacle_range: 10, raytrace_range: 10}
sonar_scan_sensor: {sensor_frame: base_link, data_type: LaserScan, topic: /myscan, marking: false, clearing: true, obstacle_range: 5.2, raytrace_range: 5.7, observation_persistence: 0}
point_cloud_sensor: {sensor_frame: base_scan_link, data_type: PointCloud2, topic: /marking, max_obstacle_height: 7, min_obstacle_height: 2, marking: true, clearing: false, obstacle_range: 4.9, raytrace_range: 4.9, observation_persistance: 0}
global_costmap_params.yaml
global_costmap:
global_frame: map
robot_base_frame: base_footprint
map_type: costmap
unknown_cost_value: 1
track_unknown_space: true
obstacle_range: 10.0
raytrace_range: 10.0
update_frequency: 0.5
publish_frequency: 0.2
static_map: true
local_costmap_params.yaml
local_costmap:
global_frame: odom
map_type: costmap
robot_base_frame: base_footprint
obstacle_range: 2.0
raytrace_range: 2.0
update_frequency: 5.0
publish_frequency: 1.0
inflation_radius: 0.35
static_map: false
rolling_window: true
width: 6.0
height: 6.0
origin_x: 0.0
origin_y: 0.0
resolution: 0.025
I am just using laser sensor to get the data in simulation. So "sonar_scan_sensor" and "point_cloud_sensor" in costmap_common_params_sim.yaml are not in use.