Page 1 of 1

KUKA youBot - Smooth arms movement

Posted: 27 Feb 2025, 01:21
by danitoS
Hello, new to Robotics here.
I'm trying to get my KUKA youBot to move smoother than what it currently does.
I am controlling it from MATLAB via an app I have built using the built in app designer feature MATLAB has.
Within this app, I have added sliders to move the different joints in the arm, and the movements are not smooth at all.

To move the joints, I am using

Code: Select all

sim.simxSetJointTargetPosition(id,joint1,slider_pos1,sim.simx_opmode_streaming);
Should I change the method or maybe the option I am using as the last parameter for the method?

Thank you in advance!

Re: KUKA youBot - Smooth arms movement

Posted: 27 Feb 2025, 09:16
by coppelia
Hello,

first of all, make sure to use the ZeroMQ remote API instead of the legacy remote API which is deprecated since long.

Then, since those joints are controlled in position, you can adjust their properties, e.g. their Max. velocity to e.g. 10 deg/s.

To test, simply select the joint, run the simulation, then type in the status bar area: sim.setJointTargetPosition(SEL1, angleInRad)

Cheers

Re: KUKA youBot - Smooth arms movement

Posted: 27 Feb 2025, 15:53
by danitoS
Hello and thank you for your reply.
I am a bit confused. The manual states that the handle must be an integer.
Currently it's called youBotArmJoint1.
How do I convert that to an integer?

sim.setJointTargetPosition(int objectHandle, float targetPosition, float[] motionParams = {})

Thank you!

Re: KUKA youBot - Smooth arms movement

Posted: 28 Feb 2025, 17:01
by coppelia
sim.getObject

Cheers