Welcome to the world of autonomous driving simulations! With the rapid advancement in artificial intelligence, tools like **DI-drive** are paving the way for a future where cars can make decisions just like us. In this blog, we’ll explore how to install and run DI-drive, offering a smooth ride through its functionalities and quick-start features.
What is DI-drive?
**DI-drive** is an open-source Decision Intelligence Platform designed specifically for simulating autonomous driving scenarios. It integrates various training methods such as Imitation Learning and Reinforcement Learning into a single, user-friendly platform. By utilizing simulators like Carla and MetaDrive, DI-drive allows developers to test their algorithms in diverse driving environments.
Installation
Before you hit the road with DI-drive, ensure you have the following prerequisites:
- Python Version: 3.5
- DI-engine: 0.3.1 (Pytorch is also necessary)
- Simulators: At least one of either Carla or MetaDrive installed
To install DI-drive from the source code, follow these steps:
git clone https://github.com/opendilab/DI-drive.git
cd DI-drive
pip install -e .
This command will clone the DI-drive repository and install the necessary dependencies automatically. Make sure to set the required simulator in the core/__init__.py file to avoid import errors.
Quick Start
Running Carla
Once Carla is installed, you can visualize the driving scenarios by executing the auto policy. Make sure the Carla server is up and running:
cd demo
auto_run
python auto_run.py
Getting Started with MetaDrive
For MetaDrive users, initiate your Reinforcement Learning training as follows:
cd demo
metadrive
python macro_env_dqn_train.py
Refer to the official documentation for detailed guidance on conducting experiments using Imitation Learning and Reinforcement Learning tactics in various simulators.
Exploring the Model Zoo & Case Zoo
DI-drive is equipped with a Model Zoo that showcases various algorithms for Imitation Learning and Reinforcement Learning, such as:
- Conditional Imitation Learning
- Learning by Cheating
- From Continuous Intention to Continuous Trajectory
Moreover, the DI-drive Casezoo combines real driving data, mimicking real-life driving conditions to enhance training accuracy and reliability.
Troubleshooting
As you explore DI-drive, you might encounter a few bumps along the road. Here are some troubleshooting tips:
- Installation Errors: Ensure that you’re using Python 3.5 and the versions of DI-engine and Pytorch are compatible.
- Simulator Not Running: Double-check that your Carla or MetaDrive server is correctly installed and running before initializing the scripts.
- Import Errors: Verify that the selected simulators in
core/__init__.pyare correctly specified.
For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Conclusion
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

