From 9a8ef6b82aefae87475ce7576e5458987734d6d4 Mon Sep 17 00:00:00 2001 From: horverno Date: Mon, 17 Jun 2024 09:23:12 +0200 Subject: [PATCH 1/2] Updated ROS 2 commands --- README.md | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 58615af0..2f2c373e 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,8 @@ Also note that the LiDAR and IMU sensors _need_ to be properly time-synchronized ### Dependencies The following has been verified to be compatible, although other configurations may work too: -- Ubuntu 20.04 -- ROS Noetic (`roscpp`, `std_msgs`, `sensor_msgs`, `geometry_msgs`, `nav_msgs`, `pcl_ros`) +- Ubuntu 22.04 +- ROS Humble (`rclcpp`, `std_msgs`, `sensor_msgs`, `geometry_msgs`, `nav_msgs`, `pcl_ros`) - C++ 14 - CMake >= `3.12.4` - OpenMP >= `4.5` @@ -35,19 +35,35 @@ The following has been verified to be compatible, although other configurations sudo apt install libomp-dev libpcl-dev libeigen3-dev ``` -DLIO currently only supports ROS1, but we welcome any contributions by the community to add ROS2 support! +DLIO currently supports `ROS 1` and `ROS 2`! ### Compiling Compile using the [`catkin_tools`](https://catkin-tools.readthedocs.io/en/latest/) package via: ```sh -mkdir ws && cd ws && mkdir src && catkin init && cd src -git clone https://github.com/vectr-ucla/direct_lidar_inertial_odometry.git -catkin build +mkdir ~/ros2_ws && cd ~/ros2_ws && mkdir src && cd src +``` +```sh +git clone https://github.com/vectr-ucla/direct_lidar_inertial_odometry +``` +```sh +cd ~/ros2_ws +``` +```sh +colcon build --symlink-install --packages-select direct_lidar_inertial_odometry ``` ### Execution -After compiling, source the workspace and execute via: + +
+ After compiling, don't forget to source before ROS commands. + +``` bash +source ~/ros2_ws/install/setup.bash +``` +
+ +Execute via: ```sh roslaunch direct_lidar_inertial_odometry dlio.launch \ @@ -56,6 +72,14 @@ roslaunch direct_lidar_inertial_odometry dlio.launch \ imu_topic:=/robot/imu ``` +
+ Example command: + +``` bash +ros2 launch direct_lidar_inertial_odometry dlio.launch.py rviz:=true pointcloud_topic:=/lexus3/os_center/points imu_topic:=/lexus3/os_center/imu +``` +
+ Be sure to change the topic names to your corresponding topics. Alternatively, edit the launch file directly if desired. If successful, you should see the following output in your terminal:

From 429a384a1b74259a9675fc1a0828fbb0fb766d8c Mon Sep 17 00:00:00 2001 From: horverno Date: Tue, 18 Jun 2024 07:59:50 +0200 Subject: [PATCH 2/2] Clone with ROS 2 branch --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2f2c373e..dd42c838 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Compile using the [`catkin_tools`](https://catkin-tools.readthedocs.io/en/latest mkdir ~/ros2_ws && cd ~/ros2_ws && mkdir src && cd src ``` ```sh -git clone https://github.com/vectr-ucla/direct_lidar_inertial_odometry +git clone https://github.com/vectr-ucla/direct_lidar_inertial_odometry -b feature/ros2 ``` ```sh cd ~/ros2_ws