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

recording a frame #1

Open
robvoi opened this issue May 21, 2014 · 8 comments
Open

recording a frame #1

robvoi opened this issue May 21, 2014 · 8 comments

Comments

@robvoi
Copy link

robvoi commented May 21, 2014

Hi,

an example on how to record one frame and send it by serial port would be nice. (It is clear that some data may be lost during the serial output)

I tried it with my Arduino Mega. Lidar on UART3, PC on USB.
I tried to record one frame in an int array[359] and send it as soon as the next frame starts. But this results in very strange output. After two hours of try and error I concluded that I must run into a memory overflow. I don't know how much memory gets allocated during runtime - but this may be the issue.

Long story short request:
A demo for grabing and sending one frame woulde be nice.

Thanks
Robert

@robopeak
Copy link
Owner

robopeak commented Jul 9, 2014

It is almost impossible to record one frame on Arduino Mega. Since the AVR chip has very limited RAM size. Each measurement sample costs 5 bytes, so a full scan requires at least 5*360 =1800 bytes. This eats up almost all the RAM of the chip.

@robvoi
Copy link
Author

robvoi commented Jul 9, 2014

Thanks for the feedback. I now record and submit half a frame (the front 180 degree) for my robot.
The code can be found here: http://pastebin.com/wQbmNXbu

Nothing special but maybe it is of use for someone.

Any feedback and improvements are welcome :-)

@robvoi
Copy link
Author

robvoi commented Feb 25, 2015

I record a whole frame (angle rounded to full angle; limited to 180 degree scan in this example).
Here the code: http://pastebin.com/nRz0TChH

I get around 3Hz only with this. Any idea on how to improve the code to grab all frames?

@tong-wang
Copy link

I use RaspberryPi and Python to record data from RPLidar, here is the code https://github.com/tong-wang/PyRPLidar

@robvoi
Copy link
Author

robvoi commented Feb 26, 2015

Thanks a lot! I'll give this a try.

On 26 February 2015 at 02:14, Tong Wang [email protected] wrote:

I use RaspberryPi and Python to record data from RPLidar, here is the code
https://github.com/tong-wang/PyRPLidar


Reply to this email directly or view it on GitHub
#1 (comment)
.

@hyb123456
Copy link

I have a question that when i used the arduino UNO to receive the data of rplidar A2 with the code, it was ok. but,when i used the arduino 101, it was failed. I can't receive the data.
are there some differences to use the UNO and 101?

@alsrbaa13
Copy link

I have a question. I used arduino UNO to receive the data of ralidar A2 with your sample. But it transmitted each other. But, Although both of them have same baudrate, it doesn't work. The response is broken. What is my problem?

@jamshidtavana
Copy link

jamshidtavana commented Jan 17, 2019

I have a question that when i used the arduino UNO to receive the data of rplidar A2 with the code, it was ok. but,when i used the arduino 101, it was failed. I can't receive the data.
are there some differences to use the UNO and 101?
@hyb123456
Did you test that this Sensor RPLIDAR A2 works with Arduino UNO? Or do you think that it works?

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

6 participants