pyrcf.components.controllers.joint_pd_controller ================================================ .. py:module:: pyrcf.components.controllers.joint_pd_controller Classes ------- .. autoapisummary:: pyrcf.components.controllers.joint_pd_controller.JointPDController Module Contents --------------- .. py:class:: JointPDController(kp: numpy.ndarray | float, kd: numpy.ndarray | float, hold_position_at_start: bool = True, gain_ramp_up_time: float = 0.0, ramp_start_kp: numpy.ndarray | float = 0.0, ramp_start_kd: numpy.ndarray | float = 0.0) Bases: :py:obj:`pyrcf.components.controllers.controller_base.ControllerBase` Tracks joint position and velocity reference provided in `local_plan` message directly. .. py:attribute:: _target_kp .. py:attribute:: _target_kd .. py:attribute:: _hold_position .. py:attribute:: _ramp_duration .. py:attribute:: _ramp_start_kp .. py:attribute:: _ramp_start_kd .. py:attribute:: _on_ramp_target .. py:attribute:: _ramp_factor :value: 1.0 .. py:attribute:: _duration_in_ctrl_mode :value: 0.0 .. py:attribute:: _ramping_complete :value: False .. py:attribute:: _robot_cmd :type: pyrcf.core.types.RobotCmd :value: None .. py:method:: update(robot_state: pyrcf.core.types.RobotState, local_plan: pyrcf.core.types.LocalMotionPlan, t: float = None, dt: float = None) -> pyrcf.core.types.RobotCmd The main control update method to be called in the loop. This method will be called after the global plan and local plan are generated in the loop. This method should be implemented by any controller implementation. :param robot_state: The current state information from the robot. :type robot_state: RobotState :param local_plan: the latest local plan generated by the local planner used in the loop. :type local_plan: LocalMotionPlan :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 :raises NotImplementedError: Raised if this method is not implemented by the child class. :returns: The output control command to be sent to the robot. :rtype: RobotCmd