KUKA youBot - Smooth arms movement

Typically: "How do I... ", "How can I... " questions
Post Reply
danitoS
Posts: 14
Joined: 30 Jan 2025, 14:04

KUKA youBot - Smooth arms movement

Post 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!
coppelia
Site Admin
Posts: 10747
Joined: 14 Dec 2012, 00:25

Re: KUKA youBot - Smooth arms movement

Post 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
danitoS
Posts: 14
Joined: 30 Jan 2025, 14:04

Re: KUKA youBot - Smooth arms movement

Post 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!
coppelia
Site Admin
Posts: 10747
Joined: 14 Dec 2012, 00:25

Re: KUKA youBot - Smooth arms movement

Post by coppelia »

sim.getObject

Cheers
Post Reply