def execute(self, userdata): rospy.loginfo("Waiting for aligned_driving action server...") self.align_client.wait_for_server() goal = AlignedDrivingGoal() goal.front_distance = 0.02 #goal.tolerance = 0.008 goal.side_difference = 0.0 rospy.loginfo("Sending aligned_driving goal...") self.align_client.send_goal(goal) rospy.loginfo("Waiting for aligned_driving to finish...") self.align_client.wait_for_result(rospy.Duration.from_sec(0.0)) return 'done'
def __move_base(self, al, counter): coords = al[counter] #goal = AlignedDrivingGoal() #goal.front_distance = 0.05 #goal.tolerance = 0.008 #goal.side_difference = coords[1] #self.align_client.send_goal(goal) #self.align_client.wait_for_result(rospy.Duration.from_sec(0.0)) if coords[1] > 0.0: msg_vel = Twist() msg_vel.linear.y += coords[1] global_data.pubVel.publish(msg_vel) sleep(3) global_data.pubVel.publish(Twist()) goal = AlignedDrivingGoal() goal.front_distance = 0.05 goal.tolerance = 0.008 goal.side_difference = 0.0 self.align_client.send_goal(goal) self.align_client.wait_for_result(rospy.Duration.from_sec(0.0))