zhijieq

End2Race

roboticsapache-2.0transformers

huggingface.co/zhijieq/End2Race

Updated 2026-09-23 ·Open on Hugging Face →
transformers · safetensors · end2race · feature-extraction · robotics · reinforcement-learning · autonomous-racing · f1tenth · gymnasium · pytorch · custom_code · arxiv:2509.16894 · license:apache-2.0 · region:us

End2Race

End2Race is an end-to-end policy and simulation environment for multi-vehicle autonomous racing on F1TENTH. It maps 2D LiDAR scans and vehicle speed directly to steering and speed commands at 40 Hz. This repository provides a quick demo of the environment and pretrained policy.

If you find this model helpful, please give us a star on GitHub!

Installation

``bash pip install "https://huggingface.co/zhijieq/End2Race/resolve/main/end2race-1.0.0rc2-py3-none-any.whl" ``

Quickstart

Single-Vehicle Timed Trial

```python import gymnasium as gym from transformers import AutoModel

import end2race # registers End2Race-v0

policy = AutoModel.from_pretrained("zhijieq/End2Race", trust_remote_code=True)

env = gym.make( "End2Race-v0", track="Austin", # Austin, Hockenheim, MoscowRaceway, Nuerburgring mode="single", laps=1, # target laps to complete render_mode="human", # "human" for interactive viewer or None )

observation, info = env.reset() policy.reset() done = False

while not done: action = policy.act(observation) observation, reward, terminated, truncated, info = env.step(action) done = terminated or truncated

env.close() print(f"Outcome: {info['outcome']} | Lap Times: {info['lap_times']} | Avg Speed: {info['avg_speed']:.2f} m/s") ```

Head-to-Head Racing

```python import gymnasium as gym from transformers import AutoModel

import end2race # registers End2Race-v0

policy = AutoModel.from_pretrained("zhijieq/End2Race", trust_remote_code=True)

env = gym.make( "End2Race-v0", track="Austin", # Austin, Hockenheim, MoscowRaceway, Nuerburgring mode="multi", opponent_raceline="raceline0", # raceline0 (inner), raceline1 (center), or raceline2 (outer) speed_scale=0.6, # opponent speed multiplier start_idx=0, # ego start waypoint index gap=15, # opponent lead in waypoints (~0.2 m each) duration=8.0, # episode duration in seconds render_mode="human", # "human" for interactive viewer or None )

observation, info = env.reset() policy.reset() done = False

while not done: action = policy.act(observation) observation, reward, terminated, truncated, info = env.step(action) done = terminated or truncated

env.close() print(f"Outcome: {info['outcome']} | Avg Speed: {info['avg_speed']:.2f} m/s") ```

Environment Parameters

| Parameter |     Type     | Default | Description | |:---|:---:|:---|:---| | track | str | "Austin" | Track choice: "Austin", "Hockenheim", "MoscowRaceway", or "Nuerburgring". | | mode | str | "multi" | "multi" (head-to-head racing) or "single" (solo timed trial). | | opponent_raceline | str | "raceline0" | Opponent raceline: "raceline0" (inner), "raceline1" (center), or "raceline2" (outer). | | speed_scale | float | 0.6 | Multiplier on opponent target speed. | | start_idx | int | 0 | Ego starting waypoint index along the track. | | gap | int | 15 | Initial waypoint lead for opponent (~0.2 m per waypoint). | | duration | float | 8.0 | Episode duration in seconds ("multi" mode). | | laps | int | 1 | Number of laps to complete ("single" mode). | | render_mode | str | None | "human" (GUI window) or None (headless simulation). |

Interface

Observations (gymnasium.spaces.Dict)

Actions

float32[2] as [steering_angle_rad, desired_speed_m_per_s]. Steering is clipped to [-0.4189, 0.4189] rad (±24°).

Policy Methods

Episode Termination

Citation

``bibtex @misc{qiao2025end2race, title={End2Race: An End-to-End Learning Framework for Multi-Vehicle Autonomous Racing}, author={Zhijie Qiao and Haowei Li and Zhong Cao and Henry X. Liu}, year={2025}, eprint={2509.16894}, archivePrefix={arXiv}, primaryClass={cs.RO}, url={https://arxiv.org/abs/2509.16894}, } ``

Mirrored from the Hugging Face Hub and served from the Conceptio Open Knowledge Archive. Read the original card at https://huggingface.co/zhijieq/End2Race.