AlessioMorale / ld06_lidar

ROS1 package for LDRobotic LD06 Lidar
37 stars 25 forks source link

unable to display lidar points #6

Closed VoxoTech closed 3 years ago

VoxoTech commented 3 years ago

I must be missing something , but I cannot get anything to display using your modified version : rosrun rviz rviz ( then opening the ldlidar.rviz file

AlessioMorale commented 3 years ago

Hi @VoxoTech The ld06.launch launch file does not define any TF so rviz may not be able to show anything. Try the following launch file that defines a transform between map->lidar_frame:

<launch>
 <node name="LD06" pkg="ldlidar" type="ldlidar" args="LD06" output="screen" />
 <node pkg="tf2_ros" type="static_transform_publisher" name="lidar_frame_broadcaster" args="0 0 0 0 0 0 1 map lidar_frame" />
</launch>

Run the above then opening rviz and adding the /LiDAR/LD06 topic should show you the data.

AlessioMorale commented 3 years ago

Sorry I just figured out the problem with the ldlidar.rviz: it was made using the wrong scale (1000 bigger than the real scale, 1mm in lidar coordinate = 1m in rviz), so you will just see a small dot at the center of the map. zoom in and you should see correctly the data.

AlessioMorale commented 3 years ago

I have updated the rviz file with proper scale and grid size, this should now be fixed.

VoxoTech commented 3 years ago

I have updated the rviz file with proper scale and grid size, this should now be fixed.

Working perfectly ! many thanks !

btw, have you tried using it with HectorSLAM ? I may give a try but I'm a pure newbie :)

AlessioMorale commented 3 years ago

I'm glad that worked. No, not yet. I'm still designing the robot that's going to host this lidar, it'll take a bit before I'll be able to actually use it. I'll let you know though. I'm pretty sure this should work pretty easily with hector slam. I has also a 10Hz rate that's really nice I suggest you to look at the official ROS navigation tutorial http://wiki.ros.org/navigation The first two parts of the tutorial(setting up tf and basic nav concepts) are especially important.

chun8685 commented 2 years ago

I have updated the rviz file with proper scale and grid size, this should now be fixed.

Working perfectly ! many thanks !

btw, have you tried using it with HectorSLAM ? I may give a try but I'm a pure newbie :)

did you Hector slam successfully ? I'm trying but I'm a pure newbie too.... plz help