def __init__(self):
self.rospack = RosPack()
with open(join(self.rospack.get_path('apex_playground'), 'config', 'general.json')) as f:
self.params = json.load(f)
with open(join(self.rospack.get_path('apex_playground'), 'config', 'torso.json')) as f:
self.torso_params = json.load(f)
self.outside_ros = rospy.get_param('/use_sim_time', False) # True if work manager <-> controller comm must use ZMQ
id = search(r"(\d+)", rospy.get_namespace())
self.worker_id = 0 if id is None else int(id.groups()[0]) # TODO string worker ID
self.work = WorkManager(self.worker_id, self.outside_ros)
self.torso = Torso()
self.ergo = Ergo()
self.learning = Learning()
self.perception = Perception()
self.recorder = Recorder()
self.demonstrate = "" # Skill (Target space for Produce) or empty string if not running assessment
# Served services
self.service_name_demonstrate = "controller/assess"
rospy.Service(self.service_name_demonstrate, Assess, self.cb_assess)
rospy.loginfo('Controller fully started!')
评论列表
文章目录