Skip to main content

Frankz - Python wrapper for libfranka Franka robot control library

Project description

Frankz

Modern Python wrapper for Franka Research 3 robot control library.

Features

  • Joint Motion: Move robot to specific joint configurations with smooth trajectories
  • Trajectory Execution: Execute waypoint-based joint trajectories
  • Cartesian Control: Move end-effector to target poses in Cartesian space
  • Real-time Feedback: Monitor robot state and hardware status

Installation

pip install frankz

Requirements: Ubuntu 22.04/24.04, Python 3.9-3.12

Quick Start

Connect to your robot and move to a target pose:

import frankz
import numpy as np

# Your robot IP
robot_ip = "172.16.0.3"

# Check hardware status: is it realtime kernel? your ethernet is fast enough? (it will move)
if frankz.is_good_hardware(robot_ip):
    print("Robot ready for operation")

# Get current end-effector pose
pose = frankz.get_current_ee_pose(robot_ip)
print(f"Current position: {pose[:3, 3]}")

# Move to target joint configuration
target_joints = np.array([0.0, -0.785, 0.0, -2.356, 0.0, 1.571, 0.785])
frankz.move_to_joint(target_joints, robot_ip, max_velocity_factor=0.5)

Motion Examples

Joint Space Motion

# Simple joint move with custom speed
frankz.move_to_joint(
    target_joints,
    robot_ip,
    max_velocity_factor=0.3,      # 30% of max velocity
    max_acceleration_factor=0.3,   # 30% of max acceleration
    max_jerk_factor=0.3            # 30% of max jerk
)

Trajectory Following

# Execute multi-waypoint trajectory
waypoints = [
    np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]),
    np.array([0.5, -0.5, 0.5, -0.5, 0.5, -0.5, 0.5]),
    np.array([0.0, -0.785, 0.0, -2.356, 0.0, 1.571, 0.785]),
]

frankz.move_joints_through_trajectory(waypoints, robot_ip)

Cartesian Motion

# Move end-effector to target pose
target_pose = np.eye(4)
target_pose[:3, 3] = [0.3, 0.0, 0.5]  # Set target position

frankz.move_ee_to(
    target_pose, robot_ip,
    max_trans_velocity_factor=0.5,   # Translation limits
    max_trans_acceleration_factor=0.5,
    max_trans_jerk_factor=0.5,
    max_rot_velocity_factor=0.5,     # Rotation limits
    max_rot_acceleration_factor=0.5,
    max_rot_jerk_factor=0.5
)

Version Compatibility

Frankz version follows libfranka versioning:

  • 0.19.0.X corresponds to libfranka 0.19.0
  • 0.20.0.X corresponds to libfranka 0.20.0

The fourth digit represents the frankz patch level for that libfranka version.

License

Apache 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

frankz-0.19.0.6-cp310-cp310-manylinux_2_39_x86_64.whl (10.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.39+ x86-64

File details

Details for the file frankz-0.19.0.6-cp310-cp310-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for frankz-0.19.0.6-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 92d6bc178a7a39421bb3d0ecc30b8dcb0082d2e0ac287ba8f585537cbe79b62e
MD5 91bfbd169fd724361a019a1cc918f5c3
BLAKE2b-256 e3513ba719aa24fe3c67a878142039b1cf2b25ca185b0ddbf6ec23a866910a0e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page