The AI-ready robotics dev kit, with built-in remote control and action models support.
Project description
phosphobot
A community-driven platform for robotics enthusiasts to share and explore creative projects built with the phospho Junior Dev Kit.
Overview
This repository contains demo code and community projects developed using the phospho Junior Dev Kit. Whether you're a beginner or an experienced developer, you can explore existing projects or contribute your own creations.
Getting Started
-
Get Your Dev Kit: Purchase your Phospho Junior Dev Kit at robots.phospho.ai. Unbox it and set it up following the instructions in the box.
-
Control your Robot: Donwload the Meta Quest app, connect it to your robot, start teleoperating it.
-
Record a Dataset: Record a dataset using the app. Do the same gesture 30-50 times (depending on the task complexity) to create a dataset.
-
Install the Package:
pip install --upgrade phosphobot
- Train a Model: Use Le Robot to train a policy on the dataset you just recorded.
git clone https://github.com/huggingface/lerobot.git
cd lerobot
pip install -e .
Add the configs/policy/act_so100_phosphobot.yamlfile from this repository to the lerobot/configs/policy directory in the lerobot repository.
Launch the training script with the following command from the lerobot repository (change the device to cuda if you have an NVIDIA GPU, mps if you use a MacBook Pro Sillicon, and cpu otherwise):
sudo python lerobot/scripts/train.py \
--dataset.repo_id=<HF_USERNAME>/<DATASET_NAME> \
--policy.type=<act or diffusion or tdmpc or vqbet> \
--output_dir=outputs/train/phoshobot_test \
--job_name=phosphobot_test \
--device=cpu \
--wandb.enable=true
- Use a Model: Install the phosphobot package with the support for action models:
pip install --upgrade "phosphobot[am]"
Start your phosphobot server
curl -fsSL https://raw.githubusercontent.com/phospho-app/phosphobot/main/install.sh | bash
phosphobot run
Control your robot with the model you trained:
from phosphobot.camera import AllCameras
from phosphobot.api.client import PhosphoApi
from phosphobot.am import ActionModel
import time
import numpy as np
# Connect to the phosphobot server
client = PhosphoApi(base_url="http://localhost:80")
allcameras = AllCameras()
# Get the frames from the cameras
# We will use this model: LegrandFrederic/Orange-brick-in-black-box
# It requires 3 cameras as you can see in the config.json
# https://huggingface.co/LegrandFrederic/Orange-brick-in-black-box/blob/main/config.json
# Adapt it for your setup
images = [
allcameras.get_rgb_frame(camera_id=0, resize=(240, 320)),
allcameras.get_rgb_frame(camera_id=1, resize=(240, 320)),
allcameras.get_rgb_frame(camera_id=2, resize=(240, 320)),
]
# Get the current robot state
state = client.control.read_joints()
# Replace by your model
model = ActionModel.from_pretrained(
"LegrandFrederic/Orange-brick-in-black-box", device="mps"
)
inputs = {"state": np.array(state.angles_rad), "images": np.array(images)}
action = model(inputs)
# Move the robot
client.control.write_joints(angles=action[0].tolist())
For the full detailed instructions, refer to the guide available here.
Join the Community
Connect with other developers and share your experience in our Discord community
Community Projects
Explore projects created by our community members in the code_examples directory. Each project includes its own documentation and setup instructions.
Support
- Documentation: Read the documentation
- Community Support: Join our Discord server
- Issues: Submit problems or suggestions through GitHub Issues
License
MIT License
Made with 💚 by the Phospho community
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 phosphobot-0.0.9.tar.gz.
File metadata
- Download URL: phosphobot-0.0.9.tar.gz
- Upload date:
- Size: 10.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08bdec33066477b6ca27e022f90c04791e0333a56c4d3e099433eef91aacc3e9
|
|
| MD5 |
d27ac7d28a687856d0af757d8bf552ba
|
|
| BLAKE2b-256 |
1a971dedd625c3d5d8c4abc1f978303115c8c9162cf11cd4c82a53efb6d6aae0
|
File details
Details for the file phosphobot-0.0.9-py3-none-any.whl.
File metadata
- Download URL: phosphobot-0.0.9-py3-none-any.whl
- Upload date:
- Size: 10.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6422cf1a7631fe6d508db611b0584d10970013bca24f6b00c21a0521cd6bb51
|
|
| MD5 |
1bab73d4c1a32e497c2675d31829ba90
|
|
| BLAKE2b-256 |
ebda9ac30bd71c36418d8a4e0cc8b0f134c3213be5af50cf0cfb718312318351
|