This guide explains how to set up the Event-based Simulator (ESIM) on Ubuntu 24.04 using a DistroBox container running Ubuntu 16.04.
First, install distrobox
and podman
:
sudo apt -y install distrobox podman
-
Create a DistroBox container with Ubuntu 16.04:
distrobox create --name ubuntu-16-04 -i ubuntu:16.04
-
Enter the container:
distrobox enter ubuntu-16-04
For a detailed explanation of all the steps, visit https://wiki.ros.org/kinetic/Installation/Ubuntu
Follow these steps to install ROS Kinetic inside the container:
-
Add the ROS repository:
sudo apt -y install lsb-release curl sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
-
Update and install ROS Kinetic:
sudo apt-get update sudo apt-get install ros-kinetic-desktop-full
-
Set up the ROS environment:
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc source ~/.bashrc
-
Install ROS tools and dependencies:
sudo apt -y install \ python-rosdep python-rosinstall \ python-rosinstall-generator \ python-wstool build-essential python-rosdep sudo rosdep init rosdep update
-
Install
catkin
tools:sudo apt-get install ros-kinetic-catkin python-catkin-tools
-
Create a Catkin Workspace for the simulator:
mkdir -p ~/sim_ws/src && cd ~/sim_ws catkin init catkin config --extend /opt/ros/kinetic --cmake-args -DCMAKE_BUILD_TYPE=Release
-
Install
vcstool
for managing dependencies:sudo apt-get install python-vcstool
-
Clone the
rpg_esim
repository:cd src/ git clone https://github.com/uzh-rpg/rpg_esim.git
-
Convert SSH-based URLs in the
dependencies.yaml
file to HTTPS:sed -E 's#git@([^:]+):([^/]+)/([^\.]+)\.git#https://\1/\2/\3.git#g' rpg_esim/dependencies.yaml > rpg_esim/http_dependencies.yaml
-
Import dependencies using
vcstool
:vcs-import < rpg_esim/http_dependencies.yaml
-
Install the following required packages
sudo apt-get install ros-kinetic-pcl-ros sudo apt-get install libproj-dev sudo apt-get install libglfw3 libglfw3-dev sudo apt-get install libglm-dev sudo apt-get install ros-kinetic-hector-trajectory-server
-
Disable unused packages to streamline the build process:
cd ze_oss touch imp_3rdparty_cuda_toolkit/CATKIN_IGNORE \ imp_app_pangolin_example/CATKIN_IGNORE \ imp_benchmark_aligned_allocator/CATKIN_IGNORE \ imp_bridge_pangolin/CATKIN_IGNORE \ imp_cu_core/CATKIN_IGNORE \ imp_cu_correspondence/CATKIN_IGNORE \ imp_cu_imgproc/CATKIN_IGNORE \ imp_ros_rof_denoising/CATKIN_IGNORE \ imp_tools_cmd/CATKIN_IGNORE \ ze_data_provider/CATKIN_IGNORE \ ze_geometry/CATKIN_IGNORE \ ze_imu/CATKIN_IGNORE \ ze_trajectory_analysis/CATKIN_IGNORE
-
Build the
esim_ros
node:catkin build esim_ros
-
Create a script to initialize the ESIM workspace:
echo "source ~/sim_ws/devel/setup.bash" >> ~/setup_event_sim.sh chmod +x ~/setup_event_sim.sh
Important
From now on, every time you start a new terminal, run distrobox enter ubuntu-16-04
and then source ~/setup_event_sim.sh
to initialize the simulator workspace.
Congratulations! The simulator is now set up. For examples and usage instructions, refer to the following pages: