How to Run MantisBot

This assumes that a control network has been developed in AnimatLab and is ready to be run onboard MantisBot.

It is important to note that operating the robot is currently a two-person operation. Someone needs to have their finger on the e-stop when the standalone simulation file is executed from the command line. Someone also needs to monitor the zero-ing of servos to ensure that MantisBot does not cross any of its legs during startup.

***For higher quality images, download: MantisBot Supplementary Guide

1.) Copy the ax12.h and ax12.cpp files (found in openFrameworksArduino/Arduino/Libraries/Bioloid)  into \Documents\Arduino\libraries\Bioloid

This only needs to be done once

2.) Ensure that the robot is fully assembled and wired properly. All frames are mounted correctly (in line with horns), and all cables are plugged in. Use a USB/FTDI cable to connect your computer to MantisBot’s Arbotix-M, being sure to plug it into the board in the correct direction. Make sure the Arbotix-M is set to V-in power (rather than USB).

3.) Upload the “repair sketch” which is used to re-set the servo P-gains and compliance slopes to the correct values. Every time the robot is powered off these are reset to the default values.

4.) Check to see what COM port the board uses to communicate with your computer. This can be done by turning on power to MantisBot and uploading a basic sketch, such as Blink.

5.) Open AnimatLab and load the .aproj file you will be using

2

6.) Change the COM port for the control board in AnimatLab to match what you found in step 4.

7.) Make sure that joint limits are set correctly, and the proper joints and stimuli for your test are enabled/disabled . Run the simulation (“play” button) and watch to ensure that it does what you expect in the simulation window.

3

8.) Right click on “Robot” in the design tree and select “export robot standalone simulation”

4

9.) Open up the arbotix firmata sketch (openFrameworksArduino/Arduino/Sketches/ArbotixFirmata) AND EDIT THE BAUD RATE IN THE TEXT OF THE SKETCH TO MATCH THAT IN ANIMATLAB. It should be 256000.

5

10.) Upload the Firmata sketch to the Arbotix-M

11.) The robot is run using the command line. Open a cmd window (type cmd into your windows start menu search and press enter).

12.) Change your directory to C://    by typing: cd/         and pressing enter.

13.)        Type in two strings to call the AnimatSimulator and the standalone simulation file. Both should be in double quotes, and they should be separated by a space. The first string should be the same every time you run the robot, but the second will change with your standalone files. For me, running a standalone simulation file named “MantisBotController20141109-KinematicComparison2,” the strings look like this:

“Program Files (x86)\NeuroRobotic Technologies\AnimatLab\bin\AnimatSimulator”
“Users\David\Google Drive\Animatlab-shared\MantisBotController20141109-KinematicComparison2\ MantisBotController20141109-KinematicComparison2_Standalone.asim”

Note that in the second string the file name appears twice, since it is in a folder with an almost identical name. The second time the name appears, it includes “_Standalone.asim” which is automatically added when you create a standalone simulation file

6

14.) Hold on to your butts and punch it Chewie. Pressing enter will run your standalone simulation file.

What Can Go Wrong:

  • Incorrect servo IDs on the servos themselves or in AnimatLab
  • Servo properties set incorrectly (be careful not to set up MX-64s with AX-12 properties)
  • Servo joint limits not set properly
  • Incorrect baud rate between AnimatLab and the Firmata Sketch
  • Servos have their “enabled” property set to false in Animatlab