Skip to main content

Genesis Forge

Genesis Forge is a powerful robotics reinforcement learning framework using the Genesis physics simulator. It provides a flexible and modular architecture to get your robot up and running quickly with less boilerplate work.

RL Robotics What?

Today, modern robots learn to balance, walk, and manipulate objects using Reinforcement Learning algorithms. You simply create a program that defines a task and provides feedback on the robot's performance — much like training a dog with treats and commands. But with modern GPUs, you can parallelize this process across thousands of simulated robots at a time. Genesis Forge is a framework that makes this very easy to do, with documentation and examples to get you started.

Features:

  • 🦿 Action manager - Control your joints and actuators, within limits and with domain randomization
  • 🏆 Reward/Termination managers - Simple and extensible reward/termination handling with automatic logging
  • ↪️ Command managers - Commands your robot with debug visualization
  • 🏔️ Terrain manager - Helpful terrain utilities and curriculums
  • 💥 Contact manager - Comprehensive contact/collision detection and reward/termination functions
  • 👊 Event manager - Randomly push your robot during training, to make it more robust
  • 📈 Monitors - Log anything about your robot, including estimated motor power and torque, and use it in your rewards
  • 🎬 Video Wrapper - Automatically records videos at regular intervals during training
  • 🕹️ Gamepad interface - Control trained policies directly with a physical gamepad controller.
  • 🤖 Deployment export - Move a trained policy to a real robot without hand-recreating the observation and action pipelines
  • And more...

Learn more in the documentation

Massively parallel locomotion training Gamepad controller interface Rough terrain Complex robots Obstacle avoidance

Install

Before installing Genesis Forge, ensure you have:

  • Python >=3.10,<3.14
  • pip package manager

(Optional) CUDA-compatible GPU for faster training

pip install genesis-forge

To run a trained policy on a robot, install only the simulation-free runtime -- it depends on numpy alone, so it fits on a Raspberry Pi or Jetson:

pip install genesis-forge-runtime

See the deployment guide for the full walkthrough.

Example

Here's an example of a environment to teach the Go2 robot how to follow direction commands. See the full runnable example here.

class Go2CEnv(ManagedEnvironment):
    def __init__(self, num_envs: int = 1):
        super().__init__(num_envs=num_envs)

        # Construct the scene
        self.scene = gs.Scene(show_viewer=False)
        self.scene.add_entity(gs.morphs.Plane())
        self.robot = self.scene.add_entity(
            gs.morphs.URDF(
                file="urdf/go2/urdf/go2.urdf",
                pos=[0.0, 0.0, 0.35],
                quat=[1.0, 0.0, 0.0, 0.0],
            ),
        )

    def config(self):
        # Robot manager - Reset the robot's initial position on reset
        self.robot_manager = EntityManager(
            self,
            entity=self.robot,
            on_reset={
                "position": {
                    "fn": reset.position(
                        position=[0.0, 0.0, 0.35],
                        quat=[1.0, 0.0, 0.0, 0.0],
                    ),
                },
            },
        )

        # Joint Actuators & Actions
        self.actuator_manager = ActuatorManager(
            self,
            joint_names=[".*"],
            default_pos={
                ".*_hip_joint": 0.0,
                ".*_thigh_joint": 0.8,
                ".*_calf_joint": -1.5,
            },
            kp=20,
            kv=0.5,
        )
        self.action_manager = PositionActionManager(
            self,
            scale=0.25,
            use_default_offset=True,
            actuator_manager=self.actuator_manager,
        )

        # Commanded direction
        self.velocity_command = VelocityCommandManager(
            self,
            range={
                "lin_vel_x": [-1.0, 1.0],
                "lin_vel_y": [-1.0, 1.0],
                "ang_vel_z": [-1.0, 1.0],
            },
        )

        # Rewards
        RewardManager(
            self,
            cfg={
                "base_height_target": {
                    "weight": -50.0,
                    "fn": rewards.base_height(target_height=0.3),
                },
                "tracking_lin_vel": {
                    "weight": 1.0,
                    "fn": rewards.command_tracking_lin_vel(
                        vel_cmd_manager=self.velocity_command,
                    ),
                },
                "tracking_ang_vel": {
                    "weight": 1.0,
                    "fn": rewards.command_tracking_ang_vel(
                        vel_cmd_manager=self.velocity_command,
                    ),
                },
                "lin_vel_z": {
                    "weight": -1.0,
                    "fn": rewards.lin_vel_z_l2(),
                },
            },
        )

        # Termination conditions
        self.termination_manager = TerminationManager(
            self,
            logging_enabled=True,
            term_cfg={
                # The episode ended
                "timeout": {
                    "fn": terminations.timeout(),
                    "time_out": True,
                },
                # Terminate if the robot's pitch and yaw angles are too large
                "fall_over": {
                    "fn": terminations.bad_orientation(limit_angle=10),  # degrees
                },
            },
        )

        # Observations
        ObservationManager(
            self,
            cfg={
                "velocity_cmd": {"fn": self.velocity_command.observation},
                "angle_velocity": {
                    "fn": lambda env: self.robot_manager.get_angular_velocity(),
                },
                "linear_velocity": {
                    "fn": lambda env: self.robot_manager.get_linear_velocity(),
                },
                "projected_gravity": {
                    "fn": lambda env: self.robot_manager.get_projected_gravity(),
                },
                "dof_position": {
                    "fn": lambda env: self.action_manager.get_dofs_position(),
                },
                "dof_velocity": {
                    "fn": lambda env: self.action_manager.get_dofs_velocity(),
                    "scale": 0.05,
                },
                "actions": {
                    "fn": observations.current_actions(),
                },
            },
        )

Learn More

Check out the user guide and API reference

Citation

If you used Genesis Forge in your research, we would appreciate it if you could cite it.

@misc{Genesis-Forge,
  author = {Jeremy Gillick},
  title = {Genesis Forge: A modular framework for RL robot environments},
  month = {September},
  year = {2025},
  url = {https://github.com/jgillick/genesis-forge}
}

Metadata

Release files for genesis-forge 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for genesis-forge 1.2.0
File Size Uploaded Provenance Actions
genesis_forge-1.2.0.tar.gz 260.6 kB Without provenance Details for genesis_forge-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for genesis-forge 1.2.0
File Interpreter ABI Platform Actions
genesis_forge-1.2.0-py3-none-any.whl Python 3 none any Details for genesis_forge-1.2.0-py3-none-any.whl

Total release size: 463.9 kB

Release files / genesis_forge-1.2.0.tar.gz

Download URL genesis_forge-1.2.0.tar.gz
Size 260.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0ac970352106e591962b93cc0ba929d66c4f15c1ed53a4afa08202012b12b742
BLAKE2b-256 checksum
How to use checksums
248b65842b8c64cb9d1432c2953c623c9e10447a3ad1b37e8d61bc3768f3d72b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / genesis_forge-1.2.0-py3-none-any.whl

Download URL genesis_forge-1.2.0-py3-none-any.whl
Size 203.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
975a727ece74211279edfccfd70298c7720751d66f9395ab0fd7873d12863d94
BLAKE2b-256 checksum
How to use checksums
6f6ebb928c5ff3f2d4c49dd38c5c111fdc03440215d8d3b32240f64833658bef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.14

Security for genesis-forge 1.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page