Collision Avoidance and Detection

From sdk-wiki
Jump to: navigation, search

Collision Model

There are a total of three levels of collision models in baxter.
Collision model.png

As in the figure above, each of Baxter's link has its own collision block which is slightly bigger than the size of that link. When these block comes into contact with each other, collision avoidance model is triggered. The collision blocks can be visualized in RVIZ by setting the Robot Description field under RobotModel as "/robot/armnav_robot_description" and enabling the field Collision Enabled.
The next collision model involves the detection of two types of collisions - impact and squish. Impact is detected when a sudden change in torque is sensed across any of the joint. This can be related to a scenario in which a moving hand collides with a human. Here, the sudden change in torque is sensed during the impact and the robot comes to a stop for 2 seconds before attempting to move again. Squish is detected when joint tries to press against a stationary object. For instance, when a robot arm tries to push a wall, the torque applied across the joint increases and it immediately stops when the applied torque is greater than a threshold. It resumes its motion after 2 seconds.
The rethink log records these information.

2014-05-14T14:45:37.883-0400 INFO (/collision/right/joint_collision_estimator_right,JointCollisionEstimator.cpp:374)  impact: 1.380773 > 0.850000, largest contributor: right_w0, with value: 0.651761

This log information indicates that an impact was detected when the torque applied across the right_w0 joint is greater than 0.85 Nm. Similarly the corresponding message logged for squish is

2014-05-14T14:48:31.723-0400 INFO (/collision/right/joint_collision_estimator_right,JointCollisionEstimator.cpp:395)  squish on Cartesian dimension 0 - 16.177, 16.000

These collision information can also be viewed in rqt_console. The images below show the impact and squish logged in rqt_console.



The final collision model is high speed scaling. This is to avoid the collisions between two limbs moving at higher speeds. The collision blocks for this purpose is higher than the orginal collision blocks. The collision detection happens when the speed of the limb in cartesian space is higher than 0.2 m/s. In order to avoid the collision, the corresponding velocities are scaled down and converted back as position commands.

To disable the collision avoidance on a given arm, you need to publish an empty message at greater than 5hz to thhe topic, /robot/limb/<side>/suppress_collision_avoidance

For eg, the command to suppress collision avoidance on the left arm would be:

$ rostopic pub /robot/limb/left/suppress_collision_avoidance std_msgs/Empty -r 10

The collision avoidance will stay suppressed as long as this is being published