API Reference

Top-level functions

Module: rigid_body_motion

Transformations

transform_vectors

Transform an array of vectors between reference frames.

transform_points

Transform an array of points between reference frames.

transform_quaternions

Transform an array of quaternions between reference frames.

transform_coordinates

Transform motion between coordinate systems.

transform_angular_velocity

Transform an array of angular velocities between frames.

transform_linear_velocity

Transform an array of linear velocities between frames.

Reference Frames

ReferenceFrame

A three-dimensional reference frame.

register_frame

Register a new reference frame in the registry.

deregister_frame

Remove a reference frame from the registry.

clear_registry

Clear the reference frame registry.

render_tree

Render a reference frame tree.

Coordinate Systems

cartesian_to_polar

Transform cartesian to polar coordinates in two dimensions.

polar_to_cartesian

Transform polar to cartesian coordinates in two dimensions.

cartesian_to_spherical

Transform cartesian to spherical coordinates in three dimensions.

spherical_to_cartesian

Transform spherical to cartesian coordinates in three dimensions.

Lookups

lookup_transform

Look up transformation from one frame to another.

lookup_pose

Look up pose of one frame wrt a reference.

lookup_twist

Estimate linear and angular velocity of a frame wrt a reference.

lookup_linear_velocity

Estimate linear velocity of a frame wrt a reference.

lookup_angular_velocity

Estimate angular velocity of a frame wrt a reference.

Estimators

estimate_linear_velocity

Estimate linear velocity from a time series of translation.

estimate_angular_velocity

Estimate angular velocity from a time series of rotations.

shortest_arc_rotation

Estimate the shortest-arc rotation between two arrays of vectors.

best_fit_rotation

Least-squares best-fit rotation between two arrays of vectors.

best_fit_transform

Least-squares best-fit transform between two arrays of vectors.

iterative_closest_point

Iterative closest point algorithm matching two arrays of vectors.

Utility functions

from_euler_angles

Construct quaternions from Euler angles.

qinv

Quaternion inverse.

qmul

Quaternion multiplication.

qmean

Quaternion mean.

qinterp

Quaternion interpolation.

rotate_vectors

Rotate an array of vectors by an array of quaternions.

I/O functions

Module: rigid_body_motion.io

load_optitrack

Load rigid body poses from OptiTrack csv export.

Plotting

Module: rigid_body_motion.plot

reference_frame

Plot a 3D coordinate system representing a static reference frame.

points

Plot an array of 3D points.

quaternions

Plot an array of quaternions.

vectors

Plot an array of 3D vectors.

ROS interface

Module: rigid_body_motion.ros

RosbagReader

Reader for motion topics from rosbag files.

RosbagWriter

Writer for motion topics to rosbag files.

ReferenceFrameTransformBroadcaster

TF broadcaster for the transform of a reference frame wrt another.

ReferenceFrameMarkerPublisher

Publisher for the translation of a reference frame wrt another.

Transformer

Wrapper class for tf2_ros.Buffer.

init_node

Register a client node with the master.

play_publisher

Interactive widget for playing back messages from a publisher.

xarray Accessors

DataArray.rbm.qinterp

Quaternion interpolation.

DataArray.rbm.qinv

Quaternion inverse.

Class member details