OccupancyGridMap3D.h
Go to the documentation of this file.
1 // -*- C++ -*-
10 #ifndef NULL_COMPONENT_H
11 #define NULL_COMPONENT_H
12 
13 #include <rtm/idl/BasicDataType.hh>
14 #include <rtm/idl/InterfaceDataTypes.hh>
15 #include "hrpsys/idl/pointcloud.hh"
16 #include <rtm/Manager.h>
17 #include <rtm/DataFlowComponentBase.h>
18 #include <rtm/CorbaPort.h>
19 #include <rtm/DataInPort.h>
20 #include <rtm/DataOutPort.h>
21 #include <rtm/idl/BasicDataTypeSkel.h>
22 
23 namespace octomap{
24  class OcTree;
25 };
26 
27 
28 // Service implementation headers
29 // <rtc-template block="service_impl_h">
30 
31 // </rtc-template>
32 
33 // Service Consumer stub headers
34 // <rtc-template block="consumer_stub_h">
35 
36 // </rtc-template>
37 
38 #include "OGMap3DService_impl.h"
39 
40 using namespace RTC;
41 
47 {
48  public:
57  virtual ~OccupancyGridMap3D();
58 
59  // The initialize action (on CREATED->ALIVE transition)
60  // formaer rtc_init_entry()
61  virtual RTC::ReturnCode_t onInitialize();
62 
63  // The finalize action (on ALIVE->END transition)
64  // formaer rtc_exiting_entry()
65  // virtual RTC::ReturnCode_t onFinalize();
66 
67  // The startup action when ExecutionContext startup
68  // former rtc_starting_entry()
69  // virtual RTC::ReturnCode_t onStartup(RTC::UniqueId ec_id);
70 
71  // The shutdown action when ExecutionContext stop
72  // former rtc_stopping_entry()
73  // virtual RTC::ReturnCode_t onShutdown(RTC::UniqueId ec_id);
74 
75  // The activated action (Active state entry action)
76  // former rtc_active_entry()
77  virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id);
78 
79  // The deactivated action (Active state exit action)
80  // former rtc_active_exit()
81  virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id);
82 
83  // The execution action that is invoked periodically
84  // former rtc_active_do()
85  virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id);
86 
87  // The aborting action when main logic error occurred.
88  // former rtc_aborting_entry()
89  // virtual RTC::ReturnCode_t onAborting(RTC::UniqueId ec_id);
90 
91  // The error action in ERROR state
92  // former rtc_error_do()
93  // virtual RTC::ReturnCode_t onError(RTC::UniqueId ec_id);
94 
95  // The reset action that is invoked resetting
96  // This is same but different the former rtc_init_entry()
97  // virtual RTC::ReturnCode_t onReset(RTC::UniqueId ec_id);
98 
99  // The state update action that is invoked after onExecute() action
100  // no corresponding operation exists in OpenRTm-aist-0.2.0
101  // virtual RTC::ReturnCode_t onStateUpdate(RTC::UniqueId ec_id);
102 
103  // The action that is invoked when execution context's rate is changed
104  // no corresponding operation exists in OpenRTm-aist-0.2.0
105  // virtual RTC::ReturnCode_t onRateChanged(RTC::UniqueId ec_id);
106 
107  OpenHRP::OGMap3D* getOGMap3D(const OpenHRP::AABB& region);
108  void save(const char *filename);
109  void clear();
110 
111  protected:
112  // Configuration variable declaration
113  // <rtc-template block="config_declare">
114 
115  // </rtc-template>
116 
117  PointCloudTypes::PointCloud m_cloud;
118  TimedPose3D m_pose;
119  TimedPoint3D m_sensorPos;
120  TimedLong m_update;
121  RangeData m_range;
122 
123  // DataInPort declaration
124  // <rtc-template block="inport_declare">
130 
131  // </rtc-template>
132 
133  TimedLong m_updateSignal;
134 
135  // DataOutPort declaration
136  // <rtc-template block="outport_declare">
138 
139  // </rtc-template>
140 
141  // CORBA Port declaration
142  // <rtc-template block="corbaport_declare">
144 
145  // </rtc-template>
146 
147  // Service declaration
148  // <rtc-template block="service_declare">
150 
151  // </rtc-template>
152 
153  // Consumer declaration
154  // <rtc-template block="consumer_declare">
155 
156  // </rtc-template>
157 
158  private:
159  octomap::OcTree *m_map, *m_knownMap;
160  double m_occupiedThd, m_resolution;
161  std::string m_initialMap;
162  std::string m_knownMapPath;
163  std::string m_cwd;
166  int dummy;
167 };
168 
169 
170 extern "C"
171 {
173 };
174 
175 #endif // NULL_COMPONENT_H
ec_id
void save(int w, int h, const char *i_fname)
PointCloudTypes::PointCloud m_cloud
char * filename
void clear(CorbaSequence &seq)
RTC::CorbaPort m_OGMap3DServicePort
void OccupancyGridMap3DInit(RTC::Manager *manager)
manager
octomap::OcTree * m_map
sample RT component which has one data input port and one data output port
InPort< TimedLong > m_updateIn
ExecutionContextHandle_t UniqueId
InPort< RangeData > m_rangeIn
OutPort< TimedLong > m_updateOut
InPort< TimedPose3D > m_poseIn
InPort< PointCloudTypes::PointCloud > m_cloudIn
InPort< TimedPoint3D > m_sensorPosIn
OGMap3DService_impl m_service0


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Thu May 6 2021 02:41:50