Move uArm Swift Pro Smoothly

I’m trying to use external switch closures, a joystick, to move the arm using the set_polar() method. The Python code has a loop that increments, or decrements, the stretch value, for example, and sends a command with the new value to the arm. This works but there is a significant delay between subsequent commands resulting in a start-stop motion. Can anyone suggest a way to move the arm smoothly?

You could set wait=False and set the wait time manually.

Here is a code snippet:
while GPIO.input(stretch_minus) == False:
if stretch_data < 160:
continue
stretch_data -= 5
swift.set_polar(stretch=stretch_data, speed=10000)

I am checking to see if a hardware pin is pulled low and then moving the arm. While the pin is low the arm stretch parameter is decremented and the arm moves in 5 mm steps. The arm does move in the correct direction but there is a pause between each move. How do I make it move continuously until the pin goes high?

Could you shoot a video about that to let us know more of your project?

I can do that later today.

I tried to upload the video but got a message:

Sorry, the file you are trying to upload is not authorized (authorized extensions: jpg, jpeg, png, gif).

How do I upload a video???

You could upload to youtube or google driver and send link to us.

I’m not sure how a video will help. I am still experience the problem which you can duplicate.

I still need a solution to moving the uArm Swift Pro smoothly. I replicated the code in the controller Arduino joystick code in Python with the same result I got with my original code.

while True:
if GPIO.input(stretch_minus) == False:
uarm_param_x += 2
if uarm_param_x >330:
uarm_param_x -= 2
x_str = str(uarm_param_x)
swift.send_cmd_async(msg=f"G1 X{x_str} F50")
time.sleep(0.001)

if GPIO.input(stretch_plus) == False:
    uarm_param_x -= 2
    if uarm_param_x<110:
        uarm_param_x += 2
    x_str = str(uarm_param_x)
    swift.send_cmd_async(msg=f"G1 X{x_str} F50")
    time.sleep(0.001)

As long as the pin is held low the arm moves in 2mm steps, pauses, and moves again.

How do I make the arm move without pausing between moves?

I have ordered a controller for testing but you have given me no delivery time or status.

Hi, for the order status you could contact sales@ufactory.cc with your order number.
For your project, we can not provide suggestions, you may do some research on that. Thanks.

OK, but what about the question about moving the arm continuously without pauses???

Surely there must be an answer to this question.

Hello, I’ve been trying to get help with this for a month and no one from the factory can seem to give me an answer to what seems to me to be a simple question.

As this is the only way I can find to request support I’m frustrated by the lack of response.

Can someone please give me some information that will help me find a solution?

Thanks

We are sorry that we could not provide suggestion for your project. If you have any other questions please post here. Thanks

So are you saying that you cannot tell me if the arm can be made to move smoothly?

All I want to know is if this is possible.

I want to use a joystick to control the movement of the arm smoothly without pauses, change the direction of movement, and move smoothly in a different direction.

It seems that you need give a longer step more than 2mm or you could reduce the time interval.
You could refer to the demo of uArm Controller: Controller/scene_demo/joystick_with_uArm at master · uArm-Developer/Controller · GitHub

With my Python script no matter what step size I use or how short the time interval there is always a pause between steps.