⚙️ Installation
Info
S-Graphs has only been tested on Ubuntu 22.04, ROS2 Foxy, Humble Distros.
📦 From Source
Important
Before proceeding, make sure you have rosdep
installed. You can install it using sudo apt-get install python3-rosdep
In addition, ssh keys are needed to be configured on you GitHub account. If you haven't
yet configured ssh keys, follow this tutorial
- Update Rosdep:
rosdep init
rosdep update --include-eol-distros
- Create a ROS2 workspace for S-Graphs
mkdir -p $HOME/workspaces && cd $HOME/workspaces
- Clone the S-Graphs repository into the created workspace
git clone git@github.com:snt-arg/lidar_situational_graphs.git -b feature/multi_floor s_graphs
Info
If you have Nvidia GPU please install CUDA from this link. This code has only been tested with CUDA 11.8.
If you dont have CUDA S-Graphs will use CPU only.
- Install required dependencies.
Info
Lidar SGraphs can can take some time to build depending on the platform and may consume a lot of memory.
If your computer does not have a lot of RAM is it advised to limit the number of threads make uses with
export MAKEFLAGS="-j <n>
, where <n>
should be replaced with the max of number of CPUs. Change $ROS_DISTRO to your ros2 version.
cd s_graphs && source /opt/ros/$ROS_DISTRO/setup.sh && ./setup.sh
Info
If you want to compile with debug traces (from backward_cpp) run:
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_RGB_CLOUD=ON
Optional ROS1 Install (Old Version of Room Segmentation)
!!! info
This is an optional older version of room segmentation algorithm which requires ROS1 noetic. There is no hard dependecy on this package so you can easily ignore this step.
##### Download ROS Bridge
source /opt/ros/foxy/setup.bash && sudo apt install ros-foxy-ros1-bridge
##### Installation on ROS1
!!! warning
Before following the instructions from below, ensure that you are in a fresh
terminal, **without ROS2 sourced**.
1. Create a ROS1 workspace for S-Graphs
mkdir -p $HOME/workspaces/s_graphs_ros1_ws/src && cd $HOME/workspaces/s_graphs_ros1_ws/src && source /opt/ros/noetic/setup.bash
2. Clone the S-Graphs repository into the created workspace
git clone git@github.com:snt-arg/lidar_situational_graphs.git -b feature/multi_floor s_graphs
3. Install required dependencies using `vcstool`
cd s_graphs && vcs import --recursive ../ < .rosinstall_ros1
4. Install required ROS packages
cd ../../ && rosdep install --from-paths src --ignore-src -y -r
5. Install `pcl_ros`
sudo apt install ros-noetic-pcl-ros
6. Build workspace
!!! warning
Make sure s_graphs_ros1_ws is built in Release otherwise the room extraction won't work properly.
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release && catkin build
🧪 Unit Tests
Some unit tests are available. In case you want to add additional tests, run the following command:
colcon test --packages-select s_graphs --event-handler=console_direct+