Not able to get smooth movements from uArm Swift Pro

Hello,
For my project I need to move uArm in 50 consecutive movements, each with a different speed. I am using Python SDK library, set_position command with speed as a parameter. As a result I get a series of sharp movements and I would like to get one smooth movement.
Actually what I am trying to do is to build a model of accelerated movement (with different acceleration) and to do so I split the movement into 50 steps.
Thank you,

betan

Which firmwre did you use? I don’t think the python sdk include a function of motion planning, maybe you should spend some time on the firmware or ROS:UFACTORY · GitHub

Thanks

Thank you. I need to check firmware version. I will take a look at ROS, so you think that there is a way to create a smooth motion with different speed for different parts of the trajectory ?

Actually I’m not quite sure I understood your requirements, but Python SDK is only for control the robot not the path planning, if you want change the path planning, you’d better do some research on the ROS and firmware, firmware 4.x.x will be better.

My bad, I will try to explain. I need to model a motion, harmonic motion actually,
I do it by splitting the whole trajectory into N steps, each with different speed. So the speed gradually goes up and down . I need smooth transition between steps, but right now the uArm is shaking slightly in the beginning of each step. Is it possible to make it move between N points, changing speed in not-shaky, smooth way? Thank you!

Could you post your python code here?

something like:

for x in range (1, 200):
y = a * math.sin(t1)
t = t1
t1 = t1 + (math.pi)/20
y1 = a * math.sin(t1)
v = abs(y1 - y)/(t1 - t)
swift.set_position(y = y1, speed = v * 1000)

I did not get the “x” in your code, but don’t worry, I know what you want to do now.
Actually you are using the Python to plan the path. It’s not a good idea.
We built the “Draw&Laser” function on uArm Studio 1.1.21(for firmware 4.3.2) in a similar way,you could have a try. When draw a circle, it’s devide a circle into many many tiny straight line since there is no arc motion command in firmware 4.3.2. but in firmware 3.2.0, there is command of arc motion. That’s depend on the motion planning of the firmware.
Hope that explanation will help you.
Thanks

First of all thank you so much for all your time and advise
I really appreciate it!
Secondly, you are right, in my code there is a mistake, but the important thing is that not only I am trying to approximate the trajectory with many tiny straight lines, but I also need to change the speed for each of this tiny steps.
I will take a look at Draw&Laser implementation. Thanks a lot!
I choose Python because I do some other things in this program, but you are saying that Python will not be able to help me to plan the motion properly?
Thank you again

Yes, the point python is using the given path plan method from the firmware. Let’s assume that the firmware dose not provide a function of draw a circle, then you have to write a function by python to set hundred or thousand of positions(tiny straight lines) to fitting a circle. You may able to plan the motion proberly if it’s move line, but if you need move arc or circle, yes, that’s not a good idea to use Python SDK.
Thanks

Hello David, I tried to find the code and could not. I cannot use the Studio , I need to actually write the code that moves uArm. It doesn’t matter what trajectory I am trying to implement, what matters is that I need to run several consecutive change position commands, each with different speed. Can you give me the example of the code, any code in any language, that would do it smoothly , without small shaking?
Thank you so much!
Alina

Hi Alina, we are not able to provide you codes or samples for your porjects, we could only provide you some suggestions about that. Thanks for your understanding.

oh sure, I didn’t mean that, I just probably didn’t understand your latest suggestion, you told me to take a look at the studio and the function Draw, but it was exactly my question-how did you make it to move smoothly. is it because you do not change the speed? I am sorry, I didn’t mean to break any rules and I appreciate your help

Hi Alina, I just want to let you know that we did encounter the similar issue with you when we developed the “Draw&Laser” function of the uArm Studio, as there was no built in “draw a cirlce” commands in the firmware, we built a function and divided a circle into 100 tiny straight lines in uArm Studio. So when you try the"draw&Laser" and draw a circle with uArm Studio&Firmware 4.0, you will find that the circle drawn by uArm Studio is not a perfect circle.
Hope that will help you with your project.

It is not the perfect circle, but it is ok in my project, but when I draw a circle in uArm Studio the arm itself doesn’t stop between this tiny lines, doesn’t shake. My arm is holding a glass of water and in between movements it shakes, just a little bit, but enough to make the water spill. That is my problem, not the fact that my trajectory is not ideal
Thank you

Maybe you could shot a video and post here to let us know more about the movement. Thanks