// -*- C++ -*-
/*!
 * @file  Urg_to_Obstacles.h * @brief compornent * @date  $Date$ 
 *
 * $Id$ 
 */
#ifndef URG_TO_OBSTACLES_H
#define URG_TO_OBSTACLES_H

#include <rtm/idl/BasicDataTypeSkel.h>
#include <rtm/Manager.h>
#include <rtm/DataFlowComponentBase.h>
#include <rtm/CorbaPort.h>
#include <rtm/DataInPort.h>
#include <rtm/DataOutPort.h>

#include "intellirobotStub.h"

using namespace RTC;

class Urg_to_Obstacles  : public RTC::DataFlowComponentBase
{
 public:
  Urg_to_Obstacles(RTC::Manager* manager);
  ~Urg_to_Obstacles();

  virtual RTC::ReturnCode_t onInitialize();
  virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id);

 protected:
  // Configuration variable declaration
  // <rtc-template block="config_declare">
  double m_obstacle_max_radius;
  double m_max_dist;
  double m_urg_res;
  int m_urg_anglefront;
  int m_urg_anglemin;
  double m_urg_pos_x;
  double m_urg_pos_y;
  double m_urg_pos_theta;
 
  // DataInPort declaration
  // <rtc-template block="inport_declare">
  TimedLongSeq m_urg;
  InPort<TimedLongSeq> m_urgIn;

  // DataOutPort declaration
  // <rtc-template block="outport_declare">
  TimedObstacles m_obstacle;
  OutPort<TimedObstacles> m_obstacleOut;

 private:

};


extern "C"
{
  void Urg_to_ObstaclesInit(RTC::Manager* manager);
};

#endif // URG_TO_OBSTACLES_H

