Comments (5)
@scottrpaterson
The robotic arm has two coordinate systems, the base coordinate system and the tool coordinate system
set_position
is to move in the base coordinate systemset_tool_position
is to move in the tool coordinate system- Relatively speaking,
set_position
is the movement of the absolute position, andset_tool_position
is the movement of the relative position get_position
gets the position of the end center in the base coordinate system- 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.
@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.
Any ideas? Thanks!
from xarm-python-sdk.
@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.
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.
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)
- Regarding impedance-control frame rates HOT 4
- Persistant balancing/vibration issue. HOT 1
- Linear track does not working when the arm is at mode 6 HOT 1
- [SDK][ERROR][base.py:374] - - API -> set_servo_angle -> code=1 HOT 4
- Not able to move the 7th joint of xArm7 using set_servo_angle HOT 2
- Strange Torque Sensor Manual Mode Movements HOT 2
- xArm Lite 6 motor temperature overheating HOT 5
- Question: Understanding swapping modes and states HOT 3
- Does the impedance control support robot movements? HOT 1
- How to clear/overwrite previously sent commands? HOT 4
- Release notes for version 1.13.19
- Running gcode in Studio and with Python run_gcode_file() is not the same (Lite6) HOT 1
- Gripper is not working using official example HOT 4
- Wrong forward kinematics? HOT 5
- Speed argument ignored by `set_servo_angle_j` HOT 2
- ServoJ speed limit errors HOT 4
- Updating Release Tags HOT 1
- set_only_check_type Lite6 not working
- Trouble Recovering from Collision HOT 6
- xARM 6 Lite Python SDK change of initial joint position HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xarm-python-sdk.