Set the speed of the robotic arm in ik mode

Typically: "How do I... ", "How can I... " questions
Post Reply
lumeqi
Posts: 29
Joined: 04 Dec 2023, 06:20

Set the speed of the robotic arm in ik mode

Post by lumeqi »

Hello, I am using the UR robotic arm in IK mode and using remote API to set the pose for the target dummy. I hope the robotic arm can move smoothly to the specified position, but now it almost instantly moves to the target position and is unstable. Can you provide me with assistance? thank you.

coppelia
Site Admin
Posts: 10375
Joined: 14 Dec 2012, 00:25

Re: Set the speed of the robotic arm in ik mode

Post by coppelia »

Hello,

if your target dummy is instantly moving, then IK will also try to instantly follow. You will have to gradually move the target dummy. Have a look at the Ruckig motion functions and the demo scene scenes/trajectoryAndMotion/ruckigOnlineTrajectoryGeneratorExamples.ttt

Cheers

z1257153099
Posts: 3
Joined: 08 Dec 2023, 08:46

Re: Set the speed of the robotic arm in ik mode

Post by z1257153099 »

Has this problem been resolved? I have the same problem and need to use the function you provided. I only know the pose point of the target. I need to solve for the various joint angles of the robotic arm based on IK, and then use the function you mentioned to set the joint angles to the target position in order to achieve smooth movement. But currently I don't know the target joint angle. Is there a method for outputting joint angles with IK?

coppelia
Site Admin
Posts: 10375
Joined: 14 Dec 2012, 00:25

Re: Set the speed of the robotic arm in ik mode

Post by coppelia »

Sorry for the late reply, due to end-of-year holidays.

You need to gradually move the target dummy. In e.g. one dimension, if your start is located at coordinate 0, and your desired goal at coordinate 1, you need to move the target dummy in several steps from 0 to 1, e.g.:

Code: Select all

move target to 0.1
simIK.handleGroup(ikEnv,ikGroup,{syncWorlds=true})
read joint angles
move target to 0.2
simIK.handleGroup(ikEnv,ikGroup,{syncWorlds=true})
read joint angles
move target to 0.3
simIK.handleGroup(ikEnv,ikGroup,{syncWorlds=true})
read joint angles
etc.
In above example, you'd move the target with a fixed velocity (and infinite acceleration at the beginning and end). Using the ruckig motion functions, you can achieve the same kind of gradual movement, but with a smooth velocity profile.

Cheers

Post Reply