LeNewton is a simulation environment for the SO100 robot arm, built on top of the Newton physics engine and NVIDIA Warp. It provides a high-performance, differentiable simulation platform for robotic manipulation tasks.
- Python 3.11
- CUDA-capable GPU (recommended for Warp/Newton)
-
Clone the repository:
git clone https://github.com/makolon/lenewton.git cd lenewton -
Install the package:
pip install -e .
You can find example scripts in the examples/ directory. To run the basic environment creation and block stacking task example:
python examples/01_create_env.pyThis script demonstrates:
- Creating a
BlockStackTask. - Initializing the
LeNewtonEnvwith the SO100 robot. - Setting up the viewer and video recording.
Tasks are defined by inheriting from LeNewtonTask. See src/lenewton/tasks/block_stacking.py for a reference implementation.
from lenewton.env import LeNewtonEnv
from lenewton.tasks import BlockStackTask
# Define the task
task = BlockStackTask(
task_name="BlockStack",
goal_str="Stack the blocks",
max_steps=500
)
# Initialize the environment
env = LeNewtonEnv(
task=task,
render_mode="rgb_array",
use_viewer=True
)
# Simulation loop
obs = env.reset()
# ... action loop ...lenewton/
├── examples/ # Example scripts
├── src/
│ └── lenewton/
│ ├── assets/ # Robot URDFs, meshes, and scene XMLs
│ ├── tasks/ # Task definitions (e.g., BlockStackTask)
│ ├── teleop/ # Teleoperation & data collection
│ ├── utils/ # Utilities for simulation
│ └── env.py # Main environment class
├── pyproject.toml # Project configuration and dependencies
└── README.md
This project is licensed under the terms of the included LICENSE file.