Skip to content

How to get one measurement at a time #37

Open
bolin01 opened this issue Nov 10, 2020 · 1 comment
Open

How to get one measurement at a time #37

bolin01 opened this issue Nov 10, 2020 · 1 comment

Comments

@bolin01
Copy link

bolin01 commented Nov 10, 2020

Hi, this is a great repository! All the examples work out great for me. The only problem I have is when I call lidar.iter_scan(), it returns measurement continuously and the program just stucks there so that I can not do that tasks in the code. I am curious how can I get one measurement at a time from lidar so that I can do others tasks in a while loop.

Pseudo code for my desired program is:
while True:
1. Get raspberry pi v2 camera image
2. Get measurement from lidar (when I use lidar.iter_scan(), lidar starts returning scans continuously and the program gets stuck here forever)
3. Command robot to move

Appreciate your help.

@bolin01 bolin01 changed the title How to Get One Measurement at a Time How to get one measurement at a time Nov 10, 2020
@emilbak5
Copy link

emilbak5 commented Mar 4, 2021

Did you ever get this solved? I am having the exact same problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants