geofikpy documentation

Add your content using reStructuredText syntax. See the reStructuredText documentation for details.

geofikpy

Actions Status Documentation Status

PyPI version Conda-Forge PyPI platforms

GitHub Discussion

Coverage

Python wrapper for GeoFIK C++ library. The wrapped functions behave almost the same as the original implementation; there are some exceptions. The C++ library here is compiled against Eigen 5.0. For further details checkout the preprint of the paper here.

Installation

To install the package simply execute the following command:

pip install geofikpy

Usage

Here is a brief snippet on how to use the package. For more details have a look at the unit tests.

import numpy as np
from geofikpy import franka_fk, franka_ik_q4

# joint configuration
q = np.array([0.0, -np.pi / 4.0, 0.0, -3 * np.pi / 4.0, 0.0, np.pi / 2.0, np.pi / 4.0])

# get SE(3) end effector pose from joint configuration
ee_pose = franka_fk(q)

# filter solutions
_sols, idx = franka_ik_q4(ee_pose[:3, -1], np.ravel(ee_pose[:3, :3]), -3 * np.pi / 4.0)
sols = np.array([sol for sol in _sols if not np.any(np.isnan(sol))])

Development Environment

Before developing, ensure that libeigen3 is installed. Using the latest Eigen 5.0, download the contents and execute

tar -xf eigen-5.0.1.tar.bz2
cd eigen-5.0.1.tar.bz2
sudo cp -r Eigen /usr/local/include/

For development a virtual environment is recommendend such as uv. Within the virtual envronenment navigate to the project directory and execute

uv pip install -e . --group dev

To execute the unit tests run

nox -s tests