Comments (9)
Hello,
Do you know the value of your origin_rotation
?
from ikpy.
Basically I only know objects placement in global coordinates. I understood a link origin_rotation is defined in local coordinates so no: I don't know each link origin_rotation.
An other question torments me: is axis defined in local coordinates too ?
EDIT: this is an example of placements. FreeCAD represents rotation in ZYX convention and degrees but I can get quaternions.
from ikpy.
Ok I get it.
In this case you don't care about origin_translation or origin_rotation.
These are positional attributes of your link at the origin of the robot (e.g. the table)
In your case, you want to position the other links of the robot and that's easy:
- Create a robot using a chain of links, indépendant of the position
- Apply inverse kinematics on the robot. In order to do so, you effectively need to transform your Pos+Yaw/Pitch/Roll coordinates into a transformation matrix. This can be done easily using the following function: https://github.com/Phylliade/ikpy/blob/master/src/ikpy/utils/geometry.py#L56
from ikpy.
- But I can't create a chain of links with all null origins and rotations, it has no sense ! As I only know the objects global placement and relative rotation axis I have to compute the links data from them.
- I already use inverse kinematics to set the robot in this position but it only works from an aligned state. If I have a robot in the state shown I don't know how to put it back (think I can't save the chain data).
from ikpy.
Actually links and chains are just abstract representations, they don't require any positions or orientation to work
For example, we create here a chain that looks like yours without any position or orientation
The orientation and positions appear when doing forward and inverse kinematics
from ikpy.
without any position or orientation
I'm not agree as you use ikpy/resources/poppy_ergo.URDF in which we find such data:
<link name="base_link"> <inertial> <origin xyz="-0.00619082439227047 1.87708924758407E-10 0.0111397401808713" rpy="0 0 0" />
parsed by
Line 241 in 3966be9
so origin_translation and origin_orientation are initialized.
I still argue that building a string without these values makes no sense. Firstly because joint angle obviously depends on link length.
from ikpy.
Yep you're right, that's just a misanderstanding.
To recap:
- You have on one hand your chains's geometry, where each link has a defined geometry, such as
<link name="base_link"><origin xyz="-0.00619082439227047 1.87708924758407E-10 0.0111397401808713" rpy="0 0 0" />
That's all you need to create a chain. It is something you bring by yourself when using IKPy - You move your chain using actuators positions (e.g. angles), using IKPy forward and inverse kinematics functions
- And get final positions
From what i get of your issue is that you want to infer chain geometry from final positions.
The issue is that it's only one particular final position, and you won't be able to infer rotation axes from the final positions (you can infer positions and orientations, but not the rotation axes).
Unfortunately IKPy won't help you here.
The simplest solution by far is to ask FreeCAD to export your chain's geometry, for example to export a URDF file, as in https://answers.ros.org/question/355109/create-a-urdfxacro-file-from-model-of-freecad/
With this URDF file, you can use IKPy on it, as described in https://github.com/Phylliade/ikpy/blob/master/tutorials/Quickstart.ipynb
from ikpy.
Solved.
FreeCAD has placement calculus implemented and I found how to get origin relative to another.
[…]
URDFLink(
"Arm3",
(obj('Arm2').Placement.inverse()*obj('Arm3').Placement).Base, # origin translation
rpy((obj('Arm2').Placement.inverse()*obj('Arm3').Placement).Rotation), # origin rotation
[0, 1, 0], # rotation axis
None, # translation axis
(None, None), # bounds
)
[…]
from ikpy.
Great!
from ikpy.
Related Issues (20)
- Issue in Chain.plot method when ax = None HOT 3
- Not working with full referential (orientation mode "all") with unity orientation HOT 5
- [regression] inverse kinematic from urdf chain broken in 3.3 HOT 7
- Trouble creating chain with URDFlink HOT 3
- how to get pose? HOT 2
- Supporting ik interpolation between two positions HOT 4
- How to add constrains to the chain to ensure the robot arm is always above the workbench? HOT 2
- The ValueError:“x0” is infeasible HOT 6
- How to use ikpy together with any other path planning algorithm to achieve obstacles avoidance? HOT 2
- ValueError: Unknown joint type: continuous HOT 7
- Issue to reach position AND orientation (3axes) target HOT 2
- Python not detecting ikpy package
- Working with 2 decimal places - different results
- Problem with inverse kinematics
- Multiple inverse kinematics HOT 1
- Orientation Discrepancies in Inverse Kinematics
- Poppy examples not working
- mujoco mjcf file format HOT 1
- Support for modified DH parameters
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 ikpy.