Go to the documentation of this file.00001
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
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:
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:
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
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
00024
00025
00026
00027
00028
00029
00030
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])