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
Asked by burf2000 on 2017-02-05 15:08:43 UTC
Comments
I think the footprint should be little bigger than your robot size. It will effect the dilation area of obstacles.
Asked by FrozenCh on 2017-02-05 21:25:56 UTC
Thank you, so collision detection should just happen?
Asked by burf2000 on 2017-02-06 02:49:37 UTC
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.
Asked by FrozenCh on 2017-02-06 03:48:49 UTC
I wonder why it is not working, https://github.com/burf2000/ROS_Robot/tree/master/burf_robot/param
Asked by burf2000 on 2017-02-06 04:05:07 UTC
Can you print screen on the rviz, in which showing the local cost map and footprint at the place your collision failed?
Asked by FrozenCh on 2017-02-06 04:21:24 UTC
I can tonight mate :) is it worth emailing it to you?
Asked by burf2000 on 2017-02-06 05:13:05 UTC
Email is good, but I think if we solve this issue on this forum is better for this community.
Asked by FrozenCh on 2017-02-06 05:48:38 UTC
Yes, please attach the image to your OP, @burf2000. You have enough karma to do it.
Asked by gvdhoorn on 2017-02-06 06:05:35 UTC
Added screen shots
Asked by burf2000 on 2017-02-09 02:35:01 UTC
I think you need to increase inflation radius. This variable as I understand it, just says to calculate costs for this radius around obstacles and at 0.05 you won't be calculating enough distance from the obstacle. It should be significantly greater than the robot thickness.
Asked by nxydes on 2017-02-09 16:46:45 UTC
So if my robot is 20cm i should have something like 0.30?
Asked by burf2000 on 2017-02-10 14:14:18 UTC
If your computer can handle some more compute, just make it even higher, like 1.0. If that slows it down too much then yea, set it to 0.5 or 0.4
Asked by nxydes on 2017-02-10 15:01:24 UTC
Thanks mate, that's awesome, I now just need to know how to connect my wheel on my model to whatever controls it
Asked by burf2000 on 2017-02-10 16:22:51 UTC