Crate rs_opw_kinematics

Source
Expand description

Rust implementation of inverse and forward kinematic solutions for six-axis industrial robots with a parallel base and spherical wrist

This work builds upon the 2014 paper titled An Analytical Solution of the Inverse Kinematics Problem of Industrial Serial Manipulators with an Ortho-parallel Basis and a Spherical Wrist, authored by Mathias Brandstötter, Arthur Angerer, and Michael Hofbaur. The paper is available on ResearchGate. Additionally, it draws inspiration from a similar C++ project, Jmeyer1292/opw_kinematics, which served as a reference implementation for generating data for the test suite. This documentation also incorporates the robot diagram from that project.

§Features

  • All returned solutions are valid, normalized, and cross-checked with forward kinematics.
  • Joint angles can be checked against constraints, ensuring only compliant solutions are returned.
  • To generate a trajectory of the robot (sequence of poses), it is possible to use “previous joint positions” as additional input.
  • If the previous joint positions are provided, the solutions are sorted by proximity to them (closest first). It is also possible to prioritize proximity to the center of constraints.
  • For kinematic singularity at J5 = 0° or J5 = ±180° positions, this solver provides reasonable J4 and J6 values close to the previous positions of these joints (and not arbitrary ones that may result in a large jerk of the real robot).
  • Jacobian, torques, and velocities
  • The robot can be equipped with the tool and placed on the base, planning for the desired location and orientation of the tool center point (TCP) rather than any part of the robot.
  • Experimental support for parameter extraction from URDF.

§Parameters

This library uses seven kinematic parameters (a1, a2, b, c1, c2, c3, and c4). This solver assumes that the arm is at zero when all joints stick straight up in the air, as seen in the image below. It also assumes that all rotations are positive about the base axis of the robot. No other setup is required.

OPW Diagram

To use the library, fill out an opw_kinematics::Parameters data structure.

§Examples

The following examples demonstrate various functionalities provided by this crate:

  • basic.rs: Basic inverse and forward kinematics, including handling of singularities.
  • constraints.rs: Limiting the rotation range of robot joints.
  • jacobian.rs: Calculating Jacobian matrices for kinematic analysis.
  • paralellogram.rs: Supporting robotic arms with a parallelogram mechanism.
  • tool_and_base.rs: Configuring robots with a tool attachment and positioning on a specified base.
  • frame.rs: Using frames, a foundational concept in robotic programming for managing coordinates.
  • complete_visible_robot.rs: Constructing a complete robot with both shape and kinematics, including visualization.

Modules§

  • Cartesian stroke
  • Implements collision detection
  • Joint limit support
  • Supports concept of the frame that is common in robotics. Transform frame allows to compute or prepare by hand joint positions of the robot once, for some “standard” location. If the target the robot needs to work with moves somewhere else, it is possible to define a “Frame”, specifying this target displacement (most often specifying 3 points both before and after displacement). The common example is robot picking boxes from the transportation pallets: the same box picking program can be used for picking from different pallets by specifying a new transport frame each time.
  • This package provides support for the Jacobian matrix.
  • Defines traits for direct and inverse kinematics.
  • Provides implementation of inverse and direct kinematics.
  • Defines a structure that combines the kinematic model of a robot with its geometrical shape. This struct provides both the kinematic functionality for computing joint positions and the physical structure used for collision detection and other geometric calculations.
  • Support for parallelogram mechanism some robots have. Like Tool and Base, Parallelogram both wraps arround some instance of Kinematics and implements Kinematics itself.
  • Error handling for parameter extractors
  • Defines the OPW parameter data structure
  • Supports extracting OPW parameters from YAML file (optional)
  • Hardcoded OPW parameters for a few robots
  • Functionality for loading Parry TriMesh from STL or PLY files.
  • Provides tool and base for the robot. Both Tool and Base take arbitrary implementation of Kinematics and are such implementations themselves. Hence, they can be cascaded, like base, having the robot, that robot having a tool:
  • Supports extracting OPW parameters from URDF (optional)
  • Helper functions
  • Provides visualization window with sliders for angles and pose.