Stalker+II

= Project Stalker II =

Stalker is a project of Kenniscentrum Mechatronica, Fontys hogeschool Engineering. Existing in 2 forms, Stalker I and II are made to autonomously follow individuals in order to record videos of this person’s muscle behavior during movement. While Stalker I is created for the sports industry and help improve athletes, Stalker II was made to aid in healthcare en therapeutic rehabilitation purposes.

toc

**Stalker II**
Stalker II, currently in its second iteration, uses a Parallax microcontroller to control the hardware and an additional laptop containing secondary software to calculate direction and speed. Person tracking is achieved by using a Windows Kinect which allows for tracking without the need of additional markers.

**Platform**

 * || The Parallax microcontroller(2) uses serial communication to receive input from the laptop. These messages are then interpreted to control the H-bridges(3), which in turn controls the wheels(4-7). Each wheel has its own DC motor and servo motor to adjust the wheel's speed and directon. The entire system, including the Kinect(1), is powered by a 12V LIPO battery(8).

Decision for the Parallax has been made for the fact that is has multiple cores allowing to perform asynchronous tasks. Its software is written in Propeller which contains the following tasks:
 * 1) Kinect camera //(Windows Kinect)//
 * 2) Parallax Microcontroller
 * 3) H-bridge (2x)
 * 4) Frontwheel left
 * 5) Frontwheel right
 * 6) Rearwheel left
 * 7)  Rearwheel right
 * 8) LIPO Battery //(FliteZone C5299)// || [[image:lectoraatmechatronica/top view2.jpg]] ||
 * Setting up serial communication with laptop.
 * Reading and performing instructions from laptop.
 * Setting up a Watch-dog timer for safety.
 * Controlling H-bridges.
 * Controlling the servo motors.



Protocol
In order to enable communication between laptop and Parallax, [|this]protocol has been made. Currently, the $2 command is used to drive the robot.

**Laptop**
The laptop contains the main program which calculates the speed and direction of the robot. It’s current program is written in C# using the Visual Studio Windows Forms format. Kinect is able to recognize a person and interpret skeletal joints of the person.



Using the official Kinect Software Developers Kit from Microsoft, a changing background caused by camera movement from driving the robot, did not influence the camera’s ability to perform its tasks. This was an issue in Stalker II’s previous iteration using OpenNI and is now seemingly solved with the SDK. While testing, the center skeletal joint seemed to be the most consistent and is therefore used to calculate position of the tracked person. The Kinect provides coordinates of this point which exists of an X and Y, both in pixels and a Z coordinate in meters. Using these coordinates, calculations can be made to set a speed and direction given to the Parallax microcontroller. Though current algorithms aren’t optimal, the ability to follow from the posterior and both lateral positions are currently integrated in the system.

**Current status**
At this time, the proof of concept has been delivered for the Stalker II. It has been made clear the goals set, are achievable with current available hardware. Improvements besides upgraded hardware, can be made in the algorithms section. It currently uses no PID-regulator which gives the robot a tendency to fall behind and always be in catch-up mode.

media type="file" key="video-2013-05-28-15-45-33.avi" width="300" height="300"

The following protocol is used for communication: