DrawShapes demo

From Tekkotsu Wiki

Jump to: navigation, search

The DrawShapes demo looks for ellipses in the current camera image, projects them to world space, and adds them to the RawCam draw list so they show up in the RawCam image. Now, moving the robot's head or body will change the camera image, but the ellipses will appear fixed in space because they are back-projected from world space to the camera frame with every new camera image. The ellipses' colors are inverted in world space so that they contrast better with the camera image.

Robot type: any platform with a camera

Where to find the demo: Root Control > Framework Demos > Vision Demos > DrawShapes

Source code: Tekkotsu/Behaviors/Demos/Vision/DrawShapes.cc.fsm

Running the Demo

  1. Start Tekkotsu and bring up a RawCam viewer.
  2. Use he Head Controller to move the camera so that some ellipses are in view.
  3. In the ControllerGUI, go to Root Control > Framework Demos > Vision demos and run the DrawShapes demo.
  4. The ellipses should appear in the RawCam image.
  5. Use the Head Controller to move the camera. The ellipses should appear fixed in space.
  6. Use the Walk Controller to move the robot. Again, the ellipses should appear fixed in space.