Skip to content

About

A package that uses Pinocchio and an extended URDF format to solve constraint equations in closed-loop robotic mechanisms.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

robot_model

The **robot_model** package provides extended URDF-based robot modeling with support for closed-loop kinematics via constraint definitions.

It enables computing a full, valid joint configuration from a subset of joint values while satisfying kinematic constraints.

Key Idea

Using the constraints in a URDF file makes the new description compatible with existing packages. This package provides a solution to solve the constraints during runtime using pinocchio to calculate the kinematics and the jacobians of the tree and use it to close the loop using a numerical solver.

Features

  • Support for closed-loop kinematics
  • Constraint-based joint completion
  • Integration with Pinocchio for tree kinematics and dynamics
  • Direct XML string parsing (in-memory model creation without temporary files) alongside file-based loading
  • Python API via pybind11
  • Access to:
    • joints (active, passive, end-effector)
    • constraints
    • limits
    • kinematics & Jacobians

Supported Constraints

  • Fixed (cut link)
  • Revolute (using parent axis)
  • Spherical (no axes)

Architecture

  • URDF (extended) -> parsed via custom urdfdom
  • Pinocchio -> tree kinematics & dynamics
  • RobotModel class -> constraint-aware abstraction layer
  • levenbergMarquardt function -> calculate a state that satisfies the constraint based on a minimal set of joint values, e.g. Endeffector position or measured active joint values, using a Levenberg Marquardt Algorithm with a line-search to find a feasible step-size for each iteration

Dependencies

You must use the modified versions:

Pinocchio must be rebuilt against the modified urdfdom.

Installation

  1. Add all required repositories to your workspace:

    • urdfdom_headers
    • urdfdom
    • pinocchio
    • robot_model
  2. Build:

    colcon build
    source install/setup.bash

Usage

Use the package as a library in Python or C++. The main entry point is the RobotModel class.

Python API

from robot_model import RobotModel

# 1. Load from a file path:
model = RobotModel("/path/to/robot.urdf")

# 2. Load directly from an in-memory XML string (e.g., generated by xacro):
xml_string = "<robot name='my_robot'>...</robot>"
model = RobotModel(xml_string)  # auto-detected as XML, or: RobotModel.fromXML(xml_string)

# Inspect model info
print(f"Degrees of freedom: {model.degrees_of_freedom}")
print(f"Joint names: {model.joint_names}")

C++ API

#include "robot_model/model/robot_model.hpp"

// 1. Load from a file path:
robot_model::RobotModel model("/path/to/robot.urdf");

// 2. Load directly from an in-memory XML string:
std::string xml_string = "<robot name='my_robot'>...</robot>";
robot_model::RobotModel model(xml_string); // or: robot_model::RobotModel::fromXML(xml_string);

Capabilities

  • Tree representation via Pinocchio
  • Constraint handling
  • Limit checking
  • State handling between motion state of the URDF and Pinocchio states
  • Closed-loop kinematics solving

Roadmap

  • Upstream URDF extensions into official urdfdom
  • Add support for additional constraint types

Support

Fabian.Finkbeiner@hs-heilbronn.de

Acknowledgment

Developed by the Robotics Lab at Heilbronn University of Applied Sciences

Supported by autonox Robotics GmbH

About

A package that uses Pinocchio and an extended URDF format to solve constraint equations in closed-loop robotic mechanisms.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages