示例#1
0
from math import *
from task_manager_lib.TaskClient import *

rospy.init_node('task_client')
server_node = rospy.get_param("~server", "/task_server")
default_period = rospy.get_param("~period", 0.2)
tc = TaskClient(server_node, default_period)

tc.WaitForAuto()
try:

    tc.ActionMoveGoal(goal_x=0,
                      goal_y=0,
                      wait_completion=True,
                      base_link="bubbleRob",
                      resend_goal=True,
                      reference_frame="Charger5",
                      dist_threshold=0.3,
                      angle_threshold=10,
                      freq_resend=5.0)
    tc.Wait(duration=10.0)
    tc.ActionMoveGoal(goal_x=0,
                      goal_y=0,
                      wait_completion=True,
                      base_link="bubbleRob",
                      resend_goal=True,
                      reference_frame="Waypoint1",
                      dist_threshold=0.3,
                      angle_threshold=10,
                      freq_resend=5.0)
    tc.Wait(duration=5.0)