hello,
I recently encountered a problem and I hope you can help me solve it. Thank you very much.
In my simulation environment, I added a UR5 robot arm and remotely controlled it in the simulation via Python using zmqAPI. I aim to move the arm to a target position by rotating its joints to my custom - defined angles. But after inputting a list of six joint angles and using sim.setJointTargetPosition () to set each joint's angle, when I use sim.getJointPosition () to retrieve the angles, the output angles don’t match my input ones. Also, the output varies each time I run it.
Obtaining the joint angles of the UR5 robot arm in the simulation
Re: Obtaining the joint angles of the UR5 robot arm in the simulation
Hello,
your joints in that model are dynamically enabled and simulated. Meaning that they won't instantaneously jump to the desired position, but simply instruct a controller to move to that position. The controller needs time to reach the position, this is the same in a real-world situation: a car motor won't instantaneously jump to the desired velocity.
If you disable dynamics (or set the joints to kinematics mode), then you can instantaneously jump to the desired position with sim.setJointPosition
Cheers
your joints in that model are dynamically enabled and simulated. Meaning that they won't instantaneously jump to the desired position, but simply instruct a controller to move to that position. The controller needs time to reach the position, this is the same in a real-world situation: a car motor won't instantaneously jump to the desired velocity.
If you disable dynamics (or set the joints to kinematics mode), then you can instantaneously jump to the desired position with sim.setJointPosition
Cheers
Re: Obtaining the joint angles of the UR5 robot arm in the simulation
Thank you very much for your answer; it resolved my doubts.