25 AutoControl_spec = [
"implementation_id",
"AutoControl",
26 "type_name",
"AutoControl",
27 "description",
"Auto controller component for MobileRobot",
30 "category",
"example",
31 "activity_type",
"DataFlowComponent",
34 "lang_type",
"SCRIPT",
35 "conf.default.velocity",
"80.0",
36 "conf.default.turn_velocity",
"80.0",
37 "conf.default.distance_to_env",
"40.0",
43 OpenRTM_aist.DataFlowComponentBase.__init__(self, manager)
59 self.
_d_sens = RTC.TimedFloatSeq(RTC.Time(0,0),[])
61 self.
_d_vel = RTC.TimedFloatSeq(RTC.Time(0,0),[])
75 self._d_vel.data = [0.0, 0.0]
80 self._d_vel.data = [0.0, 0.0]
85 if self._sensIn.isNew():
86 self.
_d_sens = self._sensIn.read()
87 self._d_vel.data = self.
calcVel()
102 return [self.
_velocity[0]
for i
in range(2)]
104 return [0.0
for i
in range(2)]
110 manager.registerFactory(profile,
118 comp = manager.createComponent(
"AutoControl")
123 mgr = OpenRTM_aist.Manager.init(sys.argv)
124 mgr.setModuleInitProc(MyModuleInit)
125 mgr.activateManager()
128 if __name__ ==
"__main__":
def onActivated(self, ec_id)
def onDeactivated(self, ec_id)
def bindParameter(self, param_name, var, def_val, trans=None)
template <typename vartype>=""> bool bindParameter(const char* param_name, VarType& var...
The Properties class represents a persistent set of properties.
def __init__(self, manager)
def MyModuleInit(manager)
def AutoControlInit(manager)
def onExecute(self, ec_id)
def addOutPort(self, name, outport)
def addInPort(self, name, inport)
DataFlowComponentBase class.