Skip to content
This repository has been archived by the owner on Dec 28, 2022. It is now read-only.

RPi Quickstart Guide

Kyle Granat edited this page Mar 26, 2015 · 7 revisions

Please read through the Hardware Overview before attempting this QuickStart Guide.

Power On & Login

  1. Position Robot into neutral sitting position, shown here (picture). Ensure main power switch is in off position.

  2. Plug in a monitor via the HDMI port.

  3. Plug in a keyboard, mouse, Wifi Dongle, and ArbotiX Pro via the 4 USB ports. NOTE: If you wish to test bluetooth while using a keyboard/mouse, you may need to get a USB hub. 4.Verify your power connections from the ArbotiX Pro to the Raspberry Pi are correct

  4. Turn robot on by flipping the switch on the back of the robot.

  5. You will see a command line interface as the robot boots up. Eventually you will see the prompt hros1 login: enter the username 'pi' You will now see the prompt password: enter the password 'raspberry'

  6. type 'startx' to enter the raspberry pi GUI . WIFI stuff goes here

Library Dependencies

If you're using the stock HR-OS1 Raspberry Pi image, the following dependencies should already be set up on your computer. Running these commands will not hurt if you already have the dependencies installed. If you are working from an image that came with your HR-OS1 or the stock image, you can skip to setting up the framework

Check / get the latest packages $ sudo apt-get update && sudo apt-get upgrade You may see a prompt Do you want to continue [Y/n]? Type 'Y' and hit return/enter to continue.

Install various dependencies for the HR-OS1 Framework

$ sudo apt-get install build-essential git libncurses5-dev libjpeg-dev mplayer

$ sudo apt-get install bluez-utils bluez-compat bluez-hcidump libusb-dev libbluetooth-dev joystick

As before, if you see a prompt Do you want to continue [Y/n]? Type 'Y' and hit return/enter to continue.

Install Node.js server apt-get installs an older version of Node.js, so instead Node.js must be built from source. Note that on the Raspbery Pi this can take 1-2 hours.

Download the latest version of Node.js, 1.12.1 as of this writing

$ wget http://nodejs.org/dist/v0.12.1/node-v0.12.1.tar.gz

unpack the file

$ tar -xzf node-v0.12.1.tar.gz

move to the unpacked directory

$ cd node-v0.12.1

configure

$ ./configure

make/compile $ make

install

$ sudo make install

Move back to the home directory and delete the node installer files

cd ../ rm node-v0.12.1.tar.gz rm -rf node-v0.12.1

Framework Repository Setup

First we must install dependencies for the Framework and clone a fresh copy of the repo onto the root filesystem. We use Git to handle our repositories. Click here for more information on using Git.

  1. Clone HROS1-Framework Github Repo
  • We install the Framework in the home folder.

Use this command to make sure your in the pi user home directory $ cd ~

Now clone the latest version of the repository to your local machine $ git clone https://github.com/Interbotix/HROS1-Framework.git

To check that everything worked, type $ ls ~ You should see several folders including 'HROS1-Framework'. This is the folder that will hold all of your robot's code.

  • Change directory to HROS1-Framework: $ cd HROS1-Framework

Build Framework Libraries & Projects

  1. Compiling Framework Libraries
  • The Makefile for the core library is found here:

/HROS1-Framework/Linux/build

  • Change directory in Terminal to build folder: $ cd ~/HROS1-Framework/Linux/build
  • Compile core framework libraries: $ make all
  • Ensure that no errors exit the compile process, and that the darwin.a library object has been created: $ ls ~/HROS1-Framework/Linux/lib
  1. Compiling dxl_monitor & Network Scan

The dxl_monitor project is a diagnostic tool that allows us to scan the Subcontroller's Dynamixel TTL network and returns the results of the servo IDs found. It can also be used to modify servo properties stored in the register table.

  • The Makefile for dxl_monitor is found here:

~/HROS1-Framework/Linux/project/dxl_monitor/

  • Change directory in Terminal to project folder: $ cd ~/HROS1-Framework/Linux/project/dxl_monitor
  • Compile dxl_monitor: $ make
  • Ensure that no errors exit the compile process, and that the dxl_monitor program has been created inside the folder.
  • To run dxl_monitor: $ ./dxl_monitor
  • Perform a Dynamixel network scan: > scan
  • This should return the 'OK' status of Servo IDs 1-20, and the Subcontroller ID of 200. If any of these show up as failed, please see Troubleshooting for assistance.
  • If you encounter an 'Failed to connect to CM730' error, please see Troubleshooting.

If all 20 servos show up on network scan as 'OK', your robot is properly recognizing all servos and should be ready for motion page playback testing. Type exit to exit program and return to Terminal prompt.

  1. Compiling rme & Testing Action playback

The project rme is an application that allows for the capture and playback of servo animations. Standing, Sitting, Walk Ready, Gestures & Animations are created within this program, and then the motion pages can be played back by calling the Action module functions within the Framework.

  • The Makefile for rme is found here:

~/HROS1-Framework/Linux/project/rme/

  • Change directory in Terminal to project folder: $ cd ~/HROS1-Framework/Linux/project/rme
  • Compile rme: $ make
  • Ensure that no errors exit the compile process, and that the rme program has been created inside the folder.
  • To run rme: $ ./rme
  • A terminal screen with a table of data will be drawn. The left-most columns show the servo IDs, and the STEP0