Create a joint on the fly
Hi everyone! I just want to ask if it is possible to create a joint thru python script and on the fly? I have been having problems with grasping my object using my robot manipulator. The object just always slips through the grasp. I've tried adjusting the physics but to no avail. So, I thought, if I could, I would just create a fixed joint gluing my robotic hand to the object when they make contact. However, I'm struggling in finding a solution to implement it (if it is even possible).
Asked by umejima on 2023-08-02 00:19:25 UTC
Answers
You could probably have some sort of callback that sees your object pose, and using something like elementTree to turn that into a xacro block, and use this to generate your new urdf and publish this onto your /robot_description
topic. However, this would most likely cause more problems than solutions. One problem that would spring to mind is that your robot's planner would immediately start complaining, both about the robot itself changing, and the fact that now you would essentially be in a state of collision - because the end-effector (which is now your end effector + object in grasp) would be at the same point as the object itself.
I would highly suggest against this, instead try to see how MoveIt does it with their grasping tutorial here.
Asked by sampreets3 on 2023-08-02 04:28:02 UTC
Comments
Assuming your physics simulator is Gazebo Classic, I know of https://github.com/JenniferBuehler/gazebo-pkgs/wiki/The-Gazebo-grasp-fix-plugin, which as I believe does exactly the thing you're suggesting:
An object is detected as "grasped" as soon as two opposing forces are applied by the gripper links on an object. The object is then fixed to the palm or hand link. As soon as this criterion does not hold any more (e.g. the gripper opens), the object is detached again.
I haven't used it, I've just come across it in the past.
Asked by danzimmerman on 2023-08-03 07:52:11 UTC
Comments