Release Notes

Dave Shinsel’s Robot Control Code Release Notes

Release 12/3/2013

New in this releaseKobuki Base for TurtleBot and control from Android phone!

1. Added support for the popular Turtlebot Kobuki base! This is an alternative to using ROS for Turtlebot.  ROS is excellent robot OS, but I personally struggle with all the configurations and apps running.  It’s hard for me to debug.  But that’s just me. 🙂  In addition, I want to use Windows instead of Linux for some specific designs I have in mind (specifically, a telepresence robot)

2. Added code to control robot from an Android phone.  The Android phone communicates with the robot’s Arduino over bluetooth.  The code uses the phones accelerometer to drive and steer the robot just by tilting the phone.  Lots of buttons on the app to control behaviors.

3.  Added more OpenCV code back in for doing SURF analysis for object identification.  This is a work in progress, not yet finished.  You can you enable RobotCamera app in “Globals.cpp”  (look for “AUTO_LAUNCH_CAMERA_APP”).  This code was tested with OpenCV 2.4.2, and expects to find it in “c:\OpenCV2”

 

Release 1/15/2013

New in this release:  External dependency problems Fixed and Arduino Support!

1. Converted all PIC code to Arduino! This also might make some good sample code for anyone wanting to use an Arduino as a sensor interface to a PC.

2.  Removed External Dependencies.  The old code had lots of external libraries linked to it.  This version should have no external dependencies for the core Robot code (but I have not tested it on a clean system, so let me know if you have any issues).

3.  Separated the code into several applications.  This allows running some parts of the code in “release” (high performance), while running other code in “debug”, which will have lower performance.  It also allowed moving external dependencies to just the projects that need them.

The solution files are:

Robots.sln: Core C++ robot application for both Loki and Turtle versions (builds both simultaneously).  Optionally launches the other applications, and also talks to the Arduino via the serial port.

To build, choose Build à Rebuild Solution.  After building, right click on either Loki or Turtle in the Solutions Explorer pane, and choose “Set as Startup Program”.  Then, hit F5, and it should run!

NOTE!  First time you run, you will see errors that “Command.rcd” and “Setup.rsd” not found.  If so, you might get asserts too.  Just click OK and Ignore.  These are configuration files.  When the app comes up, click on File – New – Command, and save as “c:\dev\_Robot\LokiData\Command.rcd”.  Do the same for Setup, and you should be all set.  Also, if you modify anything on the setup page (Like COM ports)  click on “Save on Exit”, to save your config when the app shuts down.

 

RobotKinectViewer.sln: C# program that handles all Kinect capture, including Speech Recognition (uses the Kinect phased-array microphones).  Talks to the core robot program via memory mapped file.  Build this in release mode if you want the Robot application to find and launch it.

RobotCamera.sln: Initial Camera control code.  Uses OpenCV2 to process video from the robot’s “eyes”.  Talks to the core robot program via memory mapped file.  Build this in release mode if you want the Robot application to find and launch it.  Note: This version is just an initial version, which focuses on Person Identification (goal is for the robot to recognize who he is talking to).  It does not ID very well yet.  Further, there is no other OpenCV capabilities used.   If you want examples of SURF or other OpenCV capabilities, see older versions of the Loki code for examples with OpenCV 1.0.  I need to port all that code to OpenCV2 someday…

Hints:

  1.  To control auto-launch of apps see Globals.cpp
    1. AUTO_LAUNCH_KINECT_APP                1  // launch
    2. AUTO_LAUNCH_CAMERA_APP             1  // launch
    3. To change robot Hardware Configuration see:
  • HWInterfaceLoki.h
  • HWInterfaceTurtle.h
  1. Speech recognition is handled in 2 parts:
  • Recognition and conversational responses are all in the C# app.  See:
    • RobotKinectViewer \SpeechRecognizer.cs,
    • RobotKinectViewer \SpeechEnums.cs,
    • Speech\*.grxml
    • Complex responses are handled in SpeechReco.cpp
  1. KerrControl is for Shoulder Motors controller
  2. Arm and head servos are Dynamixel
  3. The Turtle version will only auto-launch Kinect if it an iRobot base is found.  That’s because the code first turns on Kinect power on the base, and then launches the app.  In the Loki version, Kinect power is wired to a manual switch (for now; I plan to make this controlled by the Arduino in the future).

 

Installing Loki Software onto a new laptop

Suggested install order:

  • Windows 7
  • Visual Studio 2010
  • MSDN
  • OpenCV 2.0 – Install to C:\OpenCV2
  • Install Microsoft Kinect SDK 1.5 (make sure to first uninstall SAPI if you had installed it before)
  • Install Dolphin, which allows permanent pairing of WiiMote:  http://dolphin-emulator.com/  If you get this error: “This application has failed to start because XINPUT1_3.dll was not found”, you need to update your DirectX Runtime: Download here: http://www.microsoft.com/downloads/details.aspx?FamilyID=2da43d38-db71-4c1b-bc6a-9b6652cd92a3
  • Optional: Install MS DDK.  Needed to rebuild Release Build of WiiRemote.
  • Optional: Install Intel GPA to enable Tracing (www.intel.com/software/gpa) (look in the code for all “ITT_” calls), this allows performance profiling.  You will also need to add dependencies in the solution file to use this.

Unzip and Copy Robot code :

  • Copy the code to c:\Dev\_Robot on the target PC.  When done, you should have a solution file: c:\Dev\_Robot\Robots.sln
  • Make sure files are not read-only!   Right click on Dev and uncheck Read Only
  • copy and unzip “ArduinoLibrary-Copy to libs dir“.  Copy the FreqPeriodCounter folder to your MyDocuments/Arduino/libraries folder (or where ever you put your libs)

 

Update Visual Studio paths as needed:

  • Open:  Project à Robot Properties…
  • Confirm all the paths exist and are correct:
    • C++ Additional Include Directories
    • Linker Additional Library Directories
    • Add the following to the System Path:  C:\OpenCV2\bin;
      (Computer –>Properties –> Advanced System Settings –> Environment Variables)

 

One Response to Release Notes

  1. shane says:

    hey Dave i’m really impress with your fine work, you see i’m 19 years old and i would love to know how to code. do you know any books or sites that can teach me???

Leave a Reply

Your email address will not be published. Required fields are marked *