Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/source/_toctree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@
title: Reachy 2
- local: unitree_g1
title: Unitree G1
- local: earthrover_mini_plus
title: Earth Rover Mini
title: "Robots"
- sections:
- local: phone_teleop
Expand Down
206 changes: 206 additions & 0 deletions docs/source/earthrover_mini_plus.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
# EarthRover Mini Plus

The EarthRover Mini Plus is a fully open source mobile robot that connects through the cloud using the Frodobots SDK. This lets you control the robot and record datasets for training AI models.

## What You Need

### Hardware

- EarthRover Mini robot
- Computer with Python 3.10 or newer
- Internet connection

### Setting Up the Frodobots SDK

The robot needs the [Frodobots SDK](https://github.com/Frodobots/earth-rovers-sdk) running on your computer. Here's how:

1. Download and install the SDK:

```bash
git clone https://github.com/Frodobots/earth-rovers-sdk.git
cd earth-rovers-sdk
pip install -r requirements.txt
```

2. Start the SDK:

```bash
hypercorn main:app --reload
```

3. Open your web browser and go to `http://localhost:8000`, then click "Join"

The SDK gives you:

- Live video from front and rear cameras

> [!IMPORTANT]
> The SDK must be running before you can use the robot.

## Install LeRobot

Follow our [Installation Guide](./installation) to install LeRobot.

In addition to the base installation, install the EarthRover Mini dependencies:

```bash
pip install -e .
```

## How It Works

The robot uses the internet to communicate:

- **Movement commands**: Sent through the SDK
- **Camera video**: Received from the SDK
- **Robot info**: Battery, location, speed from the SDK

You don't need to plug anything in - it all works through the SDK.

## Calibration

No calibration needed! The robot is ready to use as soon as the SDK is running.

## Controlling the Robot

You control the robot using your keyboard - just like playing a video game with WASD keys.

### Keyboard Controls

| Key | Action |
| --- | -------------------------------- |
| W | Move forward |
| S | Move backward |
| A | Turn left (with forward motion) |
| D | Turn right (with forward motion) |
| Q | Rotate left in place |
| E | Rotate right in place |
| X | Stop all movement |
| +/= | Increase speed |
| - | Decrease speed |
| ESC | Disconnect |

### Speed Settings

You can adjust how fast the robot moves:

- **Forward/backward speed**: Default is full speed (1.0)
- **Turning speed**: Default is full speed (1.0)
- **Speed changes**: Use +/- keys to adjust by 0.1 each time

### Try It Out

Test driving the robot before recording data:

```python
from lerobot.robots.earthrover_mini_plus import EarthRoverMiniPlus, EarthRoverMiniPlusConfig
from lerobot.teleoperators.keyboard import KeyboardRoverTeleop, KeyboardRoverTeleopConfig

# Initialize robot
robot_config = EarthRoverMiniPlusConfig()
robot = EarthRoverMiniPlus(robot_config)

# Initialize teleoperator
teleop_config = KeyboardRoverTeleopConfig(
linear_speed=1.0,
angular_speed=1.0,
speed_increment=0.1
)
teleop = KeyboardRoverTeleop(teleop_config)

# Connect
robot.connect()
teleop.connect()

# Teleoperate (use keyboard controls)
try:
while True:
action = teleop.get_action()
robot.send_action(action)
except KeyboardInterrupt:
pass
finally:
robot.disconnect()
teleop.disconnect()
```

> [!TIP]
> If you're using a Mac, you might need to give Terminal permission to access your keyboard for teleoperation. Go to System Preferences > Security & Privacy > Input Monitoring and check the box for Terminal.

## Recording Data

Once you can drive the robot well, you can start recording data to train AI models. The system records:

- **What you do**: How you move the robot (forward, backward, turning)
- **What the robot sees**:
- Videos from both cameras
- Robot speed and direction
- Battery level and location
- GPS position and signal
- Other sensor data
- **When it happened**: Timestamps for everything

### Setting Up Hugging Face

We use Hugging Face to store your data online. First, log in with your token from [Hugging Face settings](https://huggingface.co/settings/tokens):

```bash
huggingface-cli login --token ${HUGGINGFACE_TOKEN} --add-to-git-credential
```

Store your Hugging Face username:

```bash
HF_USER=$(huggingface-cli whoami | head -n 1)
echo $HF_USER
```

### Start Recording

Use the standard recording command:

```bash
python src/lerobot/scripts/lerobot_record.py \
--robot.type=earthrover_mini_plus \
--teleop.type=keyboard_rover \
--dataset.repo_id=your_username/dataset_name \
--dataset.num_episodes=2 \
--dataset.fps=10 \
--dataset.single_task="Navigate around obstacles" \
--display_data=true
```

Replace `your_username/dataset_name` with your Hugging Face username and a name for your dataset.

### What Gets Saved

Your dataset includes:

**Your Actions (2 things)**:

- How much you moved forward/backward
- How much you turned left/right

**Robot Observations (12 things)**:

- Front camera video
- Rear camera video
- Current speed
- Battery level
- Which way the robot is facing
- GPS location (latitude, longitude, signal strength)
- Network signal strength
- Vibration level
- Lamp status (on/off)

### Where Your Data Goes

On your computer: `~/.cache/huggingface/lerobot/{repo-id}`

After recording, your data automatically uploads to your Hugging Face page:

```bash
echo https://huggingface.co/datasets/${HF_USER}/earthrover-navigation
```

Your dataset will be tagged with `LeRobot` for community discovery.
20 changes: 20 additions & 0 deletions src/lerobot/robots/earthrover_mini_plus/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env python

# Copyright 2025 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from .config_earthrover_mini_plus import EarthRoverMiniPlusConfig
from .robot_earthrover_mini_plus import EarthRoverMiniPlus

__all__ = ["EarthRoverMiniPlus", "EarthRoverMiniPlusConfig"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env python

# Copyright 2025 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Configuration for EarthRover Mini Plus robot."""

from dataclasses import dataclass

from ..config import RobotConfig


@RobotConfig.register_subclass("earthrover_mini_plus")
@dataclass
class EarthRoverMiniPlusConfig(RobotConfig):
"""Configuration for EarthRover Mini Plus robot using Frodobots SDK.

This robot uses cloud-based control via the Frodobots SDK HTTP API.
Camera frames are accessed directly through SDK HTTP endpoints.

Attributes:
sdk_url: URL of the Frodobots SDK server (default: http://localhost:8000)
"""

sdk_url: str = "http://localhost:8000"
Loading