Argo - An Autonomous Suitcase that Follows You
Northwestern MSR Winter Project 2018
Please see my portfolio post to read more about how the code works.
Part 1: Requirements
- Raspberry Pi 3 B
- 2 DC Brushed motors
- RoboClaw Motor controller
- 12V battery (2800mAh)
- Raspberry Pi Camera Module v2
- 2 wheels
- Extra features: power switch, caster wheel, camera mount, screws, velcro, adhesives, USB cables (A, micro, mini)
- ROS Kinetic
- Ubuntu MATE (Rasbian OS also compatible)
- raspicam_node Provides an easy way to interfave the Raspberry Pi camera module with ROS
- ar_track_alvar (use apt-get) Library for creating, detecting, and tracking AR tags
- image_view (use apt-get) Simple viewer for ROS image topics
here)Part 2: Installing ROS Kinetic on the Pi (more info
- Install the Ubuntu MATE operating system onto an SD card and plug it into the Pi. Grab a snack, the initial setup will take a little while.
- Update and upgrade your Pi:
$ sudo apt-get update $ sudo apt-get dist-upgrade
Set your localization settings and restart the Pi. 3. Set up your ROS repositories:
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' $ sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
sudo apt-get update.
- Install ROS Kinetic (full desktop version):
$ sudo apt-get install ros-kinetic-desktop-full
$ sudo rosdep init $ rosdep update
- Create your workspace:
$ mkdir ~/catkin_ws/src/ $ cd ~/catkin_ws $ catkin_make
- source your new setup using the command:
$ source devel/setup.bash
You'll need to source your .bash file every time you open a new shell. Save some time by making an alias for this command in your .bash_aliases file.
Part 3: Download the
- In your
/catkin_ws, run the commands:
$ git clone https://github.com/dganbold/raspicam_node.git $ git clone https://github.com/aamirhatim/argo.git
catkin_makein your workspace:
$ cd ~/catkin_ws $ catkin_make
Part 4: Running Modes
Autonomous Tracking Mode
In this mode, Argo will search for an AR tag and begin following it. Run the following commands to launch the program:
$ roslaunch argo find_tag.launch
find_tag.launch you can change the size of the AR tag as well as the error tolerance.
Manual Drive Mode
To control with your keyboard, run the
$ rosrun argo manual_drive.py
Control Argo using the WASD keys. Press 'e' to stop and 'q' to quit the node. You must press Enter for your command to register!
Path Following Mode
path_driver.py node to have Argo follow a pre-programmed path: a line, a figure eight, or a circle. The robot will continue to follow its last command on quitting so you must run the stop command in
manual_drive.py to stop it.
$ rosrun argo path_driver.py