Reforge Core SDK by Reforge Robotics.
Project description
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.ShaperInterfacereforge_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:
src/robot/run.pyruns calibration and stores local data (for example undersrc/robot/data/<date>).ReforgeAPIManageruploads the data and requests model generation.- Returned model artifacts are saved for runtime control (commonly under
src/robot/models/current). ShaperInterfaceloads those models and the robot URDF to shape outgoing joint commands before they are sent through the robot driver insrc/robot.
In this architecture, reforge-interface/src/robot owns robot I/O and execution, while reforge-core owns calibration-cloud orchestration and shaping logic.
python_src_root should point at the reforge-interface/src directory so runtime dependencies (for example dynamics utilities and robot assets) can be resolved.
Usage
- 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).
- 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 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pip install --no-cache-dir .
-
Integrate your robot's SDK in
src/robot/robot_interface.py -
Test robot connection
python3 -m robot.run connect_test <robot_ip> --local_ip <local_ip> --sdk_token <robot_sdk_token>
- 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 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>
- 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",
python_src_root="src",
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reforge_core-0.0.20.tar.gz.
File metadata
- Download URL: reforge_core-0.0.20.tar.gz
- Upload date:
- Size: 116.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e6722ea2eb62349d5227302623a7673bd7651edcd10eb4ccb526a6676becdcb
|
|
| MD5 |
ef7680c3b7669891b2479cedd532a955
|
|
| BLAKE2b-256 |
410de8ab1100e491eda3e289ca0de40de6d9dc8dc3699e76b9a84dc242b967d8
|
File details
Details for the file reforge_core-0.0.20-cp311-cp311-macosx_26_0_arm64.whl.
File metadata
- Download URL: reforge_core-0.0.20-cp311-cp311-macosx_26_0_arm64.whl
- Upload date:
- Size: 372.1 kB
- Tags: CPython 3.11, macOS 26.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80d9da49168cbea318db03e188dac627d9fac066ddce4ad8f69bfa8bb410421e
|
|
| MD5 |
ef60da319a718aa1270a76fbcf2b658e
|
|
| BLAKE2b-256 |
c00b0f342690d6f2f6c50db7408278a050635ff5a915385b3d736c818a8656a4
|