コード例 #1
0
    def as_MoveGoal(self, move_type=MoveGoal.DRIVE, **kwargs):
        if 'focus' in kwargs:
            if not isinstance(kwargs['focus'], Point):
                kwargs['focus'] = mil_tools.numpy_to_point(kwargs['focus'])

        if 'speed_factor' in kwargs and isinstance(kwargs['speed_factor'],
                                                   float):
            # User wants a uniform speed factor
            sf = kwargs['speed_factor']
            kwargs['speed_factor'] = [sf, sf, sf]

        for key in kwargs.keys():
            if not hasattr(MoveGoal, key):
                fprint(
                    "MoveGoal msg doesn't have a field called '{}' you tried to set via kwargs."
                    .format(key),
                    title="POSE_EDITOR",
                    msg_color="red")
                del kwargs[key]

        return MoveGoal(goal=self.as_Pose(), move_type=move_type, **kwargs)
コード例 #2
0
 def hold(self):
     goal = MoveGoal(move_type='hold')
     return self._moveto_client.send_goal(goal)
コード例 #3
0
ファイル: station_hold.py プロジェクト: steven1003/NaviGator
 def raised(self, alarm):
     rospy.loginfo("Attempting to station hold")
     station_hold_goal = MoveGoal()
     station_hold_goal.move_type = 'hold'
     self.move_client.send_goal(station_hold_goal, done_cb=self._client_cb)
コード例 #4
0
ファイル: station_hold.py プロジェクト: jnez71/Navigator
 def raised(self, alarm):
     rospy.loginfo("Attempting to station hold")
     station_hold_goal = MoveGoal()
     station_hold_goal.move_type = 'hold'
     self.move_client.send_goal(station_hold_goal, done_cb=self._client_cb)