This is a ROS implementation of the client and driver from the TORCS SCR C++ client. For the code in this repository to work, you need a patched version of torcs1.3.7. This has been tested with Ubuntu 24.04 and ROS2 Jazzy. For reference, the old ROS1 version is still available in the ros1 branch.
- Install the patched version of torcs1.3.7 according to its installation instructions
- Install ROS2 Jazzy according to the installation instructions
- Clone this repository into your workspace and build it by running
colcon build --packages-up-to torcs_ros_bringup && source install/setup.bash
From the folder you cloned torcs-1.3.7 to, run
./BUILD/bin/torcs
or
./BUILD/bin/torcs -noisy
if you want noisy sensors (see the SCR-Manual for details)
To start all nodes including the simple driver, the image publisher and rviz, run
ros2 launch torcs_ros_bringup torcs_ros_bringup_launch.py
If you want to use your own driver instead of the simple driver in torcs_ros_drive_ctrl
, run
ros2 launch torcs_ros_bringup torcs_ros_bringup_launch.py use_driver:=False