Go here for the Unity project of the simulator.
The computing part the simulator is placed in the ubuntu environment.
It is possible to execute this in a virtual machine or on a native ubuntu PC.
1. Ubuntu Version: 18.04 with ROS Melodic
2. Ubuntu Version: 20.04 with ROS Noetic
Please follow the corresponding instructions to build and run the repository correctly.
Go here for installation of ROS Melodic and install ros-melodic-desktop.
If this is the first distribution of ROS that you installed on your PC, please execute (if not already done in the ROS Melodic installation):
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
If you already installed a ROS distribution on your PC, go to your home directory and check the file ".bashrc" for the line
"source /opt/ros/.../setup.bash"
and replace the distribution with "melodic". If you can't see the file ".bashrc" in your home directory press "Strg + H".
There are some requirements that are maybe not automatically installed with ROS.
- For the usage of git:
sudo apt-get install git
- For the compressed image transport:
sudo apt-get install ros-melodic-compressed-image-transport
- Create new catkin workspace
mkdir -p ~/catkin_ws/src
- Go to the source folder of your workspace
cd ~/catkin_ws/src
- Clone the repository from bitbucket
git clone https://github.com/repa1030/simulator_ubuntu.git
- Go to the simulator_ubuntu folder
cd simulator_ubuntu
- Initialize the git submodules
git submodule init
- Update the git submodules
git submodule update
- Go to your catkin workspace
cd ~/catkin_ws/
- Update ROS dependencies
rosdep update
- Install ROS dependencies
rosdep install --from-paths src --ignore-src --rosdistro melodic -y
- Build your catkin_ws
catkin_make
- Source the workspace
source ~/catkin_ws/devel/setup.bash
- Run the desired package/system:
- Rosbridge Server
roslaunch hska_adas rosbridge.launch
- Ego Vehicle Visualization
roslaunch hska_adas car.launch
- Cruise Controller
roslaunch hska_adas adas_cc.launch
- Lane Keeping Assist System
roslaunch hska_adas adas_lkas.launch
- Full ADAS Functionality
roslaunch hska_adas adas_full.launch
- Rosbridge Server
- Probably the visualization of the images from unity is not working due to errors in rqt_image_view.
If this happens make sure the compressed_image_transport package is installed.
sudo apt-get install ros-melodic-compressed-image-transport
- If there are some errors facing the messages and message types (e.g. twist stamped, ...) just restart the launch file.
- If the simulator in Windows was stopped there might be some warning messages in the console.
Best practice is to restart the launch file if this happens otherwise there might be some complications
If you are using Ubuntu 20.04 and ROS Noetic, make sure to switch the serializer to Newtonsoft JSON
in the Main Menu of the Unity Project due to complications in deserialization of BSON in the current version of the ROSBRIDGE.
Go here for installation of ROS Noetic and install ros-noetic-desktop.
If this is the first distribution of ROS that you installed on your PC, please execute (if not already done in the ROS Noetic installation):
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
If you already installed a ROS distribution on your PC, go to your home directory and check the file ".bashrc" for the line
source /opt/ros/.../setup.bash"
and replace the distribution with "noetic". If you can't see the file ".bashrc" in your home directory press "Strg + H".
There are some requirements that are not automatically installed with ROS.
- For the usage of git:
sudo apt-get install git
- For linking the env to python3:
sudo apt-get install python-is-python3
- For using rosdep:
sudo apt-get install python3-rosdep
- Create new catkin workspace
mkdir -p ~/catkin_ws/src
- Go to the source folder of your workspace
cd ~/catkin_ws/src
- Clone the repository from bitbucket
git clone https://github.com/repa1030/simulator_ubuntu.git
- Go to the simulator_ubuntu folder
cd simulator_ubuntu
- Initialize the git submodules
git submodule init
- Update the git submodules
git submodule update
- Go to your catkin workspace
cd ~/catkin_ws/
- Update ROS dependencies
rosdep update
- Install ROS dependencies
rosdep install --from-paths src --ignore-src --rosdistro noetic -y
- Build your catkin_ws
catkin_make
- Source the workspace
source ~/catkin_ws/devel/setup.bash
- Run the desired package/system:
- Rosbridge Server
roslaunch hska_adas rosbridge.launch bson_only:=false
- Ego Vehicle Visualization
roslaunch hska_adas car.launch
- Cruise Controller
roslaunch hska_adas adas_cc.launch bson_only:=false
- Lane Keeping Assist System
roslaunch hska_adas adas_lkas.launch bson_only:=false
- Full ADAS Functionality
roslaunch hska_adas adas_full.launch bson_only:=false
- Rosbridge Server
- Probably the visualization of the images from unity is not working due to errors in rqt_image_view.
If this happens make sure the compressed_image_transport package is installed.
sudo apt-get install ros-noetic-compressed-image-transport
- If there are some errors facing the messages and message types (e.g. twist stamped, ...) just restart the launch file.
- If the simulator in Windows was stopped there might be some warning messages in the console.
Best practice is to restart the launch file if this happens otherwise there might be some complications - RQT (or other ros core nodes) throwing an python error. This might happen due to missing python3 linking to env.
sudo apt-get install python-is-python3