Coder Social home page Coder Social logo

Comments (5)

vimior avatar vimior commented on August 16, 2024

@scottrpaterson
The robotic arm has two coordinate systems, the base coordinate system and the tool coordinate system

  1. set_position is to move in the base coordinate system
  2. set_tool_position is to move in the tool coordinate system
  3. Relatively speaking, set_position is the movement of the absolute position, and set_tool_position is the movement of the relative position
  4. get_position gets the position of the end center in the base coordinate system
  5. In general, the end center position is always the origin of the tool coordinate system, so there is no get_tool_position

from xarm-python-sdk.

scottrpaterson avatar scottrpaterson commented on August 16, 2024

@vimior Thank you for the reply! That does help a lot.

Perhaps you can help with the reason why I was trying to find get_tool_position in the first place.

I'm trying to do a tool coordinate move: set_position_aa(...is_tool_coord=True,relative=True...), the reason for this is I only need to increment Y by 20mm to go from position A to C. I know the base coordinates of position A and B, but not C. I do know that C is 20mm Y away from position A. Hense I need to do a tool coord move.

I can't figure out how to go to position C without moving to A again, then doing a 20mm relative tool cord move to get to C. It works, but it's an extra step. Ideally there is a way to get directly from B to C.

This is why I was trying to figure out my tool position at point A. So I could go simply remember that position and add 20mm to the Y to find the point of C. I can't use set_tool_position since I don't know the tool position of any of the points.

untitled

Any ideas? Thanks!

from xarm-python-sdk.

penglongxiang avatar penglongxiang commented on August 16, 2024

@scottrpaterson in this case, I am afraid you need to do some calculations. First use the orientation of pose A to calculate its rotation matrix R w.r.t base coordinate system, then calculate Rdy where dy = [0, 20, 0] column vector. At last, adding Rdy to the known position coordinate of A, there comes the position coordinate of C w.r.t base.

from xarm-python-sdk.

scottrpaterson avatar scottrpaterson commented on August 16, 2024

Thank you for the reply @penglongxiang

Is there no function that already exists for this math?

If not, would it be possible to add this feature? I think it would be very useful.

from xarm-python-sdk.

penglongxiang avatar penglongxiang commented on August 16, 2024

hi @scottrpaterson, There is no such function available now. You can search for python functions or open-source scripts that can do Roll/Pitch/Yaw->rotation matrix transformations and support basic matrix calculations, maybe numpy is a good choice.

from xarm-python-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.