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

sdk no longer working #120

Open
egonzalez1958 opened this issue Sep 16, 2023 · 3 comments
Open

sdk no longer working #120

egonzalez1958 opened this issue Sep 16, 2023 · 3 comments

Comments

@egonzalez1958
Copy link

After failing to work with sdk using ubuntu 22.04.3 arm64 on a raspberry pi 4B using an A2-M12, I tried replacing the raspberry for a laptop using an i7, 7th generation with ubuntu 22.04.3 amd64.
The codes of custom_baudrate, simple_grabber and ultra_simple were compiled without errors, but when trying to execute them, I got this kind of failures:

~/claser/rplidar_sdk-master/output/Linux/Release$ ./custom_baudrate /dev/ttyUSB0 256000
Baudrate negotiation demo for SLAMTEC LIDAR.
Try to establish communication to the LIDAR using the baudrate at /dev/ttyUSB0@256000 ...
*** buffer overflow detected ***: terminated
Aborted (core dumped)

The installation makes use of the following:

~/claser/rplidar_sdk-master/output/Linux/Release$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

/claser/rplidar_sdk-master/output/Linux/Release$ g++ --version
g++ (Ubuntu 11.4.0-1ubuntu1
22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

~/claser/rplidar_sdk-master/output/Linux/Release$ ls -al /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 sep 16 16:42 /dev/ttyUSB0

Any idea on what's going on?

@deyouslamtec
Copy link
Contributor

~/claser/rplidar_sdk-master/output/Linux/Release$ ls -al /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 sep 16 16:42 /dev/ttyUSB0

Please add read and write permissions to /dev/ttyUSB0
example:
sudo chmod 666 /dev/ttyUSB0

@egonzalez1958
Copy link
Author

egonzalez1958 commented Sep 19, 2023

Thanks, now custom_baudrate works!

But as you see in the ensuing listing, ultra_simple seems to work but... it does not make the lidar to rotate.

sudo chmod 666 /dev/ttyUSB0

./custom_baudrate /dev/ttyUSB0 257175
Baudrate negotiation demo for SLAMTEC LIDAR.
Try to establish communication to the LIDAR using the baudrate at /dev/ttyUSB0@257175 ...
The baudrate detected by the pair is 257175 bps. Error: 0.000 %
Wow, we just communicate with the LIDAR using non-standard baudrate : 257175!.
SLAMTEC LIDAR S/N: B1C999F6C9E59AD4C5E59CF74D1B3414
Firmware Ver: 1.32
Hardware Rev: 6

./ultra_simple --channel --serial /dev/ttyUSB0 256000
Ultra simple LIDAR data grabber for SLAMTEC LIDAR.
Version: SL_LIDAR_SDK_VERSION
SLAMTEC LIDAR S/N: B1C999F6C9E59AD4C5E59CF74D1B3414
Firmware Ver: 1.32
Hardware Rev: 6
SLAMTEC Lidar health status : 0

./ultra_simple --channel --serial /dev/ttyUSB0 257175
Ultra simple LIDAR data grabber for SLAMTEC LIDAR.
Version: SL_LIDAR_SDK_VERSION
SLAMTEC LIDAR S/N: B1C999F6C9E59AD4C5E59CF74D1B3414
Firmware Ver: 1.32
Hardware Rev: 6
SLAMTEC Lidar health status : 0

I haven't made any changes to the code.

Regards!

@egonzalez1958
Copy link
Author

Finally, the problem was singled out by comparing behaviour of two lidars, one of them didn't rotate with the same compiled code. After breaking the guarantee seals and opening the enclosure, a very tiny wire was found cut. Careful soldering solved the problem. Lidar is rotating. That also means that the health status of the Lidar does only a shallow check.

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

2 participants