pyrcf.components.agents.planner_controller_agent ================================================ .. py:module:: pyrcf.components.agents.planner_controller_agent Classes ------- .. autoapisummary:: pyrcf.components.agents.planner_controller_agent.PlannerControllerAgent Module Contents --------------- .. py:class:: PlannerControllerAgent(local_planner: pyrcf.components.local_planners.LocalPlannerBase, controller: pyrcf.components.controllers.ControllerBase) Bases: :py:obj:`pyrcf.components.agents.agent_base.AgentBase` A simple implementation of Agent using a local planner object and controller. This agent simply calls the local planner update and controller update steps in sequence. .. py:attribute:: local_planner .. py:attribute:: controller .. py:attribute:: _latest_local_plan :value: None .. py:attribute:: _latest_ctrl_cmd :value: None .. py:method:: get_action(robot_state: pyrcf.core.types.RobotState, global_plan: pyrcf.core.types.GlobalMotionPlan, t: float = None, dt: float = None) -> pyrcf.core.types.RobotCmd Compute the control command to be executed given the current state and the global plan. :param robot_state: Current robot state. This is equivalent to 'observation' in standard learning-based agents. :type robot_state: RobotState :param global_plan: The reference global plan to follow. :type global_plan: GlobalMotionPlan :param t: the current time signature of the control loop. Defaults to None (controllers may or may not need this). :type t: float, optional :param dt: the time since the last control loop. Defaults to None (controllers may or may not need this). :type dt: float, optional :returns: The output control command (action) to be sent to the robot. :rtype: RobotCmd :raises NotImplementedError: Raised if this method is not implemented by the child class. .. py:method:: get_latest_local_plan() -> pyrcf.core.types.LocalMotionPlan .. py:method:: get_latest_ctrl_cmd() -> pyrcf.core.types.RobotCmd .. py:method:: get_last_output() -> Tuple[pyrcf.core.types.LocalMotionPlan, pyrcf.core.types.RobotCmd] Should return the last computed outputs by this agent. :returns: Output local plan and control command from this agent. NOTE: Either of these can be None, if the agent does not compute them. :rtype: Tuple[LocalMotionPlan, RobotCmd] .. py:method:: shutdown() Cleanly shutdown the PyRCF component. Override in child class if required. The base class implements an empty function. .. py:method:: get_class_info() -> str Override with custom string if needed.