Euro Truck Simulator 2 ROS2 Plugin
- ets_msgs: Messages definitions
- ets_plugin: ETS/ATS plugin library
- ets_cpp_client: Sample C++ client
This plugin has been developed in Ubuntu 18.04 using ROS2 Crystal and Euro Truck Simulator 2 (v22.214.171.124s). Instructions may vary when using different versions, but with some luck it should work anyway.
Windows is not currently supported.
- Install ROS2 following Installing ROS2 via Debian Packages
- Install colcon following Colcon Tutorial
- Install ETS or ATS using Steam
- Create a ROS2 worskpace in a location of your choice:
mkdir -p ros2_ws/src
- Clone the repository inside
git clone https://github.com/brunodmt/ets_ros2.git
- Source the ROS2 environment setup script, selecting the extension based on your shell:
- From ros2_ws, build the project:
colcon build --symlink-install. In case you get an error like:
--- stderr: ets_msgs CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find FastRTPS (missing: FastRTPS_INCLUDE_DIR FastRTPS_LIBRARIES)
export CMAKE_PREFIX_PATH=$AMENT_PREFIX_PATH:$CMAKE_PREFIX_PATH and try again.
5. Copy the generated plugin library to the ETS folder:
mkdir ~/.local/share/Steam/steamapps/common/Euro\ Truck\ Simulator\ 2/bin/linux_x64/plugins cp install/ets_plugin/lib/ets_plugin/libetsros2.so ~/.local/share/Steam/steamapps/common/Euro\ Truck\ Simulator\ 2/bin/linux_x64/plugins/
or the ATS folder:
mkdir ~/.local/share/Steam/steamapps/common/American\ Truck\ Simulator/bin/linux_x64/plugins cp install/ets_plugin/lib/ets_plugin/libetsros2.so ~/.local/share/Steam/steamapps/common/American\ Truck\ Simulator/bin/linux_x64/plugins/
- Source the generated environment setup script, selecting the extension based on your shell:
- Run the client with
- Before running the game for the first time, the Launch Options in Steam need to be updated:
- Right click the game in your Steam library
- Select properties
SET LAUNCH OPTIONS...
- Set it to:
(making sure to replace `<ros2-workspace>` with your ROS2 workspace path.
- Run the game