hello-robot / stretch_web_teleop

Remote web teleoperation for the Stretch mobile manipulators from Hello Robot Inc.
Other
13 stars 0 forks source link

Replace hard-coded `inCollision` #39

Open hello-binit opened 4 months ago

hello-binit commented 4 months ago

Replace hard-coded inCollision check with num_contacts from the status dictionary. Whereas the inCollision method in the Robot class has a bunch of hard-coded effort values to try to estimate if the robot is in collision with an object, the num_contacts integer is a counter that increments each time the robot detects that the joint has made a collision / contact with another object. Furthermore, the thresholds that num_contacts is calculated from is calibrated uniquely for each robot.