Skip to main content

Reforge SDK (reforge-core)

Reforge SDK is the independently built Python package that powers Reforge calibration and model-based vibration control.

This README is intended for PyPI distribution of reforge-core.

What This Package Provides

Calibration module (reforge_core.calibration)

The calibration module provides the cloud interface used after a robot calibration run:

  • Uploads calibration data artifacts
  • Triggers identification or fine-tuning jobs in Reforge Cloud API
  • Polls job status and downloads generated model artifacts
  • Extracts returned model files for control use

Primary entry point:

  • reforge_core.calibration.api.ReforgeAPIManager

Control module (reforge_core.control)

The control module provides vibration-aware command shaping for robot trajectories:

  • Loads per-axis model files generated by calibration/identification
  • Computes shaping parameters from current robot state
  • Shapes single commands or full trajectories
  • Returns shaped positions, velocities, and accelerations for execution

Primary entry points:

  • reforge_core.control.python.covalent_wrapper.ShaperInterface
  • reforge_core.control.python.covalent_wrapper.RobotState

Interface with reforge-interface (src/robot)

Reforge SDK is designed to be consumed by the reforge-interface repository, where robot-specific integration lives.

Expected responsibilities in reforge-interface/src/robot:

  • Robot transport and SDK communication loop
  • Sensor acquisition (joint encoders, TCP accelerometer)
  • Calibration routine execution and local data storage
  • Invocation of Reforge SDK calibration + control APIs

Typical artifact flow:

  1. src/robot/run.py runs calibration and stores local data (for example under src/robot/data/<date>).
  2. ReforgeAPIManager uploads the data and requests model generation.
  3. Returned model artifacts are saved for runtime control (commonly under src/robot/models/current).
  4. ShaperInterface loads those models and the robot URDF to shape outgoing joint commands before they are sent through the robot driver in src/robot.

In this architecture, reforge-interface/src/robot owns robot I/O and execution, while reforge-core owns calibration-cloud orchestration and shaping logic.

Usage

  1. Ensure you have the requirements:
  • An accelerometer/IMU located at the tool center point (TCP) that can measure data in the x-, y-, and z-coordinates of the end-effector’s inertial frame of reference (or the robot base’s inertial frame).
  • Encoders in each joint that can accurately measure the current joint position of the robot at a rate of 200 Hz or higher.
  • A real-time SDK to access data from IMU and encoders and to command the joint motors with time-domain angular motor positions.
  • A Universal Robot Description File (URDF) that describes the robot’s kinematics and dynamics (dynamics optional but preferred).
  1. Integrate the robot’s SDK/URDF and build the project.
  • Pull the Reforge repository from Github and add your robot's SDK to requirements.txt
git clone https://github.com/reforge-robotics/reforge-interface.git
cd reforge-interface
  • Add the robot's URDF to src/robot/urdf
  • Build the project
python3.11 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pip install --no-cache-dir .
  1. Integrate your robot's SDK in src/robot/robot_interface.py

  2. Test robot connection

python3 -m robot.run connect_test <robot_ip> --local_ip <local_ip> --sdk_token <robot_sdk_token>
  1. Run the calibration and identification of models
  • Run with automatic identification
python3 -m robot.run calibrate <robot_ip> --local_ip <local_ip> --sdk_token <robot_sdk_token> --robot_id <reforge_robot_id> --freq 250 --identify <reforge_api_token>
  • Run joint-tracker calibration and save joint models
python3 -m robot.run calibrate <robot_ip> --type joint_tracker --local_ip <local_ip> --sdk_token <robot_sdk_token> --robot_id <reforge_robot_id> --identify <reforge_api_token>
  • Run shaper calibration with an MPC-compensated joint-tracker prepass, then stop before shaper identification
python3 -m robot.run calibrate <robot_ip> --type shaper --with_joint_tracker_mpc --local_ip <local_ip> --sdk_token <robot_sdk_token> --robot_id <reforge_robot_id> --joint_tracker_api_token <joint_tracker_api_token>
  • Run shaper calibration with an MPC-compensated joint-tracker prepass, then run shaper identification with the same API token
python3 -m robot.run calibrate <robot_ip> --type shaper --with_joint_tracker_mpc --local_ip <local_ip> --sdk_token <robot_sdk_token> --robot_id <reforge_robot_id> --identify <shared_api_token>
  • Run shaper calibration with an MPC-compensated joint-tracker prepass, then run shaper identification with separate API tokens
python3 -m robot.run calibrate <robot_ip> --type shaper --with_joint_tracker_mpc --local_ip <local_ip> --sdk_token <robot_sdk_token> --robot_id <reforge_robot_id> --joint_tracker_api_token <joint_tracker_api_token> --identify <shaper_api_token>
  • Run calibration first, then run identification
python3 -m robot.run calibrate <robot_ip> --local_ip <local_ip> --sdk_token <robot_sdk_token>
python3 -m robot.run identify <reforge_api_token> <reforge_robot_id> <local_data_location>
  1. Run test to verify the calibration
python3 -m robot.run vibration_test <robot_ip> <local_data_location> --local_ip <local_ip> --sdk_token <robot_sdk_token>

The robot will go through a random series of motion pairs, one uncompensated and one compensated, store the accelerometer data from the motion tests, and print out a log with the test results.

Minimal Usage Sketch

from reforge_core.calibration.api import ReforgeAPIManager
from reforge_core.control.python.covalent_wrapper import ShaperInterface, RobotState

# Calibration/model generation
api = ReforgeAPIManager(reforge_api_token="<token>", robot_id="<robot_id>")
api.run_cloud_model_generation(data_folder="src/robot/data/<YYYY-MM-DD>")

# Runtime shaping
shaper = ShaperInterface(
    sample_time=0.005,
    model_directory="src/robot/models/current",
    urdf_filepath="src/robot/urdf/<robot>.urdf",
    num_axes=3,
    num_joints=6,
)

state = RobotState(joint_angles=...)  # numpy array
shaped = shaper.shape_sample(..., state)

Installation

pip install reforge-core

Optional Extras

reforge-core keeps the base install focused on the shared calibration and control stack. Optional feature dependencies are exposed through extras:

  • pip install reforge-core[kinecal] installs the additional packages required for the reforge_core.kinecal package.
  • pip install reforge-core[joint_tracker] installs the additional packages required for the reforge_core.control.joint_tracker package.
  • pip install reforge-core[all] installs all optional runtime feature dependencies currently defined by this package.
  • pip install reforge-core[dev] installs development tooling plus the same optional runtime dependencies included by all.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reforge_core-2.0.11.tar.gz (686.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

reforge_core-2.0.11-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (850.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

reforge_core-2.0.11-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (850.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file reforge_core-2.0.11.tar.gz.

File metadata

  • Download URL: reforge_core-2.0.11.tar.gz
  • Upload date:
  • Size: 686.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for reforge_core-2.0.11.tar.gz
Algorithm Hash digest
SHA256 4292c1cdcabf36e0d1521501f848c4e60a112a273d346b9f473c11efdbec11b1
MD5 14c47361aea5f274edba3b64d20a53ba
BLAKE2b-256 391b5de5e6783ad46af966461d1d8c573ed76e1aa02188d179de84d026fefc21

See more details on using hashes here.

File details

Details for the file reforge_core-2.0.11-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for reforge_core-2.0.11-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 05cf03ae3234ed39abcae3081a4cbadc075074d2bbc31b2fd0c725626cbe03bb
MD5 50ac8e0d067e445507a3f93d150b772c
BLAKE2b-256 4b36fbf8d543408d59430730e528f3be6d2929641eb60bc4cc96956acf0c73e7

See more details on using hashes here.

File details

Details for the file reforge_core-2.0.11-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for reforge_core-2.0.11-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e46ce5cd07667cf9f79295b7d889021214655848a95f93d748d52af9f6c315a2
MD5 3bd6e904ecc7e9e8777cae1800775a44
BLAKE2b-256 14806b67b2a354d6dad6baddd62b29bfdd29a6f4fc4ec59557e2ed56828ffa0e

See more details on using hashes here.

Release history Release notifications | RSS feed

2.0.15

2 files

2.0.14

2 files

2.0.13

2 files

2.0.12

2 files

This release

2.0.11 This release

3 files

2.0.10

3 files

2.0.9

3 files

2.0.8

2 files

2.0.7

2 files

2.0.6

2 files

2.0.5

2 files

2.0.4

2 files

2.0.3

2 files

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

1.1.10

2 files

1.1.9

2 files

1.1.8

2 files

1.1.7

2 files

1.1.6

2 files

1.1.5

2 files

1.1.4

2 files

1.1.3

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 files

0.0.30

2 files

0.0.29

2 files

0.0.28

2 files

0.0.27

2 files

0.0.26

2 files

0.0.25

2 files

0.0.24

2 files

0.0.23

2 files

0.0.22

2 files

0.0.20

2 files

0.0.19

2 files

0.0.18

2 files

0.0.17

2 files

0.0.16

2 files

0.0.15

2 files

0.0.14

2 files

0.0.13

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page