0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

はじめてのアドベントカレンダーAdvent Calendar 2023

Day 16

Enabling the Use of Unitree L1 LiDAR without rviz

Last updated at Posted at 2023-12-19

Introduction

I have developed a method to use the Unitree L1 LiDAR without relying on rviz.(on ROS)

Repository

For detailed usage instructions, please refer to the README file in the repository published on GitHub.

Issue

When attempting to display LiDAR data without using rviz, executing run_without_rviz.launch does not yield the same display as when using rviz. The following image is an example of this issue.

Screenshot 2023-12-19 at 11.05.32.png

Modification

To solve this problem, I added unitree_lidar_ros_without_rviz.h, which improved the display as shown in the image below.

Screenshot 2023-12-19 at 11.05.00.png

In rviz, point clouds are visualized by retaining them for a certain period. In our improvement, multiple point clouds are retained at the stage of publishing, and then published together.

To increase the number of point clouds, modify the numbers on lines 192 and 193 of unitree_lidar_ros_without_rviz.h. The relevant code is as follows:

unitree_lidar_ros_without_rviz.h
      if(cloudQueue_.size() > 10) {
      	while(cloudQueue_.size() > 10) {
      	  cloudQueue_.pop_front();
      	}
      }

Run

The Build process remains the same as before.

For Run, follow these steps:

  • If using rviz:
source devel/setup.bash

roslaunch unitree_lidar_ros run.launch
  • If not using rviz:
source devel/setup.bash

roslaunch unitree_lidar_ros run_without_rviz.launch.launch

Conclusion

This improvement is compatible with ROS but not with ROS2 or unitree_lidar_sdk. Please refer to the provided code for reference and make appropriate modifications.

You can view the code here:

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?