Top Related Projects
Open-source simulator for autonomous driving research.
An open autonomous driving platform
Open source simulator for autonomous vehicles built on Unreal Engine / Unity, from Microsoft AI & Research
A self-driving car simulator built with Unity
openpilot is an operating system for robotics. Currently, it upgrades the driver assistance system in 275+ supported cars.
Quick Overview
LGSVL Simulator is an open-source, Unity-based autonomous vehicle simulator designed for testing and development of self-driving systems. It provides a realistic 3D environment with customizable scenarios, sensor simulation, and integration with various autonomous driving stacks.
Pros
- Highly customizable and extensible platform for autonomous vehicle testing
- Supports integration with popular autonomous driving frameworks like ROS, ROS2, and Autoware
- Offers a wide range of sensor simulations, including cameras, LiDAR, and GPS
- Provides a user-friendly web interface for scenario creation and management
Cons
- Requires significant computational resources for high-fidelity simulations
- Learning curve can be steep for users unfamiliar with Unity or autonomous vehicle development
- Limited documentation for advanced features and customizations
- May require additional effort to achieve perfect real-world correlation
Getting Started
-
Clone the repository:
git clone https://github.com/lgsvl/simulator.git
-
Install dependencies:
- Unity 2020.3.33f1
- Python 3.7 or higher
- NVIDIA GPU with driver version 510.47 or higher (for GPU acceleration)
-
Open the project in Unity and build the simulator:
- Open Unity Hub
- Add the cloned project
- Open the project with Unity 2020.3.33f1
- Go to File > Build Settings
- Select your target platform and click "Build"
-
Run the simulator:
- Launch the built executable
- Use the web interface at
http://localhost:8080
to create and manage simulations
-
Connect to an autonomous driving stack:
- Install the LGSVL Python API:
pip install lgsvl
- Use the API to connect and control the simulator programmatically
- Install the LGSVL Python API:
For detailed instructions and API documentation, refer to the official LGSVL Simulator documentation.
Competitor Comparisons
Open-source simulator for autonomous driving research.
Pros of CARLA
- More active development and larger community support
- Built-in traffic simulation and pedestrian behavior
- Extensive documentation and tutorials
Cons of CARLA
- Higher system requirements for smooth operation
- Steeper learning curve for beginners
Code Comparison
CARLA example (Python):
import carla
client = carla.Client('localhost', 2000)
world = client.get_world()
blueprint_library = world.get_blueprint_library()
vehicle_bp = blueprint_library.find('vehicle.tesla.model3')
spawn_point = world.get_map().get_spawn_points()[0]
vehicle = world.spawn_actor(vehicle_bp, spawn_point)
LGSVL Simulator example (Python):
import lgsvl
sim = lgsvl.Simulator(address="localhost", port=8181)
spawns = sim.get_spawn()
state = lgsvl.AgentState()
state.transform = spawns[0]
ego = sim.add_agent("Lincoln2017MKZ (Apollo 5.0)", lgsvl.AgentType.EGO, state)
Both simulators offer Python APIs for vehicle spawning and control, but CARLA's API is more verbose and provides more detailed control over the simulation environment. LGSVL Simulator's API is more concise and easier to use for basic operations.
An open autonomous driving platform
Pros of Apollo
- Comprehensive autonomous driving platform with real-world deployment capabilities
- Extensive hardware and sensor integration support
- Large and active community with frequent updates and contributions
Cons of Apollo
- Steeper learning curve due to complex architecture
- Higher system requirements for running simulations
- More challenging to set up and configure for beginners
Code Comparison
Apollo (C++):
void Planning::RunOnce(const LocalView& local_view,
ADCTrajectory* const trajectory_pb) {
// Planning logic implementation
}
Simulator (C#):
public void Run()
{
// Simulation loop implementation
}
Key Differences
- Apollo focuses on end-to-end autonomous driving solutions, while Simulator emphasizes realistic virtual environments for testing and development
- Apollo provides a complete stack for autonomous vehicles, whereas Simulator specializes in creating diverse scenarios for testing
- Apollo uses C++ for core functionality, while Simulator is primarily built with Unity and C#
Use Cases
- Apollo: Developing and deploying full autonomous driving systems
- Simulator: Testing and validating autonomous driving algorithms in various virtual scenarios
Both repositories serve important roles in the autonomous driving ecosystem, with Apollo offering a comprehensive platform for real-world deployment and Simulator providing a flexible environment for testing and development.
Open source simulator for autonomous vehicles built on Unreal Engine / Unity, from Microsoft AI & Research
Pros of AirSim
- More extensive documentation and tutorials
- Broader range of supported environments (indoor, outdoor, urban)
- Better integration with machine learning frameworks like TensorFlow and PyTorch
Cons of AirSim
- Steeper learning curve for beginners
- Less focus on autonomous driving scenarios
- Requires more computational resources for realistic simulations
Code Comparison
AirSim example (Python):
import airsim
client = airsim.MultirotorClient()
client.enableApiControl(True)
client.armDisarm(True)
client.takeoffAsync().join()
client.moveToPositionAsync(-10, 10, -10, 5).join()
LGSVL Simulator example (Python):
import lgsvl
sim = lgsvl.Simulator(address="localhost", port=8181)
ego_vehicle = sim.add_agent("Lincoln2017MKZ (Apollo 5.0)", lgsvl.AgentType.EGO, state)
sim.run(time_limit=10)
Both simulators offer Python APIs for controlling vehicles and environments. AirSim focuses more on drone simulations, while LGSVL Simulator is tailored for autonomous driving scenarios. AirSim provides more detailed control over vehicle dynamics, while LGSVL Simulator offers easier integration with popular autonomous driving stacks like Apollo and Autoware.
A self-driving car simulator built with Unity
Pros of self-driving-car-sim
- Simpler and more beginner-friendly
- Focuses specifically on lane-following and behavioral cloning
- Lightweight and runs on less powerful hardware
Cons of self-driving-car-sim
- Limited scope and features compared to simulator
- Less realistic graphics and physics
- Lacks advanced sensor simulation capabilities
Code Comparison
self-driving-car-sim (Unity C#):
void FixedUpdate () {
float steering = maxSteeringAngle * Input.GetAxis("Horizontal");
float motor = maxMotorTorque * Input.GetAxis("Vertical");
float breaking = Input.GetKey(KeyCode.Space) ? breakingForce : 0f;
ApplyLocalPositionToVisuals(wheelCollider);
}
simulator (Python):
def on_new_frame(self, frame: np.ndarray, timestamp: int):
if self.bridge is None:
return
self.bridge.send_image(frame)
self.bridge.send_transform(self.agent.state.transform)
self.bridge.send_velocity(self.agent.state.velocity)
The code snippets show that self-driving-car-sim focuses on basic vehicle control in Unity, while simulator provides more advanced functionality for sending sensor data and vehicle state information to external systems.
openpilot is an operating system for robotics. Currently, it upgrades the driver assistance system in 275+ supported cars.
Pros of openpilot
- Real-world application: Designed for actual vehicle control and autonomous driving
- Active community: Large user base and frequent updates
- Hardware compatibility: Supports various car models and aftermarket devices
Cons of openpilot
- Limited simulation capabilities: Primarily focused on real-world driving
- Higher barrier to entry: Requires specific hardware and vehicle compatibility
Code Comparison
openpilot (Python):
def update(self):
self.sm.update()
self.state = State.from_cereal(self.sm['controlsState'])
self.enabled = self.state.enabled
self.active = self.state.active
simulator (C#):
public void Update()
{
CurrentTime += Time.deltaTime;
UpdateSensors();
UpdateNPCs();
}
Key Differences
- Purpose: openpilot is for real-world autonomous driving, while simulator is for virtual testing
- Language: openpilot primarily uses Python, simulator uses C# (Unity-based)
- Scope: openpilot focuses on vehicle control, simulator provides a broader testing environment
Use Cases
- openpilot: Ideal for implementing and testing autonomous driving systems in real vehicles
- simulator: Better suited for virtual testing, scenario creation, and sensor simulation
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
SVL Simulator: An Autonomous Vehicle Simulator
Sunsetting SVL Simulator
LG has made the difficult decision to suspend active development of SVL Simulator, as of January 1, 2022.
There are no plans for any new or bugfix releases of SVL Simulator in 2022. There will be no new source code changes pushed to GitHub, and there will be no reviews or merging of Pull Requests submitted on GitHub for SVL Simulator or any of its related plug-ins. There will be no new simulator assets built and shared nor updates made to existing assets by the SVL Simulator team.
We will make a reasonable effort to keep the wise.svlsimulator.com website up and running through at least Thursday, June 30, 2022, and will also maintain the SVLSimulator.com web site including the simulator documentation pages through at least Thursday, June 30, 2022.
At this time we do not plan to remove the SVL Simulator source code (and related plug-in) projects from GitHub. The open source project and source code will remain available for anyone who wants to build (or modify) SVL Simulator.
We apologize for any inconvenience this may cause and appreciate your understanding.
Sincerely,
The SVL Simulator team
Questions
Q: Will SVL Simulator run locally without the wise.svlsimulator.com web site?
A: The latest released version of SVL (2021.3) requires the use of the WISE (web user interface) cloud service to download assets, configure simulation clusters, and create and launch simulations. It may be possible to remove this dependency (e.g. in a fork; see below) and then build and launch a local simulator instance.
Q: Will LG release the source code for the WISE (web user interface) cloud service?
A: There are no plans at this time to release the source code for WISE.
Q: Would LG be interested in transferring the SVL Simulator project to someone interested in taking over the project?
A: There are no plans at this time to transfer the SVL Simulator project (or the WISE cloud service).
Q: Will the Simulator Software License Agreement be changed?
A: There are no plans at this time to change the Simulator Software License Agreement.
Q: Can users share source code changes and forks of SVL Simulator?
A: As a GitHub project, anyone is able to create their own fork; in fact, there are already over 500 such forks of the SVL Simulator project. Users can then make changes and even submit pull requests back to the original (parent) project. While we have no plans to review or merge such changes into the main project, users are free to review open PRs and create their own local build from their own or any other public fork.
Q: Can users share new builds of SVL Simulator?
A: The Simulator Software License Agreement allows you to âmodify or create derivative works of the Licensed Materialsâ and only restricts their commercial use. Therefore, it is ok for users to share new builds of SVL Simulator as long as such builds are not sold or otherwise used for commercial purposes.
Q: What about the SVL Simulator Premium product and/or cloud simulation service?
A: There are no plans at this time to offer a SVL Simulator Premium product or cloud service.
Q: Can users still post technical questions on GitHub?
A: Technical questions may be posted to the SVL Simulator Issues page on GitHub but may not be answered by the SVL Simulator team. We encourage users to help each other with questions or issues that are posted.
Q: What if there are other questions not addressed in this document?
A: Other questions may be posted to the SVL Simulator Issues page on GitHub.
Project README
Stay Informed
Check out our latest news and subscribe to our mailing list to get the latest updates.
Introduction
LG Electronics America R&D Lab has developed an HDRP Unity-based multi-robot simulator for autonomous vehicle developers. We provide an out-of-the-box solution which can meet the needs of developers wishing to focus on testing their autonomous vehicle algorithms. It currently has integration with The Autoware Foundation's Autoware.auto and Baidu's Apollo platforms, can generate HD maps, and can be immediately used for testing and validation of a whole system with little need for custom integrations. We hope to build a collaborative community among robotics and autonomous vehicle developers by open sourcing our efforts.
To use the simulator with Apollo 6.0 or master, first download the simulator binary, then follow our Running with latest Apollo docs.
To use the simulator with Autoware.auto, first download the simulator binary, then follow the guide on our Autoware.auto.
For users in China, you can view our latest videos here and download our simulator releases here (code: 6k91). 对äºä¸å½çç¨æ·ï¼æ¨ä¹å¯å¨åå©åå©ä¸è§çæ们ææ°åå¸çè§é¢ï¼ä»ç¾åº¦ç½ç(æåç : 6k91)ä¸ä¸è½½ä½¿ç¨æ们ç仿çå¨ã
Paper
If you are using SVL Simulator for your research paper, please cite our ITSC 2020 paper: LGSVL Simulator: A High Fidelity Simulator for Autonomous Driving
@article{rong2020lgsvl,
title={LGSVL Simulator: A High Fidelity Simulator for Autonomous Driving},
author={Rong, Guodong and Shin, Byung Hyun and Tabatabaee, Hadi and Lu, Qiang and Lemke, Steve and Mo{\v{z}}eiko, M{\=a}rti{\c{n}}{\v{s}} and Boise, Eric and Uhm, Geehoon and Gerow, Mark and Mehta, Shalin and others},
journal={arXiv preprint arXiv:2005.03778},
year={2020}
}
Getting Started
You can find complete and the most up-to-date guides on our documentation website.
Running the simulator with reasonable performance and frame rate (for perception related tasks) requires a high performance desktop. Below is the recommended system for running the simulator at high quality. We are currently working on performance improvements for a better experience.
Recommended system:
- 4 GHz Quad Core CPU
- Nvidia GTX 1080, 8GB GPU memory
- Windows 10 64 Bit
The easiest way to get started with running the simulator is to download our latest release and run as a standalone executable.
Currently, running the simulator in Windows yields better performance than running on Linux.
Downloading and starting simulator
- Download the latest release of the SVL Simulator for your supported operating system (Windows or Linux) here: https://github.com/lgsvl/simulator/releases/latest
- Unzip the downloaded folder and run the executable.
See the full installation guide here.
Building and running from source
If you would like to customize the simulator, build simulation content, or access specific features available in Developer Mode, you can clone the project with Unity Editor, and build the project from source.
Check out our instructions for getting started with building from source here. Note: Please checkout the "release-*" branches or release tags for stable (ready features) and "master" branch for unstable (preview of work in progress).
Simulator Instructions (from 2021.1 release onwards)
- After starting the simulator, you should see a button to "Link to Cloud".
- Use this button to link your local simulator instance to a cluster on our web user interface.
- Now create a random traffic simulation. For a standard setup, select "BorregasAve" for map and "Jaguar2015XE with Apollo 5.0 sensor configuration" for vehicle. Click "Run" to begin.
- The vehicle should spawn inside the map environment that was selected.
- Read here for an explanation of all current keyboard shortcuts and controls.
- Follow the guides on our respective Autoware and Apollo 5.0 repositories for instructions on running the platforms with the simulator.
NOTE: If using a release older than "2021.1", please follow the instructions on our documentation archives.
Guide to simulator functionality
Look here for a guide to currently available functionality and features.
Contact
Please feel free to provide feedback or ask questions by creating a Github issue. For inquiries about collaboration, please email us at contact@svlsimulator.com.
Copyright and License
Copyright (c) 2019-2021 LG Electronics, Inc.
This software contains code licensed as described in LICENSE.
Top Related Projects
Open-source simulator for autonomous driving research.
An open autonomous driving platform
Open source simulator for autonomous vehicles built on Unreal Engine / Unity, from Microsoft AI & Research
A self-driving car simulator built with Unity
openpilot is an operating system for robotics. Currently, it upgrades the driver assistance system in 275+ supported cars.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot