3WheelsBot is a mini-project made with the purpose of showing a use case of miLoCo and it’s based on beaglebone blue.
If you want an introduction to miLoCo consider reading this post an overview of miLoCo.
Before starting, check this post getting started with beaglebone blue for configuring the board.
You will find the code in this git repo. The code is in written in C++ and librobotcontrol is used to control the hardware on the beaglebone blue.
Post series structure
This post series is divided into 3 parts:
- This part is an overview of the project
- Plant model of 3WheelsBot (DC Motors + wheels)
- A software description focused on miLoCo implementation
The roboparts
Besides a beaglebone blue you will need the following parts:
- – 3WheelsBot chassis
- – Quick coupling system for PCBs
- – Beaglebone support
- – CHIHAI 6V motors with encoders
- – Some M3 screws
- – From one of these plexiglas kit robot, the steering wheel and the plexiglas
After you have printed the parts, to build the bot is pretty straightforward.
Moving the 3WheelsBot
After compiling the motion-control using the instructions on the project’s readme you will have to copy the binary to the board and then to execute it using scp and ssh respectively. The program has 2 operating modes: If you run it without any argument, the 3WheelsBot will move through a fixed path; but you can also control the movements with your keyboard. For this last case you need to run the program with the argument rem:
./motion-control rem
Waiting client...
The second part is to run a python script on your computer, which name is remoteControl.py. You need to give the IP that is using the beaglebone as an argument and optionally the port (only if you have changed it). For usage you can check the help with:
./scripts/remoteControl.py -h
Now that you are connected, the rest is to have fun pressing some keys.
Commands
- Up arrow -> go forward
- Down arrow -> go backward
- Left arrow -> rotate in place to the left
- Right arrow -> rotate in place to the right
- m -> returns the travelled distance per wheel
- space bar -> abort the given commands (stop the bot immediately)
- q -> exit
You can press the keys more than one time and the commands will be executed one after each other in the given order.
In the next post, we are going to go through the steps to get the plant model of 3WheelsBot.