The cob_collision_velocity_filter reads the obstacles from a rolling-window costmap and the velocity commands published by a teleop device. It then computes relevant obstacles in driving direction and slows down if it gets closer to them. It then stops the robot at a specific threshold.
Note: The cob_collision_velocity_filter only works with rectangular footprints at the moment.
The cob_collision_velocity_filter package provides a configurable node for collision avoidance using teleoperation devices
cob_collision_velocity_filterThe cob_collision_velocity_filter node takes in geometry_msgs/Twist messages from the teleop device as well as nav_msgs/GridCells messages specifying the obstacles on the costmap. The safe movement commands are published as a topic, as well as the extracted relevant obstacles in driving direction. It further periodically tries to call the /get_footprint service of cob_footprint_observer to check for changed footprints and adjusts the used one accordingly.
Subscribed Topicsteleop_twist (geometry_msgs/Twist)
- unsafe movement command of the teleop device
- obstacles on a rolling-window costmap
Published Topicscommand (geometry_msgs/Twist)
- safe movement command
- obstacles in driving direction
Parameters~costmap_parameter_source (string, default: "/local_costmap_node/costmap")
- Specifies which node to search for the initial footprint, footprint_padding, etc., e.g. /local_costmap_node/costmap.
- Frequency at which footprint is adjusted using the /get_footprint service from cob_footprint_observer.
- Maximum allowed velocity for safe movements.
- Maximum allowed rotational velocity for safe movements.
- Damping term for potential field like controller for slow down behaviour.
- Stiffness term for potential field like controller for slow down behaviour.
- Virtual mass term for potential field like controller for slow down behaviour.
- max distance of obstacles from robot center that are used for computing relevant obstacles.
- Distance in driving direction at which potential field like slow down controller starts to work.
- Distance to relevant_obstacle at which robot stops to move completely.
- Minimal rotational velocity at which circumscribed_radius should be used for collision avoidance while translational velocities are present. Has no influence when robot is only moving rotationally because then it is the rotational movement is the only critical one and thus is taken into account nonetheless.
For starting the cob_collision_velocity_filter use
roslaunch cob_bringup base_collision_observer.launch
This launches the required rolling window costmap_2d as well as the optional cob_footprint_observer. If you don't want to use the cob_footprint_observer simply comment or delete the respective lines in the launch file. For including the collision_velocity_filter in your overall launch file use
<include file=$(find cob_bringup/tools/base_collision_observer.launch />
A sample parameter file for the cob_collision_velocity_filter can look like this:
#where to look for costmap parameters costmap_parameter_source: "/local_costmap_node/costmap" #default "/local_costmap_node/costmap" #frequency at which the get_footprint service should be called footprint_update_frequency: 0.5 #Parameters specifying slow down behaviour pot_ctrl_vmax: 0.6 #default: 0.6 pot_ctrl_vtheta_max: 0.6 #default: 0.8 pot_ctrl_kv: 2.5 #damping default: 1.0 pot_ctrl_kp: 3.0 #stiffness default: 2.0 pot_ctrl_virt_mass: 0.5 #default: 0.8 #Parameters specifying collision velocity filter influence_radius: 2.0 #[m] distance from robot_center obstacle_damping_dist: 1.0 # used as slow-down dist stop_threshold: 0.1 #[m] use_circumscribed_threshold: 0.2 #[rad/s]