Pybullet: controlling collision of a floating gripper

85 Views Asked by At

I am building a simulation of a robot gripper trying out grips in an articulated object (etc microwave, drawer etc) in pybullet. due to performance we are using a floating gripper without the robot arm. The gripper is being moved using VELOCITY_CONTROL The microwave is held in place using an additional joint holding its base to the 0,0,0 coordinate

The problem is i cant use fixedbase=True because then the gripper does not loose velocity since it doesn't interact.

  1. If I don't use fixed base then the gripper experiences gravity, theoretically I can still give it counter velocity however that doesn't solve the second problem
  2. I only want the gripper to loose velocity in the direction it is moving.
  3. I don't want the gripper to experience angular velocity

this is all implementable separately but it seems like a very ugly solution. and it will very likely make my simulation unrealistic. Is there any other solution?

Currently the gripper simply pushes the microwave away continuously as soon as it touches it, since it cant loose velocity

1

There are 1 best solutions below

0
ketza On

I have implemented a grasping simulation for rigid objects using pybullet and the "floating gripper" concept in the open source BURG-Toolkit for Benchmarking and Understanding Robotic Grasping. In that process, I have encountered very similar problems to what you mentioned.

The gist is the following:

You can use a dummy robot with only XYZ prismatic axes. The robot has a fixed base and the gripper is attached to the end-effector of that robot with a fixed joint in your desired orientation. To keep the gripper in place despite gravity, you can use position control with a target position of zero and a large force. To then move the gripper towards the object, or lift the gripper up after the object has been grasped, you can use velocity control - here you would likely need to adjust according to how exactly you want the gripper to "loose velocity".

The code is too large to paste here. The parts that are likely important to you are in the dev branch in the following files:

  • dummy_xyz_robot.urdf - URDF of the dummy robot
  • robots.py - XYZRobot class, as well as other classes used to control the robot
  • sim.py - GraspSimulator class that instantiates the gripper, connects it to the robot, and executes a grasp