Inverse Kinematics Pick and Place

Typically: "How do I... ", "How can I... " questions
Post Reply
Posts: 12
Joined: 14 Apr 2021, 20:18

Inverse Kinematics Pick and Place

Post by zhy149 »


I'm new to Coppelia.
I have built a scene using UR5 and Baxter Gripper. There is a table next to the UR5 and there are some cubes I placed on the table for the grasping task, what I want to do is using a controlling console to give the scene an 8-elements tuple to let the robot perform inverse kinematics picking up task (x, y, z, alpha, beta, gamma, distance1, distance2). Here xyz is the position of the gripper, alpha-beta-gamma is the orientation of the gripper. Distance1 is the desired distance between two gripper pads before grasping(should be set in the air), while Distance2 is the desired distance between two grippers at the end of grasping, then pick up and put the objects somewhere. Before each grasping task performed, I'd like the scene to return me a list of all cubes on the table with their xyz position and their alpha-beta-gamma orientation. Here is my scene in the link, thanks in advance for helping me look at this. I know some Lua and Python, and I have set up the python Remote API. ... sp=sharing

Site Admin
Posts: 8611
Joined: 14 Dec 2012, 00:25

Re: Inverse Kinematics Pick and Place

Post by coppelia »


please ask concise and specific questions, otherwise you will also get broad and general answers. Looking at a scene and checking what is wrong can also be time intensive for us, so we prefer not to go into details with users of the Edu version.

About your task: you will have to be able to do several things in order to identify the cubes, and plan an IK task. To detect the cubes with a sensor (e.g. vision sensor or proximity sensor) is quite complex, unless you already have your algorithms available and tested.

I'd rather suggest that you parse all scene objects with sim.getObjectsInTree. In order to identify those cubes, best would be to mark them previously with sim.writeCustomDataBlock. When parsing the scene objects, check if they contain the desired mark with sim.readCustomDataBlock. Then identify their position and orientation. You have many functions related to coordinates, matrices and transformations available.

Then you will have to understand how to set-up an inverse kinematics task. Keep in mind that IK will allow you to compute straight motions of the end-effector of a manipulator (or or course you can also follow a trajectory, but the calculations will have to be done sequentially). This is different from path planning.


Post Reply