xArm-Developer / xArm-Python-SDK

Python SDK for UFACTORY robots, 850, xArm5/6/7, and Lite6.
https://www.ufactory.cc
BSD 3-Clause "New" or "Revised" License
163 stars 105 forks source link

SDK 1.11.5 - Relative moves with X value are opposite - Bug #52

Closed scottrpaterson closed 6 months ago

scottrpaterson commented 1 year ago

Example:

What was working: arm.set_position_aa(axis_angle_pose=[-10, 10, 0, 0, 0, ], relative=True, wait=True, speed=200,is_tool_coord=True)

What is now required: arm.set_position_aa(axis_angle_pose=[10, 10, 0, 0, 0, ], relative=True, wait=True, speed=200,is_tool_coord=True)


It appears that with relative moves the value of X must now be opposite from what it was before 1.11.5

vimior commented 1 year ago

@scottrpaterson Sorry, our documentation does not elaborate on this point. In fact, the relative and is_tool_coord parameters of the set_position_aa interface cannot be True at the same time, and one of them will be invalid. When relative is True in SDK 1.11.5 and earlier, the is_tool_coord parameter will be neglect. Considering that the movement in the tool coordinate system itself is a relative movement, so we start from 1.11.6 and change it to when is_tool_coord is True, the relative parameter is invalid, you can get the latest update and use it. Thank you for your support and advice.

scottrpaterson commented 1 year ago

@vimior

I tried what you said today. However even if I set is_tool_coord parameter to False, it does not accomplish the same result.

For example, before 1.11.5, when I would run this: arm.set_position_aa(axis_angle_pose=[-10, 10, 0, 0, 0, ], relative=True, wait=True, speed=200,is_tool_coord=True)

It would be -10mm move only the X axis.

Now when I run: arm.set_position_aa(axis_angle_pose=[-10, 10, 0, 0, 0, ], relative=True, wait=True, speed=200,is_tool_coord=False)

It is a move -10, but it is on the X + Y axis.

With the new changes, there is no way to make a relative tool move using set_position_aa. Now I have to change my code to use set_tool_position instead.

If this is your expected result, then this is not a bug.

vimior commented 1 year ago

Regarding the relative movement of the set_position_aa interface, there will be movement in the direction where the axis_angle_pose parameter is not 0. I cannot reproduce the axis_angle_pose=[-10, 10, 0, 0, 0, ] you said, only the movement in the x direction, normal There should be movement in both x and y directions. The relative and is_tool_coord parameter priorities of the original SDK are different from those of the firmware, and the result may be a bit unsatisfactory, but in general, both x and y should move. If it's just movement in the x direction, axis_angle_pose should be [x, 0, 0, 0, 0, ] like this.

Can you specify the firmware version you used for testing, the version of the two versions of SDK, and the starting position of the test, so that we can reproduce this situation, thank you for your support.

scottrpaterson commented 1 year ago

I made a mistake in my example above, sorry about that. I meant to say:

Before 1.11.5, when I would run this: arm.set_position_aa(axis_angle_pose=[10, 0, 0, 0, 0, ], relative=True, wait=True, speed=200,is_tool_coord=True)

It would be 10mm move only the X axis.

Now with 1.11.5, when I run: arm.set_position_aa(axis_angle_pose=[10, 0, 0, 0, 0, ], relative=True, wait=True, speed=200,is_tool_coord=False)

It is a move 10mm, but it is on the X + Y axis. Not only the X axis.

--

I changed all my code so that it now uses set_tool_position instead of set_position_aa, which solves this problem. So I don't really have a problem anymore. But just wanted to point out to you that this changed.

penglongxiang commented 1 year ago

Hi @scottrpaterson, sorry about the confusion. In fact we have updated the Python SDK (now v1.11.6) yesterday to correct the set_position_aa() interface. You may pull the latest version and check if the issue you mentioned have been solved with the new SDK.

vimior commented 1 year ago

@scottrpaterson Because what we expect is not like this, axis_angle_pose=[10, 0, 0, 0, 0, 0], the expectation is only the movement in the x direction, is it convenient to provide some information for us to reproduce

  1. The firmware version currently in use
  2. The version of Python used
  3. The original SDK version
  4. The starting position of the test