Skip to content

A remoted controlled LEGO EV3 with rplidar and usbip

License

Notifications You must be signed in to change notification settings

ikozyris/rplidar-ev3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rplidar-ev3

A repo for remote controlling a LEGO EV3 with rplidar and usbip

How does it work

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.

Software Installation

  1. Install EV3dev: https://www.ev3dev.org/
  2. Setup usbip: https://www.linux-magazine.com/Issues/2018/208/Tutorial-USB-IP
  3. Install rplidar_sdk: https://github.com/Slamtec/rplidar_sdk

Now, to use the lidar install python3 and the following libraries:

rplidar-roboticia
matplotlib

Project structure

├── 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

Hardware setup

The Lidar is an RPlidar, I used the A1 model.
Motors: 2 Large motors on B and C
Sensors: Proximity, Color, Gyro