Skip to content

pollen-robotics/orbita2d_control

Repository files navigation

Orbita2d actuator control libraries

Overview

This repository contains all libraries required to control an Orbita2d actuator. It allows:

  • to fully control the actuator using Python
  • access the full API (Rust package or C-API library)
  • integrate the actuator in your ROS robot (URDF and ROS2 humble control hardware interface)

Model definition

The actuator is defined by the following parameters:

  • two motors ($A$ and $B$) with their respective reduction ratio ($r_{A}$ and $r_{B}$). When not specified, they are always used in this order as argument or results. Yet, you should never nead to control them directly.
  • the output axes ($ring$ and $center$). When not specified, they are always given in that order either as argument or results.

Please refer to the following schema for more details:

orbita2d_schema

Usage

Via Rust

See orbita2d_control for more details.

Via Python

See orbita2d python bindings for more details.

ROS2 integration

Setup

  • To integrate into a ROS2 workspace, simply clone this repository into the src/ directory of your workspace.

  • Make sure to have the ros2_pollen_toolbox in the same workspace

  • Make sure to have ros2_rust setup.

    If its your first time using rust with ros Make sure to install:
    pip install git+https://github.com/colcon/colcon-cargo.git
    pip install git+https://github.com/colcon/colcon-ros-cargo.git
    
  • Make sure to use "patched version" of cargo-ament-built (see this PR for more details)

cargo install --debug --git https://github.com/jerry73204/cargo-ament-build.git  --branch conditionally-copy-cargo-lock-file
  • Update colcon-cargo with: python3 -m pip install --upgrade --force-reinstall git+https://github.com/pollen-robotics/colcon-cargo.git

Build the hwi

  • colcon build --symlink-install --packages-up-to orbita2d_system_hwi

Build the description

  • colcon build --symlink-install --packages-up-to orbita2d_description

  • See the orbita2d_description package for more details.

Contents

This repository contains the following sub-packages:

Rust packages for control

C-API library and Python bindings

ROS2 humble integration

Testing

  • Unit test and doc-test: cargo test
  • Hardware tests:
    • torque on/off: cargo run --bin test_torque -- --config $(PWD)/orbita2d_controller/config/left_shoulder_flipsky.yaml
    • velocity limit: cargo run --bin test_velocity -- --config $(PWD)/orbita2d_controller/config/left_shoulder_flipsky.yaml
    • torque limit: cargo run --bin test_torque_limit -- --config $(PWD)/orbita2d_controller/config/left_shoulder_flipsky.yaml

Changelog

See CHANGELOG.md

Related repositories

Flipsky design