This directory hosts ROS 2 API (a meta-package), which supports modular algorithm development targetted towards autonomous driving. It uses client libraries for Python and C++, and can be therefore exploited by the users to develop their algorithms flexibly.
-
Clone the
AutoDRIVE-RoboRacer-Sim-Racingrepository.$ git clone https://github.com/AutoDRIVE-Ecosystem/AutoDRIVE-RoboRacer-Sim-Racing.git
-
Give executable permissions to the Python scripts.
$ cd autodrive_devkit $ sudo chmod +x *.py
-
Install the necessary dependencies as mentioned below. AutoDRIVE Devkit's ROS 2 API has the following dependencies (tested with Python 3.8, 3.9 and 3.10):
-
Websocket-related dependencies for communication bridge between AutoDRIVE Simulator and AutoDRIVE Devkit (version sensitive):
Package Python 3.8 Python 3.9 Python 3.10 eventlet 0.33.3 0.33.3 0.33.3 Flask 1.1.1 1.1.1 1.1.1 Flask-SocketIO 4.1.0 4.1.0 4.1.0 python-socketio 4.2.0 4.2.0 4.2.0 python-engineio 3.13.0 3.13.0 3.13.0 greenlet 1.0.0 1.0.0 1.1.0 gevent 21.1.2 21.1.2 21.12.0 gevent-websocket 0.10.1 0.10.1 0.10.1 Jinja2 3.0.3 3.0.3 3.0.3 itsdangerous 2.0.1 2.0.1 2.0.1 werkzeug 2.0.3 2.0.3 2.0.3 -
Generic dependencies for data processing and visualization (usually any version will do the job):
Package Tested Version attrdict 2.0.1 numpy 1.22.2 pillow 9.0.1 opencv-contrib-python 4.10.0.84 transforms3d 0.4.2 -
Install dependencies using
requirements.txtfile (use the file specific to your Python version → check usingpython3 --version):$ pip3 install -r requirements_python_3.8.txt # Python 3.8 $ pip3 install -r requirements_python_3.9.txt # Python 3.9 $ pip3 install -r requirements_python_3.10.txt # Python 3.10
-
ROS 2 dependencies for data processing and visualization (usually any version will do the job):
$ sudo apt install ros-$ROS_DISTRO-tf-transformations $ sudo apt install ros-$ROS_DISTRO-imu-tools
-
-
Bringup:
- Headless Mode Bringup:
[OR]
$ ros2 launch autodrive_roboracer bringup_headless.launch.py
- Graphics Mode Bringup:
$ ros2 launch autodrive_roboracer bringup_graphics.launch.py
- Headless Mode Bringup:
-
Teleoperation:
$ ros2 run autodrive_roboracer teleop_keyboard