Thursday, February 19, 2009

Vision tracking in QUARC using OptiTrack

Measuring the position of an object is fundamental for control systems development. For certain applications, for example unmanned aerial vehicles or ground vehicles, this can be quite challenging. That is why we have integrated the NaturalPoint OptiTrack camera system into QuaRC. The OptiTrack camera system consists of three or more synchronized infrared (IR) cameras that capture images containing reflective markers within a workspace. The cameras emit IR light from an array of IR LEDs, and the IR light reflected by the special markers is picked up by the cameras and seen as bright spots on the image. Software then processes the images from the collection of cameras and determines the position of each marker in the 3D workspace. Rigid bodies (rigid shapes made up of 3 or more reflective markers) can be constructed and tracked in 6-DOF (position and orientation).

We have integrated the OptiTrack camera system in QUARC so that the designer can use a simple set of QUARC blocks in Simulink to track individual markers or rigid bodies. To test the performance of the system, we wanted to see if it was possible to control a standard inverted pendulum experiment using visual feedback instead of the standard encoder feedback. To control the inverted pendulum you must be able to measure the pendulum base arm angle and the angle of pendulum. We placed refective markers on an inverted pendulum experiment and used a simple QUARC block to interface with the OptiTrack system to measure the marker positions. Knowing the marker positions, we can determine the angle of the pendulum base arm and the angle of the pendulum so that it can be controlled.

The following video shows the results of this experiment. As you can see, it is possible to stabilize the inverted pendulum using vision-based feedback. The OptiTrack system combined with QUARC is a powerful new control tool, opening up the possibility for many new control experiments. Objects that were previously difficult to track, such as indoor autonomous vehicles, can now be tracked by adding reflective markers.

2 comments:

Unknown said...

hello
I saw you develop a nice control system in simulink using optitrack
I try to do the same but encounter problems to inteface NatNet in Simulink althogh i succed to do so in Matlab
do you have any tips?

thanks
Or Hirshfeld
http://il.linkedin.com/pub/or-hirshfeld/4b/79/577/

Cameron Fulford, Manager Control Systems Group, Quanser said...

Hi Or,
Our particular OptiTrack blockset for Simulink doesn't use NatNet, but instead uses the OptiTrack Motive API directly. Another tool set in QUARC is the Stream API, which we then use to transmit data between controllers (local and remote). Thanks,
Cameron