I am running Ubuntu 22.04 on both my laptop and my raspberry pi5 (docker container here) and I have a LD19 lidar which I run on the pi. I am currently using Ros2 Humble on both devices.
I start the Lidar by using
ros2 launch ldlidar_stl_ros2 ld19.launch.py
which I got from this https://github.com/ldrobotSensorTeam/ldlidar_stl_ros2.git. Then I launch my robot launch file which is a simplification of a toy excavator (basically just a square box with wheels and a lidar on top). So far, so good. I open Rviz2 up and add the laserscan (/scan) so I can see the lidar data, RobotModel (/robot_description) so I can see the robot and tf so I can see the tree and the reference frames. At this point I launch slam_toolbox_online_async_launch.py and I add a slam_params_file in which I have set:
as I do not have any odometry data. I add a map in rviz2 and subscribe to the /map topic and it looks like the mapping process has started. Unfortunately, when I move the robot around (does not matter if I carry it around or drive it around), the lidar points move, but both the map and the robot are completely still. I understand that there is something I am missing, but I do not understand what.
I want to use the lidar data to update the robot position if that was not clear.
Hi.
I am running Ubuntu 22.04 on both my laptop and my raspberry pi5 (docker container here) and I have a LD19 lidar which I run on the pi. I am currently using Ros2 Humble on both devices.
I start the Lidar by using
which I got from this https://github.com/ldrobotSensorTeam/ldlidar_stl_ros2.git. Then I launch my robot launch file which is a simplification of a toy excavator (basically just a square box with wheels and a lidar on top). So far, so good. I open Rviz2 up and add the laserscan (/scan) so I can see the lidar data, RobotModel (/robot_description) so I can see the robot and tf so I can see the tree and the reference frames. At this point I launch slam_toolbox_online_async_launch.py and I add a slam_params_file in which I have set:
as I do not have any odometry data. I add a map in rviz2 and subscribe to the /map topic and it looks like the mapping process has started. Unfortunately, when I move the robot around (does not matter if I carry it around or drive it around), the lidar points move, but both the map and the robot are completely still. I understand that there is something I am missing, but I do not understand what.
I want to use the lidar data to update the robot position if that was not clear.