|
Type:
Language:
Target :
Device:
|
Android Application
Java
Android 2.2 (API level 8)
Archos 28 tablet
|
Source Code:
version 1.0
12-01-2012
|
Software License:
|
Description :
Allows ROFI to walk around and avoid obstacles. Any object 35cm or closer in front of the robot is detected as an obstacle using the ultrasonic range finder (ROFI's eyes). Obstacles are avoided by turning right until the path is clear. The Android tablet provides a graphical user interface (GUI) with adjustable speed and playback controls. The speed for the walking action has been tuned, but you can adjust it using the speed slider. Press the play action button to make ROFI start moving, and press the stop button to make ROFI stop.
User Interface :
Packages
- org.microbridge.server : the collection of code that allows the Android tablet to communicate with the Arduino Mega.
- rofi.projectbiped.com : the collection of code that contains the user interface and playback logic.
Files
ROFI_ActionPlaybackActivity.java
- Specifies the action animations inside of the GetWalkPositions() and GetRightPositions() methods
- Specifies the servo calibrations through the servoCalibrations array
- Ownes the server object that does bidrectional communication with the Arduino device
- Extends Activity class, so it can define the GUI
- Implements the Runnable interface so that it can control the playback flow (see the run method)
- Contains all of the information about a single action (servo positions, current playback frame, etc).
- This was added to the Navigator program because more than one action needs to be performed (walking and turning)
- The frameShift member specifies the first frame of the action (i.e. it can be different than the start of the positions array)
- This is used to set the first frame to be a good frame to transition to other frames. For example the walking action uses this to pick the best frame to transition to the walking action (otherwise ROFI might fall over when it stopped walking and started turning).
- The best transition in this case is just the frame that is most like the home position (all servos at 0 degrees)
- The frame shift can be auto computed by setting the autoShiftFrames flag to true in the constructor (which calls the private AutoSetFrameShift() method internally)
- Specifies that ROFI_ActionPlaybackActivity is the activity that should be run once the application starts up
- Requests permission to use the internet (android.permission.INTERNET) which allows communication with the Arduino Mega board
Dependencies :
- Requires that the Android Remote Control application is loaded on the Arduino Mega board.
- Requires that the Arduino Mega board is connected via USB cable to the Archos 28.
Installation :
- Setup the Android development environment on your computer.
- Download the source folder for this application.
- Open Eclipse on your computer.
- Add this application to your work space.
- From the main menu : File / Import / Android / Existing Android Code Into Workspace
- Select the folder you downloaded that has the source code for this application.
- Make sure all of the dependencies have been met.
|
|