Skip to content

Commit

Permalink
Merge pull request #59 from jkk-research/feature/ros2
Browse files Browse the repository at this point in the history
Updated ROS 2 commands
  • Loading branch information
kennyjchen authored Jul 2, 2024
2 parents 7ebea7e + 429a384 commit c9df9a8
Showing 1 changed file with 31 additions and 7 deletions.
38 changes: 31 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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 -b feature/ros2
```
```sh
cd ~/ros2_ws
```
```sh
colcon build --symlink-install --packages-select direct_lidar_inertial_odometry
```

### Execution
After compiling, source the workspace and execute via:

<details>
<summary> After compiling, don't forget to source before ROS commands.</summary>

``` bash
source ~/ros2_ws/install/setup.bash
```
</details>

Execute via:

```sh
roslaunch direct_lidar_inertial_odometry dlio.launch \
Expand All @@ -56,6 +72,14 @@ roslaunch direct_lidar_inertial_odometry dlio.launch \
imu_topic:=/robot/imu
```

<details>
<summary> Example command: </summary>

``` bash
ros2 launch direct_lidar_inertial_odometry dlio.launch.py rviz:=true pointcloud_topic:=/lexus3/os_center/points imu_topic:=/lexus3/os_center/imu
```
</details>

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:
<br>
<p align='center'>
Expand Down

0 comments on commit c9df9a8

Please sign in to comment.