Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YDLIDAR TG30 data oscillates between 0 and measured value #27

Open
ghost opened this issue Jun 21, 2023 · 0 comments
Open

YDLIDAR TG30 data oscillates between 0 and measured value #27

ghost opened this issue Jun 21, 2023 · 0 comments

Comments

@ghost
Copy link

ghost commented Jun 21, 2023

Description

I am using the YDLIDAR TG30 sensor to measure distances in my project. However, I noticed that the data from the sensor is not stable and oscillates between 0 and the actual measured value. This makes it hard to use the sensor for accurate measurements.

关于YDLIDAR TG30传感器的数据不稳定的问题。发现传感器的数据在0和实际测量值之间波动,导致无法进行精确的测量。希望得到解决方案或建议。谢谢!

Steps to reproduce

  • Connect the YDLIDAR TG30 sensor to a computer via USB
  • Run the ydlidar_launch.py launch file with the TG.yaml parameters
  • Observe the output data from the sensor
    • Launch rqt and plot any one of the scanned data, eg: /scan/ranges[1]

Expected behavior

The output data from the sensor should be consistent (or oscillates around the measured value) and reflect the actual distance to the objects in front of the sensor.

Actual behavior

The output data from the sensor fluctuates between 0 and the actual distance to the objects in front of the sensor. For example, if the object is 1 meter away, the output data will alternate between 0 and 1 meter.

Screenshots

image
image

Environment

  • Operating system: Ubuntu 22.04
  • ROS 2 Distro: Humble
  • YDLIDAR SDK version: 1.1.13
  • YDLIDAR TG30 firmware version: 2.1
  • ydlidar_ros2_driver commit: a74cc95
  • YDLidar-SDK commit : 5bf99a3
  • terminal log when launching ydlidar_launch.py
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ydlidar_ros2_driver_node-1]: process started with pid [9553]
[ydlidar_ros2_driver_node-1] [INFO] [1687325335.227257866] [ydlidar_ros2_driver_node]: [YDLIDAR INFO] Current ROS Driver Version: 1.0.1
[ydlidar_ros2_driver_node-1]
[ydlidar_ros2_driver_node-1] [YDLIDAR] SDK initializing
[ydlidar_ros2_driver_node-1] [YDLIDAR] SDK has been initialized
[ydlidar_ros2_driver_node-1] [YDLIDAR] SDK Version: 1.1.13
[ydlidar_ros2_driver_node-1] [YDLIDAR] Lidar successfully connected /dev/ttyUSB0[512000]
[ydlidar_ros2_driver_node-1] [YDLIDAR] Lidar running correctly! The health status: good
[ydlidar_ros2_driver_node-1] [YDLIDAR] Device info
[ydlidar_ros2_driver_node-1] Firmware version: 2.1
[ydlidar_ros2_driver_node-1] Hardware version: 1
[ydlidar_ros2_driver_node-1] Model: TG30
[ydlidar_ros2_driver_node-1] Serial: 20211220XXXXXXXX
[ydlidar_ros2_driver_node-1] [YDLIDAR] Get origin sample rate code: 20
[ydlidar_ros2_driver_node-1] [YDLIDAR] Get sample rate: 20.00K
[ydlidar_ros2_driver_node-1] [YDLIDAR] Current scan frequency: 10.00Hz
[ydlidar_ros2_driver_node-1] [YDLIDAR] Successfully obtained the corrected offset angle[-4.750000] from the lidar[20211220XXXXXXXX]
[ydlidar_ros2_driver_node-1] [YDLIDAR] Lidar init success, Elapsed time 873 ms
[ydlidar_ros2_driver_node-1] [YDLIDAR] Create thread 0x92FFD640
[ydlidar_ros2_driver_node-1] [YDLIDAR] Successed to start scan mode, Elapsed time 1066 ms
[ydlidar_ros2_driver_node-1] timeout count: 1
[ydlidar_ros2_driver_node-1] [YDLIDAR] Fixed Size: 2020
[ydlidar_ros2_driver_node-1] [YDLIDAR] Sample Rate: 20.00K
[ydlidar_ros2_driver_node-1] [YDLIDAR] Successed to check the lidar, Elapsed time 661 ms
[ydlidar_ros2_driver_node-1] [YDLIDAR] Current Sampling Rate : 20.00K
[ydlidar_ros2_driver_node-1] [YDLIDAR] Now lidar is scanning...

Additional information

  • tried with another TG30, same issue occurs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants