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)
def hold(self): goal = MoveGoal(move_type='hold') return self._moveto_client.send_goal(goal)
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)
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)