
Public Member Functions | |
| def | __init__ (self) |
| def | computeCorrectiveAcceleration (self, odom, correctiveVelocity) |
| def | computeCorrectiveVelocity (self, odom) |
| def | disable (self, msg=None) |
| def | setTargetPosition (self, targetPosition) |
| def | setTargetVelocity (self, targetVelocity) |
| def | update (self, odom) |
Public Attributes | |
| maxAccel | |
| maxVelocity | |
| positionP | |
| steady | |
| steadyAccelThresh | |
| steadyVelThresh | |
| targetAcceleration | |
| targetPosition | |
| targetVelocity | |
| velocityP | |
Definition at line 86 of file controller.py.
| def controller.CascadedPController.__init__ | ( | self | ) |
Reimplemented in controller.AngularCascadedPController, and controller.LinearCascadedPController.
Definition at line 88 of file controller.py.
| def controller.CascadedPController.computeCorrectiveAcceleration | ( | self, | |
| odom, | |||
| correctiveVelocity | |||
| ) |
Computes a corrective acceleration.
If self.targetVelocity is not None, will return a corrective body-frame acceleration that transitions the robot twoards the desired self.targetVelocity. Otherwise returns 0 vector.
Parameters:
correctiveVelocity (np.array): Body-frame velocity vector that adds on to the self.targetVelocity. Is used in position correction.
odom (Odometry): The latest odometry message
Returns:
np.array: 3 dimensional vector representing corrective body-frame acceleration.
Reimplemented in controller.AngularCascadedPController, and controller.LinearCascadedPController.
Definition at line 117 of file controller.py.
| def controller.CascadedPController.computeCorrectiveVelocity | ( | self, | |
| odom | |||
| ) |
Computes a corrective velocity.
If self.targetPosition is not None, will return a corrective body-frame velocity that moves the robot in the direction of self.targetPosiiton. Otherwise returns 0 vector.
Parameters:
odom (Odometry): The latest odometry message
Returns:
np.array: 3 dimensional vector representing corrective body-frame velocity.
Reimplemented in controller.AngularCascadedPController, and controller.LinearCascadedPController.
Definition at line 101 of file controller.py.
| def controller.CascadedPController.disable | ( | self, | |
msg = None |
|||
| ) |
Disables the controller
Puts the controller in the Disabled state
Definition at line 165 of file controller.py.
| def controller.CascadedPController.setTargetPosition | ( | self, | |
| targetPosition | |||
| ) |
Sets target position
Puts the controller in the Position state and sets self.targetPosition to targetPosition
Parameters:
targetPosition (np.array or Vector3): World-frame vector or quaternion to be achieved by the controller
Definition at line 133 of file controller.py.
| def controller.CascadedPController.setTargetVelocity | ( | self, | |
| targetVelocity | |||
| ) |
Sets target velocity
Puts the controller in the Velocity state and sets self.targetVelocity to targetVelocity
Parameters:
targetVelocity (np.array): Body-frame vector to be achieved by the controller
Definition at line 150 of file controller.py.
| def controller.CascadedPController.update | ( | self, | |
| odom | |||
| ) |
Updates the controller
Will compute an output acceleration to achieve the desired state
Parameters:
odom (Odometry): The latest odometry message
Returns:
np.array: 3 dimensional vector representing net body-frame acceleration.
Definition at line 177 of file controller.py.
| controller.CascadedPController.maxAccel |
Definition at line 95 of file controller.py.
| controller.CascadedPController.maxVelocity |
Definition at line 94 of file controller.py.
| controller.CascadedPController.positionP |
Definition at line 92 of file controller.py.
| controller.CascadedPController.steady |
Definition at line 98 of file controller.py.
| controller.CascadedPController.steadyAccelThresh |
Definition at line 97 of file controller.py.
| controller.CascadedPController.steadyVelThresh |
Definition at line 96 of file controller.py.
| controller.CascadedPController.targetAcceleration |
Definition at line 91 of file controller.py.
| controller.CascadedPController.targetPosition |
Definition at line 89 of file controller.py.
| controller.CascadedPController.targetVelocity |
Definition at line 90 of file controller.py.
| controller.CascadedPController.velocityP |
Definition at line 93 of file controller.py.