|
| 1 | +--- |
| 2 | +author: [ "oliver.schwaneberg@gmail.com" ] # your GitHub user name" ] |
| 3 | + |
| 4 | +programming_language: "C++" # The programming language used in this project |
| 5 | + |
| 6 | +youtube_video_id: NyMrNpszMj8 |
| 7 | +# thumbnail_override: "/images/projects/my-project/my-image.png" # If you don't have a YouTube video (or the video thumbnail isn't good) you can uncomment this line to set your own image for the project. |
| 8 | + |
| 9 | +#project_homepage_url: "http://example.com/my-super-cool-project" # Homepage for this project |
| 10 | +source_code_url: "https://github.com/Schwaneberg/YDLidarCar" |
| 11 | +#building_instructions_url: "http://example.com/building-instructions.pdf" # how to build the model out of LEGO (*not* how to build the source code) |
| 12 | + |
| 13 | +excerpt: "This project demonstrates how to use an YDLidar X4 to control a car. Unlike the lidars by Neato, the YDLidar products are intended for teaching and research." |
| 14 | +--- |
| 15 | + |
| 16 | +There is an awesome demonstration on how to use the [Neato X11 lidar](https://www.ev3dev.org/docs/tutorials/using-xv11-lidar/) with ev3dev by @bmegli. |
| 17 | +However, the X11 lidar has some disadvantages: |
| 18 | + |
| 19 | +* Electric and mechanical integration is relatively difficult |
| 20 | +* The X11 is a deprecated vacuum robot and the availability of the part may go down soon |
| 21 | + |
| 22 | +The YDLidar X4 is very similar in size, shape, performance and price, but it is intended for teaching and research projects. |
| 23 | +The X4 comes with an adapter board to interface and supply it using a single USB port. |
| 24 | +ev3dev directly supports this adapter as a virtual serial port. |
| 25 | +The device is well documented and an [YDLidar SDK](https://github.com/yangfuyuan/sdk) is also available. |
| 26 | +However, I had some performance issues with the original SDK running under ev3dev, as the brick was not able to process the data buffer as fast as it is filled. |
| 27 | +Therefor, I created a modified version of the SDK and integrated it into an example project: YDLidarCar. |
| 28 | + |
| 29 | + |
| 30 | +It is a EV3 based car with front steering and rear wheel drive. |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | +The project basically contains two C++ classes: One to control the car and one to obtain data from an YDLidar X4. |
| 35 | +A third class *CruiseControl* is provided as a proof of concept. |
| 36 | +CruiseControl is not navigating anywhere, it just tries not to hit anything. |
| 37 | + |
| 38 | +[](https://www.youtube.com/watch?v=NyMrNpszMj8) |
| 39 | + |
| 40 | +The project is rather young and I didn't try to integrate [ev3dev-mapping](https://github.com/bmegli/ev3dev-mapping) yet. |
| 41 | + |
| 42 | +You are welcome to send me your feedback and suggestions via e-mail. |
0 commit comments