예제 #1
0
    def go_to_relative(
            self,
            xyt_position,
            use_map=False,
            close_loop=True,
            smooth=False):
        """
        Moves the robot to the robot to given goal state
        relative to its initial pose.

        :param xyt_position: The  relative goal state of the form (x,y,t)
        :param use_map: When set to "True", ensures that controler is
                        using only free space on the map to move the robot.
        :param close_loop: When set to "True", ensures that controler is
                           operating in open loop by taking
                           account of odometry.
        :param smooth: When set to "True", ensures that the
                       motion leading to the goal is a smooth one.

        :type xyt_position: list or np.ndarray
        :type use_map: bool
        :type close_loop: bool
        :type smooth: bool
        """
        start_pos = self.base_state.state.state_f.copy()
        goal_pos = _get_absolute_pose(xyt_position, start_pos.ravel())
        self.go_to_absolute(goal_pos, use_map, close_loop, smooth)
예제 #2
0
 def go_to_relative(self, xyt_position, close_loop=True, smooth=True):
     """
     Relative pose that the robot should go to.
     """
     start_pos = self.state.state_f.copy()
     goal_pos = _get_absolute_pose(xyt_position, start_pos.ravel())
     return self.go_to_absolute(goal_pos, close_loop, smooth)