#ifndef __MRFC_IDL__
#define __MRFC_IDL__

#include "BasicDataType.idl"
#include "ExtendedDataTypes.idl"
#include "InterfaceDataTypes.idl"

module MRFC {
  typedef sequence<float> OGMapFloatCells;

  // 自己位置推定IF(自己位置統合用)
  struct TimedEstimatedPose2D { 
    RTC::Time tm;
    sequence<long> id;
    RTC::Pose2D ododata;        // ExtendedDataTypes.idl
    RTC::Pose2D estdata;        // ExtendedDataTypes.idl
    sequence<double> error;
  };

  // --------------------------------------------------------

  // 絶対座標系地図(octet)
  struct TimedAbsoluteOGMapData {
    RTC::Time tm;
    RTC::OGMapConfig mapconfig; // InterfaceDataTypes.idl
    RTC::OGMapCells cells;      // InterfaceDataTypes.idl
  };

  // 絶対座標系地図(float)
  struct TimedFloatAbsoluteOGMapData {
    RTC::Time tm;
    RTC::OGMapConfig mapconfig;   // InterfaceDataTypes.idl
    OGMapFloatCells cells;  // InterfaceDataTypes.idl
  };

  // 相対座標系地図(octet)
  struct TimedRelativeOGMapData {
    RTC::Time tm;
    RTC::OGMapConfig mapconfig;  // InterfaceDataTypes.idl
    RTC::OGMapCells cells;       // InterfaceDataTypes.idl
    RTC::Pose2D pose;            // ExtendedDataTypes.idl
  };

  // 相対座標系地図(float)
  struct TimedFloatRelativeOGMapData { 
    RTC::Time tm;
    RTC::OGMapConfig mapconfig;  // InterfaceDataTypes.idl
    OGMapFloatCells cells; // InterfaceDataTypes.idl
    RTC::Pose2D pose;            // ExtendedDataTypes.idl
  };

  // 絶対座標系地図で表現された大域地図情報の取得
  interface AbsoluteMapService {
    RTC::OGMapConfig getAbsoluteOGMapConfig();
    TimedAbsoluteOGMapData getAbsoluteOGMap(in double x, in double y, in unsigned long width, in unsigned long height);
    TimedFloatAbsoluteOGMapData getFloatAbsoluteOGMap(in double x, in double y, in unsigned long width, in unsigned long height);
  };

  // 相対座標系で表現されたロボット中心地図情報の取得(サイズはプロバイダ側で決定)
  interface RelativeMapService {
    RTC::OGMapConfig getRelativeOGMapConfig();
    TimedRelativeOGMapData getRelativeOGMap(); 
    TimedFloatRelativeOGMapData getFloatRelativeOGMap();
  };

  // --------------------------------------------------------

  struct PersonData {
    RTC::Point3D position;
    RTC::Velocity2D velocity; 
  };

  struct PeopleTrackingData {
    long id;
    sequence<PersonData> person;
  };

  // 人間位置IF
  struct TimedPeopleTrackingData {
    RTC::Time tm;
    PeopleTrackingData data;
  };
  
};

#endif
