Collision issue
So I have just got my custom robot going around the Kitchen, its running Hector Slam, Lidar etc. /odom is from the Hector not encoders, however it is working quiet well.
The only issue is the when I navigate it to a place, the collision seems to be a little out, it gets too close to an obstacle. I have the footprint set-up I have a URDF with a base_frame set-up (the robot is about 18cm square). In RVIZ I have ticked the collision box on the model. I want to make sure the robot does not get a x amount of cm to an object
obstacle_range: 2.5
raytrace_range: 3.0
footprint: [ [0.10, 0.10], [-0.10, 0.10], [-0.10, -0.10], [0.10, -0.10] ]
inflation_radius: 0.05
<link name="base_frame">
<visual>
<geometry>
<box size="0.18 0.18 0.07"/>
</geometry>
<origin rpy="0 0 0" xyz="0 0 0.085"/>
<material name="white">
<color rgba="1 1 1 1"/>
</material>
</visual>
<collision>
<geometry>
<box size="0.18 0.18 0.07"/>
</geometry>
</collision>
</link>
I adjusted the values a little, below are some pictures before and afte crash Randomly, it worked fine the first and 3rd time
local_costmap:
global_frame: /map
robot_base_frame: /scanmatcher_frame
update_frequency: 5.0
publish_frequency: 2.0
static_map: false
rolling_window: true
width: 4.0 # The width of the map in meters. default 10
height: 4.0 # The height of the map in meters. default 10
resolution: 0.05 # The resolution of the map in meters/cell. default 0.05
transform_tolerance: 0.5
global_costmap:
global_frame: /map
robot_base_frame: /scanmatcher_frame
update_frequency: 1.0
publish_frequency: 0.5
static_map: true #
transform_tolerance: 0.5
obstacle_range: 2.5
raytrace_range: 3.0
footprint: [ [0.08, 0.08], [-0.08, 0.08], [-0.08, -0.08], [0.08, -0.08] ]
inflation_radius: 0.3
map_type: costmap
observation_sources: scan bump
scan: {data_type: LaserScan, topic: scan, marking: true, clearing: true, min_obstacle_height: 0.25, max_obstacle_height: 0.35}
bump: {data_type: PointCloud2, topic: mobile_base/sensors/bumper_pointcloud, marking: true, clearing: false, min_obstacle_height: 0.0, max_obstacle_height: 0.15}
TrajectoryPlannerROS:
# Robot Configuration Parameters
max_vel_x: 0.5
min_vel_x: 0.1
max_vel_theta: 1.5
min_vel_theta: -1.5
min_in_place_vel_theta: 1.0
acc_lim_x: 0.6
acc_lim_theta: 1.0
# Goal Tolerance Parameters
yaw_goal_tolerance: 3.14
xy_goal_tolerance: 0.15
# Forward Simulation Parameters
sim_time: 3.0
vx_samples: 6
vtheta_samples: 20
# Trajectory Scoring Parameters
meter_scoring: true
pdist_scale: 0.6
gdist_scale: 0.8
occdist_scale: 0.01
heading_lookahead: 0.325
dwa: true
# Oscillation Prevention Parameters
oscillation_reset_dist: 0.05
# Differential-drive robot configuration
holonomic_robot: false
I think the footprint should be little bigger than your robot size. It will effect the dilation area of obstacles.
Thank you, so collision detection should just happen?
If you use the navigation stack, the collision detection would be processed into two parts, local cost map and local planner. Local cost map would use your footprint, inflation_radius, map etc. to generate a cost map. Thus, local planner can use the cost map to move robot.
I wonder why it is not working, https://github.com/burf2000/ROS_Robot...
Can you print screen on the rviz, in which showing the local cost map and footprint at the place your collision failed?
I can tonight mate :) is it worth emailing it to you?
Email is good, but I think if we solve this issue on this forum is better for this community.
Yes, please attach the image to your OP, @burf2000. You have enough karma to do it.