-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add support from Hokuyo lidar #1186
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this PR. It would be great to be able to use the Lidar on an F1Tenth car. The the code looks very good; I have left a few comments. There are other concerns:
- is there a parallel PR for the docs? Without documentation on how to setup the Lidar the software is not that useful and it becomes a maintenance burden. Links out to reliable, stable content can do most of the work. It would also be great to have a video of the webui output.
- we should also mention in the camera section of the docs about how to setup the 'camera' to be the lidar scan. That is a really good idea.
- we should rebase/squash these two commits into a single commit.
|
Thanks @Ezward for the review, I'll probably get to the fixes/writing docs in a week or so. |
|
Hi @Ezward I addresssed your review and made a PR for documentation: autorope/donkeydocs#56 |
| outputs=['cam/image_array', 'cam/depth_array', | ||
| 'imu/acl_x', 'imu/acl_y', 'imu/acl_z', | ||
| 'imu/gyr_x', 'imu/gyr_y', 'imu/gyr_z'], | ||
| threaded=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be left a threaded part.
donkeycar/parts/lidar.py
Outdated
| # show the image in the window | ||
| cv2img = convert_from_image_to_cv2(img) | ||
| cv2.imshow("lidar", cv2img) | ||
| # cv2img = convert_from_image_to_cv2(img) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls remove commented code.
…nd donkeycar/templates/complete.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address the comments and please also bump up the version. You might want to wait until your other PR get's merged so you got the right version to base off.
|
@DocGarbanzo should be good now. |
lidar.pyto interface with HokuyoLidarPlot2to be used with Hokuyo so it can act as aCamerain the web interfaceLidarPlot2with existing templates/configsNotes:
To set it up you need to configure the Ethernet port on the Pi by creating a file in
/etc/interfaces.d. This is well-described by many online tutorials, and googling "f1tenth hokuyo" also brings up a lot of helpful info.Also, unlike the RPLidar(2) parts, instead of returning a generator of individual measurements this part returns the entire scan at once. Thus in
complete.pyit is calledlidar/dist_scaninstead oflidar/dist_array.Pictures:


