def get_data(self): """ Request for the most recent value for data/sensor readings. Returns entire sample report (all available data) in sample. """ request = DataRequest() request.id = self._get_next_seq_id() request.arm = TRIAL_ARM request.stamp = rospy.get_rostime() result_msg = self._data_service.publish_and_wait(request) # TODO - Make IDs match, assert that they match elsewhere here. sample = msg_to_sample(result_msg, self) return sample
def get_data(self, arm=TRIAL_ARM): """ Request for the most recent value for data/sensor readings. Returns entire sample report (all available data) in sample. Args: arm: TRIAL_ARM or AUXILIARY_ARM. """ request = DataRequest() request.id = self._get_next_seq_id() request.arm = arm request.stamp = rospy.get_rostime() result_msg = self._data_service.publish_and_wait(request) # TODO - Make IDs match, assert that they match elsewhere here. sample = msg_to_sample(result_msg, self) return sample