No version for distro humble. Known supported distros are highlighted in the buttons above.
No version for distro jazzy. Known supported distros are highlighted in the buttons above.
No version for distro rolling. Known supported distros are highlighted in the buttons above.
No version for distro noetic. Known supported distros are highlighted in the buttons above.
No version for distro ardent. Known supported distros are highlighted in the buttons above.
No version for distro bouncy. Known supported distros are highlighted in the buttons above.
Repository Summary
Checkout URI | https://github.com/brunodmt/ets_ros2.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2019-06-09 |
Dev Status | DEVELOPED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
ets_cpp_client | 0.1.2 |
ets_msgs | 0.1.2 |
ets_plugin | 0.1.2 |
README
Euro Truck Simulator 2 ROS2 Plugin
ETS2 (Euro Truck Simulator 2) & ATS (American Truck Simulator) SDK plug-in to publish telemetry data using ROS2.
Project Structure
- ets_msgs: Messages definitions
- ets_plugin: ETS/ATS plugin library
- ets_cpp_client: Sample C++ client
Supported Environment
This plugin has been developed in Ubuntu 18.04 using ROS2 Crystal and Euro Truck Simulator 2 (v1.34.0.34s). Instructions may vary when using different versions, but with some luck it should work anyway.
Windows is not currently supported.
Prerequisites
- Install ROS2 following Installing ROS2 via Debian Packages
- Install colcon following Colcon Tutorial
- Install ETS or ATS using Steam
Building instructions
- Create a ROS2 worskpace in a location of your choice:
mkdir -p ros2_ws/src
- Clone the repository inside
ros2_ws/src
:git clone https://github.com/brunodmt/ets_ros2.git
- Source the ROS2 environment setup script, selecting the extension based on your shell:
source /opt/ros/crystal/setup.<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)
run export CMAKE_PREFIX_PATH=$AMENT_PREFIX_PATH:$CMAKE_PREFIX_PATH
and try again.
- 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:
source install/setup.<shell>
- Run the client with
./install/ets_cpp_client/bin/ets_cpp_client/ets_cpp_client
- 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
- Select
SET LAUNCH OPTIONS...
- Set it to:
LD_LIBRARY_PATH=/opt/ros/crystal/opt/yaml_cpp_vendor/lib:/opt/ros/crystal/opt/rviz_ogre_vendor/lib:/opt/ros/crystal/lib:<ros2-workspace>/install/ets_msgs/lib:$LD_LIBRARY_PATH %command%
(making sure to replace `<ros2-workspace>` with your ROS2 workspace path. 9. Run the game
CONTRIBUTING
No CONTRIBUTING.md found.
No version for distro eloquent. Known supported distros are highlighted in the buttons above.
No version for distro dashing. Known supported distros are highlighted in the buttons above.
No version for distro galactic. Known supported distros are highlighted in the buttons above.
No version for distro foxy. Known supported distros are highlighted in the buttons above.
No version for distro iron. Known supported distros are highlighted in the buttons above.
No version for distro lunar. Known supported distros are highlighted in the buttons above.
No version for distro jade. Known supported distros are highlighted in the buttons above.
No version for distro indigo. Known supported distros are highlighted in the buttons above.
No version for distro hydro. Known supported distros are highlighted in the buttons above.
No version for distro kinetic. Known supported distros are highlighted in the buttons above.
No version for distro melodic. Known supported distros are highlighted in the buttons above.