🐍 Python API

All classes listed here are available directly from the top-level franky module, e.g. from franky import Robot. For a task-oriented introduction, see the guide.

Robot

The central classes for connecting to and configuring the robot. See the Robot chapter of the guide for an introduction.

Robot

A class representing a Franka robot, and the main entry point of franky.

Model

A wrapper around franka::Model that uses Eigen types.

Frame

Enumerates the seven joints, the flange, and the end effector of a robot.

RobotState

Full state of the robot

Errors

Enumerates errors that can occur while controlling a franka::Robot.

RobotMode

Describes the robot's current mode.

RealtimeConfig

Used to decide whether to enforce realtime mode for a control loop thread.

ControllerMode

Available controller modes for a franka::Robot.

ControlSignalType

Type of control signal.

Duration

Represents a duration with millisecond resolution.

RelativeDynamicsFactor

Relative dynamics factors

DoubleDynamicsLimit

A template class representing a dynamics limit with a maximum value.

VectorDynamicsLimit

A template class representing a dynamics limit with a maximum value.

Geometry and Kinematic State

Types describing poses, twists, and joint-space and Cartesian-space states. See the Geometry chapter of the guide for an introduction.

Affine

A rigid 3D transformation consisting of a translation and a rotation.

Twist

Twist of a frame.

TwistAcceleration

Acceleration of a frame (2nd time derivative of a pose, consisting of a linear and an angular acceleration).

RobotPose

Cartesian pose of a robot.

RobotVelocity

Cartesian velocity of a robot.

ElbowState

Elbow state of the robot.

FlipDirection

Flip direction of a joint.

CartesianState

Cartesian state of a robot.

CartesianPose

Stores values for Cartesian pose motion generation.

CartesianVelocities

Stores values for Cartesian velocity motion generation.

JointState

Joint state of a robot.

JointPositions

Stores values for joint position motion generation.

JointVelocities

Stores values for joint velocity motion generation.

Torques

Stores joint-level torque commands without gravity and friction.

ReferenceType

Enum class for reference types.

CartesianReference

Cartesian impedance reference expressed in the base frame.

JointReference

Joint-space reference for joint impedance motions.

Trajectory Motions

Motion types for the four trajectory control modes. See the Trajectory Control chapter of the guide for an introduction.

Joint Position Control

Motion

JointMotion

Joint motion with a single target.

JointWaypointMotion

Joint waypoint motion.

JointWaypoint

A position waypoint with a target and optional parameters.

JointStopMotion

Stop motion for joint position control mode.

BaseJointPositionMotion

Base class for motions.

Joint Velocity Control

JointVelocityMotion

Joint velocity motion with a single target.

JointVelocityWaypointMotion

Joint velocity waypoint motion.

JointVelocityWaypoint

A waypoint with a target and optional parameters.

JointVelocityStopMotion

Stop motion for joint velocity control mode.

BaseJointVelocityMotion

Base class for motions.

Cartesian Position Control

CartesianMotion

Cartesian motion with a single target.

CartesianWaypointMotion

Cartesian waypoint motion.

CartesianWaypoint

A position waypoint with a target and optional parameters.

CartesianStopMotion

Stop motion for cartesian pose control mode.

BaseCartesianPoseMotion

Base class for motions.

Cartesian Velocity Control

CartesianVelocityMotion

Cartesian velocity motion with a single target velocity.

CartesianVelocityWaypointMotion

Cartesian velocity waypoint motion.

CartesianVelocityWaypoint

A waypoint with a target and optional parameters.

CartesianVelocityStopMotion

Stop motion for cartesian velocity control mode.

BaseCartesianVelocityMotion

Base class for motions.

Impedance and Torque Control

Client-side impedance controllers running in torque mode. See the Impedance Control chapter of the guide for an introduction.

BaseTorqueMotion

Base class for motions.

ImpedanceMotion

JointImpedanceBase

Base class for client-side joint impedance motions.

JointImpedanceMotion

Client-side joint impedance controller.

JointImpedanceTrackingMotion

Client-side joint impedance controller with a dynamic online reference.

JointImpedanceTracker

A long-lived session for streaming joint impedance tracking commands.

JointImpedanceGains

Runtime-adjustable stiffness and damping gains for joint impedance motions.

JointImpedanceParams

Parameters for joint impedance motions.

CartesianImpedanceBase

Base class for client-side cartesian impedance motions.

CartesianImpedanceMotion

Cartesian impedance motion.

CartesianImpedanceTrackingMotion

Cartesian impedance tracking motion.

CartesianImpedanceTracker

Long-lived session for streaming Cartesian impedance tracking commands.

CRITICAL

Sentinel type for CRITICAL.

CartesianImpedanceGains

Runtime-adjustable stiffness and damping gains for Cartesian impedance motions.

CartesianImpedanceParams

Parameters for the impedance motion.

CartesianImpedanceMotionParams

Parameters for the Cartesian impedance motion.

NullspaceGains

Runtime-adjustable gains for a nullspace task.

PostureTask

Joint-posture objective projected into the Cartesian nullspace.

ManipulabilityTask

Manipulability maximization objective projected into the Cartesian nullspace.

FrictionCompensationParams

Per-joint friction feedforward settings for torque-control motions.

TorqueSafetyParams

Shared torque safety limits and soft joint-limit repulsion settings for torque-control motions.

TorqueStopMotion

Graceful stop for torque-control (impedance) motions.

TorqueStopParams

Parameters for the torque-control stop motion (StopMotion<franka::Torques>).

SimpleTorqueMotion

Direct joint torque control with a signal watchdog.

SimpleTorqueParams

Parameters for SimpleTorqueMotion.

Reactions

Real-time reactions to sensor events. See the Real-Time Reactions chapter of the guide for an introduction.

Reaction

A reaction that can be attached to a motion.

Condition

A condition on the robot state.

Measure

A measure on the robot state.

TorqueReaction

A reaction that replaces the current motion with a torque motion.

JointPositionReaction

A reaction that replaces the current motion with a joint position motion.

JointVelocityReaction

A reaction that replaces the current motion with a joint velocity motion.

CartesianPoseReaction

A reaction that replaces the current motion with a Cartesian pose motion.

CartesianVelocityReaction

A reaction that replaces the current motion with a Cartesian velocity motion.

Gripper

Control of the Franka Hand. See the Gripper chapter of the guide for an introduction.

Gripper

A wrapper around the franka::Gripper class that adds asynchronous functionality.

GripperState

Describes the gripper state.

BoolFuture

A future that will eventually contain a boolean result, e.g. of an asynchronous gripper command.

Desk API

Programmatic access to the Franka Desk web interface. See the Desk API chapter of the guide for an introduction.

Desk

Robot web session for the current Franka Desk API (v1).

DeskWebSession

Desk web session for the legacy Franka Desk API.

BaseDesk

Base class for sessions with the Franka Desk web interface.

PilotButton

Buttons on the Franka Desk Pilot interface.

PilotButtonEvent

A single Pilot button state change.

BrakeState

State of the robot's joint brakes.

OperatingMode

Operating mode of the robot as reported by Franka Desk.

Exceptions

Exception

Base class for all exceptions used by libfranka.

CommandException

CommandException is thrown if an error occurs during command execution.

ControlException

ControlException is thrown if an error occurs during motion generation or torque control.

GripperException

Exception thrown by the gripper class.

IncompatibleVersionException

IncompatibleVersionException is thrown if the robot does not support this version of libfranka.

InvalidMotionTypeException

Exception thrown when an invalid motion type is used.

InvalidOperationException

InvalidOperationException is thrown if an operation cannot be performed.

ModelException

ModelException is thrown if an error occurs when loading the model library.

MotionReuseException

Exception thrown when a motion is started more than once.

NetworkException

NetworkException is thrown if a connection to the robot cannot be established, or when a timeout occurs.

ProtocolException

ProtocolException is thrown if the robot returns an incorrect message.

ReactionRecursionException

Exception thrown when the reaction recursion limit (16) is reached.

RealtimeException

RealtimeException is thrown if realtime priority cannot be set.

TorqueSignalTimeoutException

Thrown when a SimpleTorqueMotion does not receive a new torque signal in time.

DeskError

Base class for errors raised by the Desk classes.

FrankaAPIError

Raised when the Franka web API returns an error response.

TakeControlTimeoutError

Raised when control over the robot could not be obtained within the timeout.