Coder Social home page Coder Social logo

ldlidar_stl_ros2's People

Contributors

bperseghetti avatar ldrobotsensor avatar mingdonghu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ldlidar_stl_ros2's Issues

LD06 - Stop the sensor motor

Hi, do you know if there is any kind of way to set the lidar in a 'stand by' mode? In order to reduce the lidar's power consumption and mechanical parts by stoping the laser head rotation. The goal it to enable it only when it is in use.

Error messages could improved

In case anyone else has this problem, make sure that your /dev/ttyUSB0 device didn't enumerate as something else (like /dev/ttyUSB1). The error message reported by this driver reported a bad baud rate, but it was actually just accessing the wrong device.

[ldlidar_stl_ros2_node-1] [INFO] [1688758790.646974464] [LD19]: <port_baudrate>: 230400
[ldlidar_stl_ros2_node-1] [INFO] [1688758790.647006204] [LD19]: <laser_scan_dir>: Counterclockwise
[ldlidar_stl_ros2_node-1] [INFO] [1688758790.647039723] [LD19]: <enable_angle_crop_func>: false
[ldlidar_stl_ros2_node-1] [INFO] [1688758790.647072149] [LD19]: <angle_crop_min>: 135.000000
[ldlidar_stl_ros2_node-1] [INFO] [1688758790.647121835] [LD19]: <angle_crop_max>: 225.000000
[ldlidar_stl_ros2_node-1] [INFO] [1688758790.654224580] [LD19]: ldlidar node start is success
[ldlidar_stl_ros2_node-1] [ERROR] [1688758793.655270233] [LD19]: ldlidar communication is abnormal.
[ldlidar_stl_ros2_node-1] [LDS][INFO][1688758790.653998746][Actual BaudRate reported:230769]
[ERROR] [ldlidar_stl_ros2_node-1]: process has died [pid 2481, exit code 1, cmd '/home/ubuntu/cart_ws/install/ldlidar_stl_ros2/lib/ldlidar_stl_ros2/ldlidar_stl_ros2_node --ros-args -r __node:=LD19 --params-file /tmp/launch_params_ap9utzk8 --params-file /tmp/launch_params_zdokq3bb --params-file /tmp/launch_params__vo80x0h --params-file /tmp/launch_params_nk_g1uu0 --params-file /tmp/launch_params_s81du90y --params-file /tmp/launch_params_t_n15d8m --params-file /tmp/launch_params_4h5nvjbn --params-file /tmp/launch_params_q7anal3e --params-file /tmp/launch_params_306abeuv'].

LaserRangeScan readings

Hi,

I am trying to do a mapping with slam_toolbox and LD06 lidar, but I having this error :

[async_slam_toolbox_node-1] LaserRangeScan contains 455 range readings, expected 460
[async_slam_toolbox_node-1] LaserRangeScan contains 455 range readings, expected 460
[async_slam_toolbox_node-1] LaserRangeScan contains 455 range readings, expected 460
[async_slam_toolbox_node-1] LaserRangeScan contains 455 range readings, expected 460
[async_slam_toolbox_node-1] LaserRangeScan contains 454 range readings, expected 460
[async_slam_toolbox_node-1] LaserRangeScan contains 454 range readings, expected 460
[async_slam_toolbox_node-1] LaserRangeScan contains 455 range readings, expected 460
[async_slam_toolbox_node-1] LaserRangeScan contains 455 range readings, expected 460
[async_slam_toolbox_node-1] LaserRangeScan contains 454 range readings, expected 460
[async_slam_toolbox_node-1] LaserRangeScan contains 453 range readings, expected 460

Slam_Toolbox expected a fixed number of points from Lidar, but for some reason LD06 is not providing.
Do you know how this be fixed on LD06 Ros2 package?

I similar issue I found, but for a different lidar : SteveMacenski/slam_toolbox#278

Thanks
Yoan

Lidar Node failed to start

Hi I am trying to get teh camera to work, and I cannot seem to subscribe nor see the scan topic because the node is failing to start. I set everything up correctly, but I am not a software developer by trade. The Lidar clearly is receiving power(blue light going in a circle), and it is connected to the correct usb port. Looking for any suggestions as to why this is not working...

ros2 launch ldlidar_stl_ros2 ld06.launch.py

[INFO] [launch]: All log files can be found below /home/etc
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ldlidar_stl_ros2_node-1]: process started with pid [159686]
[INFO] [static_transform_publisher-2]: process started with pid [159688]
[static_transform_publisher-2] [WARN] [1717443027.393362065] []: Old-style arguments are deprecated; see --help for new-style arguments
[ldlidar_stl_ros2_node-1] [INFO] [1717443027.402896473] [LD06]: LDLiDAR SDK Pack Version is: v3.0.3
[ldlidar_stl_ros2_node-1] [INFO] [1717443027.402938820] [LD06]: <product_name>: LDLiDAR_LD06
[ldlidar_stl_ros2_node-1] [INFO] [1717443027.402943645] [LD06]: <topic_name>: scan
[ldlidar_stl_ros2_node-1] [INFO] [1717443027.402946803] [LD06]: <frame_id>: base_laser
[ldlidar_stl_ros2_node-1] [INFO] [1717443027.402949468] [LD06]: <port_name>: /dev/ttyUSB0
[ldlidar_stl_ros2_node-1] [INFO] [1717443027.402952217] [LD06]: <port_baudrate>: 230400
[ldlidar_stl_ros2_node-1] [INFO] [1717443027.402955055] [LD06]: <laser_scan_dir>: Counterclockwise
[ldlidar_stl_ros2_node-1] [INFO] [1717443027.402957946] [LD06]: <enable_angle_crop_func>: false
[ldlidar_stl_ros2_node-1] [INFO] [1717443027.402960495] [LD06]: <angle_crop_min>: 135.000000
[ldlidar_stl_ros2_node-1] [INFO] [1717443027.402966381] [LD06]: <angle_crop_max>: 225.000000
[ldlidar_stl_ros2_node-1] [ERROR] [1717443027.402990966] [LD06]: ldlidar node start is fail
[static_transform_publisher-2] [INFO] [1717443027.403999160] [base_link_to_base_laser_ld06]: Spinning until stopped - publishing transform
[static_transform_publisher-2] translation: ('0.000000', '0.000000', '0.180000')
[static_transform_publisher-2] rotation: ('0.000000', '0.000000', '0.000000', '1.000000')
[static_transform_publisher-2] from 'base_link' to 'base_laser'
[ldlidar_stl_ros2_node-1] [LDS][ERROR][Mon Jun 3 15:30:27 2024][/home/Name/Desktop/Comp/ldlidar_ros2_ws/src/ldlidar_stl_ros2/ldlidar_driver/src/serialcom/serial_interface_linux.cpp][Open][41][Open open error,Permission denied]
[ldlidar_stl_ros2_node-1] [LDS][ERROR][Mon Jun 3 15:30:27 2024][/home/Name/Desktop/Comp/ldlidar_ros2_ws/src/ldlidar_stl_ros2/ldlidar_driver/src/core/ldlidar_driver.cpp][Start][90][serial is not open:/dev/ttyUSB0]
[ERROR] [ldlidar_stl_ros2_node-1]: process has died [pid 159686, exit code 1, cmd '/home/Name/Desktop/Comp/ldlidar_ros2_ws/install/ldlidar_stl_ros2/lib/ldlidar_stl_ros2/ldlidar_stl_ros2_node --ros-args -r __node:=LD06 --params-file /tmp/launch_params_cvvd59v9 --params-file /tmp/launch_params_yc3ekj4z --params-file /tmp/launch_params_1w_dksaq --params-file /tmp/launch_params_t5ajd2dl --params-file /tmp/launch_params_va80n3wi --params-file /tmp/launch_params_raqp3bkz --params-file /tmp/launch_params_2j_rnyv6 --params-file /tmp/launch_params_2rk97whf --params-file /tmp/launch_params_3l0rdn22'].
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[static_transform_publisher-2] [INFO] [1717443040.373250276] [rclcpp]: signal_handler(signum=2)
[INFO] [static_transform_publisher-2]: process has finished cleanly [pid 159688]

How to solve it ? [ldlidar_stl_ros2_node-1] [ERROR] [1698204279.082635882] [STL27L]: ldlidar communication is abnormal.

ros2 launch ldlidar_stl_ros2 stl27l.launch.py
[INFO] [launch]: All log files can be found below /home/xiaoyu/.ros/log/2023-10-25-11-24-36-000859-patrick-Precision-3460-2064107
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ldlidar_stl_ros2_node-1]: process started with pid [2064108]
[INFO] [static_transform_publisher-2]: process started with pid [2064110]
[static_transform_publisher-2] [WARN] [1698204276.075204599] []: Old-style arguments are deprecated; see --help for new-style arguments
[ldlidar_stl_ros2_node-1] [INFO] [1698204276.081212779] [STL27L]: LDLiDAR SDK Pack Version is: v3.0.3
[ldlidar_stl_ros2_node-1] [INFO] [1698204276.081251821] [STL27L]: <product_name>: LDLiDAR_STL27L
[ldlidar_stl_ros2_node-1] [INFO] [1698204276.081256446] [STL27L]: <topic_name>: scan
[ldlidar_stl_ros2_node-1] [INFO] [1698204276.081259139] [STL27L]: <frame_id>: base_laser
[ldlidar_stl_ros2_node-1] [INFO] [1698204276.081261491] [STL27L]: <port_name>: /dev/ttyUSB0
[ldlidar_stl_ros2_node-1] [INFO] [1698204276.081263903] [STL27L]: <port_baudrate>: 921600
[ldlidar_stl_ros2_node-1] [INFO] [1698204276.081266528] [STL27L]: <laser_scan_dir>: Clockwise
[ldlidar_stl_ros2_node-1] [INFO] [1698204276.081269025] [STL27L]: <enable_angle_crop_func>: false
[ldlidar_stl_ros2_node-1] [INFO] [1698204276.081272418] [STL27L]: <angle_crop_min>: 0.000000
[ldlidar_stl_ros2_node-1] [INFO] [1698204276.081277139] [STL27L]: <angle_crop_max>: 0.000000
[ldlidar_stl_ros2_node-1] [INFO] [1698204276.081681053] [STL27L]: ldlidar node start is success
[static_transform_publisher-2] [INFO] [1698204276.082988739] [base_link_to_base_laser_stl27l]: Spinning until stopped - publishing transform
[static_transform_publisher-2] translation: ('0.000000', '0.000000', '0.180000')
[static_transform_publisher-2] rotation: ('0.000000', '0.000000', '0.000000', '1.000000')
[static_transform_publisher-2] from 'base_link' to 'base_laser'
[ldlidar_stl_ros2_node-1] [ERROR] [1698204279.082635882] [STL27L]: ldlidar communication is abnormal.
[ldlidar_stl_ros2_node-1] [LDS][INFO][1698204276.81653920][Actual BaudRate reported:921600]
[ERROR] [ldlidar_stl_ros2_node-1]: process has died [pid 2064108, exit code 1, cmd '/home/xiaoyu/workspace/ldlidar_ros2_ws/install/ldlidar_stl_ros2/lib/ldlidar_stl_ros2/ldlidar_stl_ros2_node --ros-args -r __node:=STL27L --params-file /tmp/launch_params_w2dldkmu --params-file /tmp/launch_params_1tk6ghqz --params-file /tmp/launch_params_vnkcsfmv --params-file /tmp/launch_params_8pmzdaea --params-file /tmp/launch_params__l1tj9su --params-file /tmp/launch_params_hp4ukfam --params-file /tmp/launch_params_9sa_mjlg --params-file /tmp/launch_params_3dojh6ll --params-file /tmp/launch_params__xdmxevb'].

Error when launching python code.

After the command "ros2 launch ldlidar_stl_ros2 ld19.launch.py" I recieved the following error:

[INFO] [launch]: All log files can be found below /home/ditmar/.ros/log/2022-11-17-10-38-42-823400-ditmar-VirtualBox-3613
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ldlidar_stl_ros2_node-1]: process started with pid [3614]
[INFO] [static_transform_publisher-2]: process started with pid [3616]
[static_transform_publisher-2] [WARN] [1668677924.187515024] []: Old-style arguments are deprecated; see --help for new-style arguments
[ldlidar_stl_ros2_node-1] [INFO] [1668677924.433554313] [LD19]: LDLiDAR SDK Pack Version is: v3.0.3
[ldlidar_stl_ros2_node-1] [INFO] [1668677924.434860673] [LD19]: <product_name>: LDLiDAR_LD19
[ldlidar_stl_ros2_node-1] [INFO] [1668677924.435963707] [LD19]: <topic_name>: scan
[ldlidar_stl_ros2_node-1] [INFO] [1668677924.436106027] [LD19]: <frame_id>: base_laser
[ldlidar_stl_ros2_node-1] [INFO] [1668677924.436180008] [LD19]: <port_name>: /dev/ttyUSB0
[ldlidar_stl_ros2_node-1] [INFO] [1668677924.436199364] [LD19]: <port_baudrate>: 230400
[ldlidar_stl_ros2_node-1] [INFO] [1668677924.436209824] [LD19]: <laser_scan_dir>: Counterclockwise
[ldlidar_stl_ros2_node-1] [INFO] [1668677924.436219813] [LD19]: <enable_angle_crop_func>: false
[ldlidar_stl_ros2_node-1] [INFO] [1668677924.436229702] [LD19]: <angle_crop_min>: 135.000000
[ldlidar_stl_ros2_node-1] [INFO] [1668677924.436245783] [LD19]: <angle_crop_max>: 225.000000
[ldlidar_stl_ros2_node-1] [ERROR] [1668677924.436360430] [LD19]: ldlidar node start is fail
[static_transform_publisher-2] [INFO] [1668677924.503143437] [base_link_to_base_laser_ld19]: Spinning until stopped - publishing transform
[static_transform_publisher-2] translation: ('0.000000', '0.000000', '0.180000')
[static_transform_publisher-2] rotation: ('0.000000', '0.000000', '0.000000', '1.000000')
[static_transform_publisher-2] from 'base_link' to 'base_laser'
[ldlidar_stl_ros2_node-1] [LDS][ERROR][Thu Nov 17 10:38:44 2022][/home/ditmar/ldlidar_ros2_ws/src/ldlidar_stl_ros2/ldlidar_driver/src/serialcom/serial_interface_linux.cpp][Open][41][Open open error,Permission denied]
[ldlidar_stl_ros2_node-1] [LDS][ERROR][Thu Nov 17 10:38:44 2022][/home/ditmar/ldlidar_ros2_ws/src/ldlidar_stl_ros2/ldlidar_driver/src/core/ldlidar_driver.cpp][Start][90][serial is not open:/dev/ttyUSB0]
[ERROR] [ldlidar_stl_ros2_node-1]: process has died [pid 3614, exit code 1, cmd '/home/ditmar/ldlidar_ros2_ws/install/ldlidar_stl_ros2/lib/ldlidar_stl_ros2/ldlidar_stl_ros2_node --ros-args -r __node:=LD19 --params-file /tmp/launch_params_02h4cjfi --params-file /tmp/launch_params_4p_xhzqx --params-file /tmp/launch_params_crh_pjiy --params-file /tmp/launch_params_d3w9fnwj --params-file /tmp/launch_params_ed2i03x1 --params-file /tmp/launch_params_xthq6i0l --params-file /tmp/launch_params_kcwvvbzd --params-file /tmp/launch_params_3_0jvih8 --params-file /tmp/launch_params_taoamxlv'].

Currently using ubuntu version: Ubuntu 22.04.1 LTS
I'm also using Oracle Virtual Machine to run Ubuntu.

I hope somone can help me with this problem.

cartographer?

I'm trying to implement SLAM with stl27l, and I'm trying to use cartographer, but it doesn't work. I'm still a beginner so there are a lot of things I don't know. Is it impossible to use? Is there another way to set it up?

ROS2 node starts timing out on USB data read

The LD19 ROS2 node will start ok, but soon starts to time out and stutter. In other words, the laserscan data starts to come in more and more sluggishly over time. It feels like a memory leak or load creep, but htop shows very very low load. My LD19 is attached to an OrangePi 5b using a USB 3.0 port.

[ldlidar_stl_ros2_node-1] [ERROR] [1688438982.146706995] [LD19]: get ldlidar data is time out, please check your lidar device.
[ldlidar_stl_ros2_node-1] [ERROR] [1688438982.246709758] [LD19]: get ldlidar data is time out, please check your lidar device.
[ldlidar_stl_ros2_node-1] [ERROR] [1688438982.346709020] [LD19]: get ldlidar data is time out, please check your lidar device.
[ldlidar_stl_ros2_node-1] [ERROR] [1688438982.446715866] [LD19]: get ldlidar data is time out, please check your lidar device.
[ldlidar_stl_ros2_node-1] [ERROR] [1688438982.546712212] [LD19]: get ldlidar data is time out, please check your lidar device.
[ldlidar_stl_ros2_node-1] [ERROR] [1688438982.646708557] [LD19]: get ldlidar data is time out, please check your lidar device.
[ldlidar_stl_ros2_node-1] [ERROR] [1688438982.746709278] [LD19]: get ldlidar data is time out, please check your lidar device.
[ldlidar_stl_ros2_node-1] [ERROR] [1688438982.846707957] [LD19]: get ldlidar data is time out, please check your lidar device.
[ldlidar_stl_ros2_node-1] [ERROR] [1688438982.946707219] [LD19]: get ldlidar data is time out, please check your lidar device.

image

How to make lidar stop scanning

Hello,

Is there a command I can send to the lidar to make it stop scanning, and still accept serial commands, and then start scanning again?

Can there be a hardware solution?

Best Regards,
C.A.

Driver is not currently compatible with ROS2 SLAM Toolbox -- 70% of scans are discarded

[updating this issue from a separate repo]

Describe the bug
The LD19 driver apparently calculates the number of readings in a scan in a non-conformal way and is out of spec with what the ROS2 SLAM Toolbox expects. The maintainer of SLAM toolbox has asked maintainers of LIDAR drivers to fix the calculation on their end. With the current LD19 driver, the SLAM Toolbox will discard around 70% of scans from the LD19 (see graphic below) and is largely unusable.
Regardless of whether the LD19 hardware provides a variable number of range values in a single scan (which it does), this LD19 driver needs a param that forces the driver to always publish the same number of readings in every scan. It also needs to not repeat the ranges at 0 degrees and 360 degrees (which are the same thing). The output range should be [0,360) not [0,360].

To Reproduce

  • Run this repo's driver on ROS2 Humble

  • Run the SLAM toolbox on ROS2 Humble (you'll need a a robot model publisher and source of odom-base_link TF to start the toolbox)

  • the LD19's laserscan topic will provide a solid 10Hz output (USB or serial UART doesn't affect this problem)

  • the SLAM toolbox discards 60-70% of all scans because the SLAM toolbox is expecting a certain number of readings per scan (which appears to be set at SLAM Toolbox initialization) and the scan length provided by the LD19 driver is consistently off by 1 reading.

  • The issue is masked to the user because the scan topic looks great and comes in at 10Hz. Also, the SLAM map does get created (because it's still receiving some scans) but it's hugely inefficient due to the toolbox dropping 70% of scans.

Expected behavior
A clear and concise description of what you expected to happen.
These warnings in SLAM Toolbox should be pretty rare and only occur when the LIDAR scan speed doesn't hit its timing, but they're currently alerting on 70% of all scans
[async_slam_toolbox_node-1] LaserRangeScan contains 452 range readings, expected 451
[async_slam_toolbox_node-1] LaserRangeScan contains 452 range readings, expected 451
[async_slam_toolbox_node-1] LaserRangeScan contains 452 range readings, expected 451
[async_slam_toolbox_node-1] LaserRangeScan contains 452 range readings, expected 451
[async_slam_toolbox_node-1] LaserRangeScan contains 452 range readings, expected 451
[async_slam_toolbox_node-1] LaserRangeScan contains 450 range readings, expected 451
[async_slam_toolbox_node-1] LaserRangeScan contains 452 range readings, expected 451

Desktop (please complete the following information):
OS: Ubuntu 22.04
ROS2 version: Humble
Device type: x86-64 (SLAM toolbox), ARM (LD19 driver)
Additional context
Add any other context about the problem here.
SteveMacenski/slam_toolbox#293 (comment)
SteveMacenski/slam_toolbox#430 (comment)
SteveMacenski/slam_toolbox#141 (comment)
SteveMacenski/slam_toolbox#426 (comment)
SteveMacenski/slam_toolbox#328 (comment)
SteveMacenski/slam_toolbox#145

Easiest fix is to probably alter the LD19 driver angle min / max so that it conforms to the SLAM Toolbox's format and triggers the GetIs360Laser() check here:
https://github.com/SteveMacenski/slam_toolbox/blob/912703c43b7a640303b1b5fc62f05d53fae9cf57/lib/karto_sdk/include/karto_sdk/Karto.h#L4302C11-L4302C11

Screenshots
If applicable, add screenshots to help explain your problem.
SLAM toolbox discarding 70% of scans
image

Error ouccurred at ros2 launch ld06.launch.py

[ERROR] [ldlidar_stl_ros2_node-1]: process has died [pid 7791, exit code 1, cmd '/home/mangdang/ldlidar_ros2_ws/install/ldlidar_stl_ros2/lib/ldlidar_stl_ros2/ldlidar_stl_ros2_node --ros-args -r __node:=LD06 --params-file /tmp/launch_params_4jbfaw75 --params-file /tmp/launch_params_gydxgavv --params-file /tmp/launch_params_bybutd2d --params-file /tmp/launch_params_b4orcomy --params-file /tmp/launch_params_1yr3i283 --params-file /tmp/launch_params_m3umg0fo --params-file /tmp/launch_params_lwbet75o --params-file /tmp/launch_params_5ss3a7t9 --params-file /tmp/launch_params_u6ozj208'].

I've finished all steps in README, and tried sudo chmod 777 /dev/ttyUSB*
chmod result:

ls -l /dev/ttyUSB0 
crwxrwxrwx 1 root dialout 188, 0  3  7 13:53 /dev/ttyUSB0

Use multiple crop angles

My robot has several things blocking the LIDAR and I want to drop out 4 different rangles of angles. Can you please modify the ROS2 driver to support multiple crop angles?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.