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

*** buffer overflow detected ***: ./ultra_simple terminated #88

Open
tcexeexe opened this issue Oct 29, 2022 · 20 comments
Open

*** buffer overflow detected ***: ./ultra_simple terminated #88

tcexeexe opened this issue Oct 29, 2022 · 20 comments

Comments

@tcexeexe
Copy link

tcexeexe commented Oct 29, 2022

Hello~
I use order ./ultra_simple --channel -s ttyUSB0 256000 to test the RPLIDAR S1 on jetson nano, but en error occurred that

Ultra simple LIDAR data grabber for SLAMTEC LIDAR.
Version: SL_LIDAR_SDK_VERSION
*** buffer overflow detected ***: ./ultra_simple terminated
Aborted (core dumped)

l have had use the order 'sudo chmod a+rw /dev/ttyUSB0' to set the UART permission
There is any solution about this problem?

@livethisdream
Copy link

I am using the S2 and had to run it as sudo and also specify the baudrate as 1000000 -- this is specific to the LiDAR you're using.

@LDec-AlmostHuman
Copy link

Hi tcexeexe,

Did you manage to resolve the problem?
I am facing the same problem with A2.
Using ./ultra_simple --channel --serial ttyUSB0 115200 in my case.
Throwing the same error as you have.

Anyone with solution?

@anselanza
Copy link

I tried sudo usermod -a -G dialout $USER (add this user to the dialout group) which seemed to apply the permissions as expected, but still got the same buffer overflow error as above.

Only sudo chmod a+rw /dev/ttyUSB0 worked, but this ought to be unnecessary, surely?

@LDec-AlmostHuman
Copy link

Did you change permission to 777, some are suggesting 666, but for me only 777 worked.

@LDec-AlmostHuman
Copy link

LDec-AlmostHuman commented Mar 8, 2023

Which model do you have? A2M12 has 256000, but check as mine has 257175 without errors.

@LDec-AlmostHuman
Copy link

If you are still having problems please let me know and I will find my solution for it. Took me two days but problem solved.

@LDec-AlmostHuman
Copy link

But cannot help with S2 model as I have only A2M12, so via USB.

@totenkatze
Copy link

@LDec-AlmostHuman I'm jumping into the thread because I have an A2M12 as well and have been getting the buffer overflow error. Although, I seemed to have reached a state where I am back to a "cannot bind to the specified serial port /dev/ttyUSB0" error that I had been experiencing before.

If I'm still having issues after I get through that, can I call on you to dig up the solution you found?

@LDec-AlmostHuman
Copy link

@LDec-AlmostHuman I'm jumping into the thread because I have an A2M12 as well and have been getting the buffer overflow error. Although, I seemed to have reached a state where I am back to a "cannot bind to the specified serial port /dev/ttyUSB0" error that I had been experiencing before.

If I'm still having issues after I get through that, can I call on you to dig up the solution you found?

I will do that on Sunday, the latest if you don't mind. My setup was Ubuntu 20.04 and not in docker. Having problems with docker exposing /dev even with --privileged, but when I will fix that issue I will post as well docker version of it.

@totenkatze
Copy link

I was able to get this working on my raspberry pi 4 running ubuntu 22.04 without having to chmod /dev/ttyUSB0 or add myself to the dialout group. I did have to run "./ultra_simple --channel --serial /dev/ttyUSB0 256000" as sudo though as a result.

I'm still having issues getting it to work on my jetson nano, which is running xubuntu 20.04. I'll have to look into where I went wrong there.

@LDec-AlmostHuman
Copy link

LDec-AlmostHuman commented Mar 11, 2023

@totenkatze
As I will work on future changes I have moved explanation to my github:

(https://github.com/LDec-AlmostHuman/Slamtec-RPLidar-A2M12)

@LDec-AlmostHuman
Copy link

LDec-AlmostHuman commented Mar 11, 2023

@totenkatze
Above Rviz2 for some reason doesn't work on ROS2 Humble, on ROS2 Foxy works without issues.

I was testing above setup of Lidar with Jetson Nano with JetPack 4.6.1 and I have managed to spin Lidar, but couldn't see results as Nano froze and since I have a problem with powering via jack, only powering via USB seems to work. PSU is 5.2V 4A under full load and 5.22V without any load. No idea what happened, but will have time to work on it by the end of the month so will post as well Nano instructions.
BTW are you thinking of switching to Orin Nano or Orin NX 😄? Cannot wait to get my hands on it. I was thinking of AGX Orin dev kit, but it's a bit too pricey for my current budget. Despite Orin NX with carrier board will be around 1.000€ for 16GB model. I'm still in the dark with PCIE 4 on carrier board. All available now seem to be PCIE 3. All my NVME drives are PCIE 4. I know they will work, but ... 😄.

@totenkatze
Copy link

@LDec-AlmostHuman Thank you for sharing the instructions above. I'll give them a try on my nano this weekend. I have tried most of the items in the instructions without success, but I'm curious to see if adjusting the baud rate would help me out.

Getting things running so effortlessly on my Pi with 22.04 while still having such difficulty on the nano makes be feel a bit less crazy.

I haven't looked into the Orin yet. I'm just getting started with robotics as a hobby. I have a few old Raspberry Pis, two Jetson Nanos, and an Orange Pi 5 on the way. With the $XXXX dollars I've spent on robots and parts, I think that I should have just starting doing cocaine to save a bit of money.

@LDec-AlmostHuman
Copy link

LDec-AlmostHuman commented Mar 11, 2023

@totenkatze
Maybe Nano has not enough juice to spin the Lidar.
Try to connect power USB to Lidar from other source of power.
I have tested Xubuntu 20.04 on AMD PC and it worked, I have added instructions for Xubuntu above, but it worked without problems.
I don't have second Nano and will have time to fix Nano in circa 2 weeks.
You are not the only one with $xxxx spent on robotics hobby projects 😄. And I actually like doing such projects.
Next week I was thinking of running both A2M12 and OAK-D S2 to see how would that setup work.

@LDec-AlmostHuman
Copy link

LDec-AlmostHuman commented Mar 12, 2023

@totenkatze
Just tested on Jetson Nano with Xubuntu 20.04 and works without problems. I have followed instructions on installing Xubuntu from https://forums.developer.nvidia.com/t/xubuntu-20-04-focal-fossa-l4t-r32-3-1-custom-image-for-the-jetson-nano/121768/63.
Depending on your version of Nano please look at the comment 60 in above link.
Mine is B01 and it worked like a charm.
All together took me a bit over an hour, but all works. Lidar is spinning etc. Didn't try RViz2 or any ROS2 on it yet, but will try later today.

@LDec-AlmostHuman
Copy link

Anyone succeed with my guidance? If not please let me know.

@totenkatze
Copy link

@LDec-AlmostHuman the link you provided is the same that I used to set up my nano a few weeks ago.

Comments in the thread mention a B02 board a lot. Is that really a thing or are they confusing it with the B01?

I have a B01 also, and I didn't have any trouble booting from the image without modifying extlinux.conf.

I think I'll just start from a fresh image. It seems easier than trying to figure out if something I've done in the last several weeks has caused the issue.

@LDec-AlmostHuman
Copy link

LDec-AlmostHuman commented Mar 14, 2023

@totenkatze
They are confusing B01 😄. Boots from SDCard without issues and without modifying extlinux, but I have changed that to proper b version and it boots as well, with or without kvm. It hangs on USB, but I think I know what the problem is. I have all other devices plugged in and it seems I need to boot for the first time with only USB drive plugged in. Didn't do it yet, just found out that from one of the posts. Let me know if you succeed with RPLidar.

@LDec-AlmostHuman
Copy link

@totenkatze
Someone wrote on NVidia forum that there might be some issues on B01 when you are using A01 in extlinux. Maybe this is the problem.

@totenkatze
Copy link

@LDec-AlmostHuman I started from fresh install of xubuntu and installed git, make, g++, etc. and after the compile, it worked when running as sudo. I chmod /dev/ttyUSB0 to 666 (any form of XX6 works) and it worked without sudo privileges. Now I have everything working on both my Pi and Nano =).

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

5 participants