ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

how to feed incoming LiDAR data into Ros nodes using nav2

asked 2022-06-01 15:49:58 -0500

r_gerson gravatar image

Hello, I am completely new to Ros so I apologize in advance for the ignorance. I want to implement LiDAR based mapping in nav2. My first step is to feed incoming LiDAR data to a node in Nav2, but I’m not sure how to do that. A bit about the project... I have an RP LiDAR connected to a raspberry pi 4, running Ubuntu 22.04 (humble distro). The LiDAR and pi (and Arduino and other sensors) will be mounted on a small chassis which I 3d printed. The goal is to have a map generated on the pi so that the robot can autonomously navigate. I’ve read the nav2 documentation, which is super helpful for conceptually understanding navigation. But I still have no idea about what I actually need to DO to feed LiDAR data into nav2. Id really appreciate pointers for first steps.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2022-06-02 03:28:42 -0500

Joe28965 gravatar image

ROS works with topics. On these topics you can publish data. Other nodes can subscribe to these topics to receive the data when it's published. Nav2 has a bunch of subscribers. One of these subscribes to a topic to receive lidar data (/scan I believe).

That RP lidar has a ROS2 driver (that functions pretty much the same as any driver) it receives the data from the device (in this case the lidar) and makes that data available. In ROS terms "making it available" means publishing it on a topic.

You need to install the ROS2 driver for it (the README has installation and run instructions).

Once you've run it, you should be able to see the topic if you run ros2 topic list.

edit flag offensive delete link more

Comments

Thank you very much, Joe! From the link you provided, I navigated to the rp Lidar ROS Wiki. It shows that that package isn't supported for foxy or humble (my raspberry pi runs humble, my VM runs foxy). that package needs noetic or melodic. are those requirements for the RPLidar module or the masters (raspberry pi or laptop)?

This page in contrast, doesn't say anything about distro requirements. Are they building the packages on the rplidar itself or the "master" ?

r_gerson gravatar image r_gerson  ( 2022-06-02 11:28:52 -0500 )edit
1

The link I provided brings you to the ros2 branch of the rp lidar. The wiki is only for ROS1, so it's correct that there is no mention of ROS2 on the page. The README of the link I provided has the installation procedures for ROS2. I do not know, however, what distro of ROS2 and if that matters. My suggestion would be to try and see if you get build errors.

Joe28965 gravatar image Joe28965  ( 2022-06-02 11:33:06 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-06-01 15:49:58 -0500

Seen: 1,026 times

Last updated: Jun 02 '22