/* LICENSE:
  =========================================================================
    CMPack'04 Source Code Release for OPEN-R SDK 1.1.5-r2 for ERS7
    Copyright (C) 2004 Multirobot Lab [Project Head: Manuela Veloso]
    School of Computer Science, Carnegie Mellon University
    All rights reserved.
  ========================================================================= */

#ifndef INCLUDED_MessageStructures_hh
#define INCLUDED_MessageStructures_hh

#define TRACE 0
#define TRACE_VISION 0

#include <string.h>

#include "Gaussian2.h"
#include "../Motion/MotionInterface.h"

struct VisionControl {
  static const int TakeSnapshot=0;
  int command;
};

struct HeadPositionInfo {
  // specified in radians relative to neutral
  // see Sony documentation on sensor readings for details
  float pan,tilt,roll;
  // pan: + to the left
  // tilt: + is upward
  // roll: ?
};

struct MovementInfo {
  Motion::MotionLocalizationUpdate movement;
  bool curMove;

  MovementInfo() {
    memset(&movement,0,sizeof(Motion::MotionLocalizationUpdate));
    curMove=false;
  }

  MovementInfo(const Motion::MotionLocalizationUpdate &motion) :
    movement(motion),
    curMove(false) {
  }
};

struct RobotPositionInfo {
  Gaussian2 position;
  Gaussian2 heading;
};

#endif
