A repo for remote controlling a LEGO EV3 with rplidar and usbip
The robot has an EV3 onboard connected to the motors and to a usb hub with additional dc power from an external battery. In the hub there is the rplidar and a wifi dongle. The lidar is accesed using usbip, which means it can be accesed from anywhere in the world! The robot is controlled from a remote computer from an ssh connection.
- Install EV3dev: https://www.ev3dev.org/
- Setup usbip: https://www.linux-magazine.com/Issues/2018/208/Tutorial-USB-IP
- Install rplidar_sdk: https://github.com/Slamtec/rplidar_sdk
Now, to use the lidar install python3
and the following libraries:
rplidar-roboticia
matplotlib
├── bot
│ ├── control-bot.py ->Move the robot
│ ├── sensors.py ->Get sensors status
│ └── usbip.sh ->Setup usbip server
├── LICENSE
├── navigation
│ ├── get-distances.cpp ->Get a 360 scan
│ ├── get-point.c ->Find the point in a 2d array
│ ├── naver-ncurses.c ->Set the destination for below
│ ├── navigation.cpp ->A* algorithm for navigating in the area
│ ├── print-map-ncurses.c ->Print map nicely
│ └── README.md
├── pc
│ ├── camcap.sh ->Capture an image
│ ├── rplidar-live.py ->Live data from lidar displayed with matplot and numpy
│ └── usbip.sh ->Connect to robot's usbip server
└── README.md
The Lidar is an RPlidar, I used the A1 model.
Motors: 2 Large motors on B and C
Sensors: Proximity, Color, Gyro