hrpsys.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 import roslib;
00003 import sys; sys.path.insert (0, roslib.packages.get_pkg_dir('hrpsys')+'/scripts');
00004 from hrpsys import *
00005 
00006 class ATLASHrpsysConfigurator(HrpsysConfigurator):
00007     def connectComps(self):
00008         HrpsysConfigurator.connectComps(self)
00009         # connect for kf rtc dummy rpy
00010         s_acc=filter(lambda s : s.type == 'Acceleration', self.getSensors(self.url))
00011         if (len(s_acc)>0) and self.rh.port(s_acc[0].name) != None: # check existence of sensor ;; currently original HRP4C.xml has different naming rule of gsensor and gyrometer
00012             disconnectPorts(self.rh.port(s_acc[0].name), self.kf.port('acc'))
00013         s_rate=filter(lambda s : s.type == 'RateGyro', self.getSensors(self.url))
00014         if (len(s_rate)>0) and self.rh.port(s_rate[0].name) != None: # check existence of sensor ;; currently original HRP4C.xml has different naming rule of gsensor and gyrometer
00015             disconnectPorts(self.rh.port(s_rate[0].name), self.kf.port("rate"))
00016             connectPorts(self.rh.port(s_rate[0].name), self.kf.port("rpyIn"))
00017         # delete co
00018         disconnectPorts(self.rh.port("q"), self.co.port("qCurrent"))
00019         disconnectPorts(self.st.port("q"), self.co.port("qRef"))
00020         disconnectPorts(self.co.port("q"), self.el.port("qRef"))
00021         connectPorts(self.st.port("q"), self.el.port("qRef"))
00022 
00023 #    # delete co
00024 #    def getRTCList(self):
00025 #        return [self.rh, self.seq, self.sh, self.tf, self.kf, self.vs, self.ic, self.abc, self.st, self.el, self.log]
00026 
00027 #    def activateComps(self):
00028 #        HrpsysConfigurator.activateComps(self)
00029 #        # stop co
00030 #        self.co.stop()
00031 
00032     def init(self, robotname="Robot", url=""):
00033         HrpsysConfigurator.init(self, robotname, url)
00034 
00035 if __name__ == '__main__':
00036     shcf=ATLASHrpsysConfigurator()
00037     shcf.init(sys.argv[1], sys.argv[2])
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends Defines


hrpsys_gazebo
Author(s): Yohei Kakiuchi
autogenerated on Thu Jun 27 2013 14:58:14