Skip to content

donymorph/Dongfeng_competition

Repository files navigation


Logo

Autonomous Vehicles with Carla

This repository prepared for the Dongfeng competition
THIS REPO IS UNDER DEVELOPMENT DEADLINE JUNE 2024
Explore the docs #coming soon »

View Demo #coming soon · Report Bug · Request Feature


Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. Contact
  6. Acknowledgments

About The Project ## needs to edit

![Product Name Screen Shot][product-screenshot]

Here's a blank template to get started: To avoid retyping too much info. Do a search and replace with your text editor for the following: github_username, repo_name, twitter_handle, linkedin_username, email_client, email, project_title, project_description

(back to top)

Getting Started

Install Carla simulator carla.org no less than 0.9.12 version. recommended 0.9.15

Setup

Clone the repo, setup CARLA 0.9.14 or 0.9.15, and build the conda environment: *

git clone https://github.com/donymorph/Dongfeng_competition.git
cd Dongfeng_competition
conda create -n carla python=3.8
conda activate carla
pip install -r requirements.txt

Pre-Trained Models

CARLA_GARAGE

  1. Download the pretened models for Carla garage here.
  2. Unzip and put them in the imitation_learning/carla_garage folder

Interfuser

  1. Download the pretrained model for Interfuser here
  2. put it in the imitation_learning/Interfuser folder no need to uzip

TCP

  1. Download the pretrained model for TCP here here
  2. put it in the imitation_learning/TCP folder uzip it

Transfuser

  1. Download the pretrained model for Interfuser here here
  2. put it in the imitation_learning/Interfuser folder uzip it

(back to top)

Usage

  1. first go to agents folder and try to understand the fundamentals of CARLA by running some example code in the example folder. Carla Documentation
  2. Test it
    python agents/examples/manual_control.py
    
  3. Test RL in the RL+SB3_new folder and evaluate the trained models. It used Stable Baseline3 to train RL models
    python RL_SB3_new/train.py ## for training
    python RL_SB3_new/evaluate.py ## for evaluation 
    
    it takes following arguments
    usage: eval.py [-h] [--host HOST] [--port PORT] --model MODEL [--no_render] [--fps FPS] [--no_record_video] [--config CONFIG]
    
  4. Evaluate Carla garage Trained models with Carla leaderboard 2
    python leaderboard/leaderboard_evaluator.py --agent imitation_learning/sensor_agent.py --routes routes/routes_town10.xml --agent-config pretened_models/leaderboard/ttpp_wp_all_0
    
  5. Evaluate Interfuser Trained model with Carla leaderboard 2
    python leaderboard/leaderboard_evaluator.py -a imitation_learning/interfuser/interfuser_agent.py --agent-config imitation_learning/interfuser/interfuser_config.py --routes routes/routes_town10.xml
    
  6. Evaluate TCP Trained model with Carla leaderboard 2
    python leaderboard/leaderboard_evaluator.py -a imitation_learning/TCP/tcp_agent.py --agent-config imitation_learning/TCP/new.ckpt --routes routes/routes_town10.xml
    
  7. Evaluate Transfuser Trained model with Carla leaderboard 2 || not working mmcv and mmdet conflicts
    python leaderboard/leaderboard_evaluator.py -a imitation_learning/transfuser/submission_agent.py --agent-config imitation_learning/transfuser/transfuser --routes routes/routes_town10.xml
    
    leaderboard_evaluator.py takes the following arguments
    usage: leaderboard_evaluator.py [-h] [--host HOST] [--port PORT] [--traffic-manager-port TRAFFIC_MANAGER_PORT] [--traffic-manager-seed TRAFFIC_MANAGER_SEED] [--debug DEBUG] [--record RECORD]
    [--timeout TIMEOUT] --routes ROUTES [--routes-subset ROUTES_SUBSET] [--repetitions REPETITIONS] -a AGENT [--agent-config AGENT_CONFIG] [--track TRACK] [--resume RESUME] [--checkpoint CHECKPOINT] [--debug-checkpoint DEBUG_CHECKPOINT]
    

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature-x)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature-x)
  5. Open a Pull Request

(back to top)

Contact

@email - dony.uzbguy@gmail.com

wechatID - donyuzbguy

Twitter

(back to top)

Acknowledgments

(back to top)