Sign inSign up

cyberbotics/pyikfast

By cyberbotics

•Updated almost 6 years ago

Python bindings for the `ikfast` library and utilities to generate the inverse kinematics solution

Image
0

1.7K

cyberbotics/pyikfast repository overview

⁠Python Bindings for ikfast

Generate a Python ikfast library from the given URDF file. This project provides all necessary utilities to generate ikpy C++ files and Python bindings for it.

⁠Getting Started

Export URDF from Webots:
Export URDF menu

(right click on the robot in scene tree) > Export > (name it `robot.urdf`) > Save

Move to the directory with robot.urdf and execute:

docker run -v ${PWD}:/output cyberbotics/pyikfast [base_link] [effector]

After a few minutes your Python library should be ready ready! Install it as:

pip3 install .

Use the library:

import pyikfast


target_translation = [0.5, 0.5, 0.5]
target_rotation = [1, 0, 0, 0, 1, 0, 0, 0, 1]

# Calculate inverse kinematics
positions = pyikfast.inverse(target_translation, target_rotation)
print(positions)

# Calculate forward kinematics (we use the third IK solution)
translation, rotatation = pyikfast.forward(positions[2])
print(translation, rotation)

Tag summary

Content type

Image

Digest

Size

1.1 GB

Last updated

almost 6 years ago

docker pull cyberbotics/pyikfast