![]() |
ME 305 Group 6 Documentation
|
Sets up and calls the closed loop controller class. More...
Functions | |
| def | taskAngleController.taskAngleControllerFcn (str taskName, int period, shares.Share roll_target_pos, shares.Share pitch_target_pos, shares.Share x_position_signal, shares.Share x_pos_deriv_signal, shares.Share x_target_position, shares.Share x_pos_deriv_target, shares.Share y_position_signal, shares.Share y_pos_deriv_signal, shares.Share y_target_position, shares.Share y_pos_deriv_target, shares.Share positionx_prop_gain, shares.Share positionx_deriv_gain, shares.Share positionx_int_gain, shares.Share cont_enable, shares.Share ball_detected, PrintQueue print_queue, shares.Share positiony_prop_gain, shares.Share positiony_deriv_gain, shares.Share positiony_int_gain, shares.Share controller_signalsx, shares.Share controller_signalsy) |
| Sets up and calls the closed loop controller class. More... | |
Sets up and calls the closed loop controller class.
Configures a PID controller object and continuously updates the controller output value which represents the desired angle of the platform. This functions as the outer loop of the control system.
| def taskAngleController.taskAngleControllerFcn | ( | str | taskName, |
| int | period, | ||
| shares.Share | roll_target_pos, | ||
| shares.Share | pitch_target_pos, | ||
| shares.Share | x_position_signal, | ||
| shares.Share | x_pos_deriv_signal, | ||
| shares.Share | x_target_position, | ||
| shares.Share | x_pos_deriv_target, | ||
| shares.Share | y_position_signal, | ||
| shares.Share | y_pos_deriv_signal, | ||
| shares.Share | y_target_position, | ||
| shares.Share | y_pos_deriv_target, | ||
| shares.Share | positionx_prop_gain, | ||
| shares.Share | positionx_deriv_gain, | ||
| shares.Share | positionx_int_gain, | ||
| shares.Share | cont_enable, | ||
| shares.Share | ball_detected, | ||
| PrintQueue | print_queue, | ||
| shares.Share | positiony_prop_gain, | ||
| shares.Share | positiony_deriv_gain, | ||
| shares.Share | positiony_int_gain, | ||
| shares.Share | controller_signalsx, | ||
| shares.Share | controller_signalsy | ||
| ) |
Sets up and calls the closed loop controller class.
Every period, this task resets the Kp using set_Kp and updates the controller. Saturation limits are set to 100 and -100.
| taskName | Task name label for debugging purposes. |
| period | Period to run taskControllerFcn |
| roll_target_pos | Shared variable to pass out the desired platform roll angle. |
| pitch_target_pos | Shared variable to pass out the desired platform pitch angle. |
| x_position_signal | Shared variable to pass in the current X position of the ball. |
| x_pos_deriv_signal | Shared variable to pass in the current X velocity of the ball. |
| x_target_position | Shared variable to pass in the desired X position of the ball. |
| x_pos_deriv_target | Shared variable to pass in the desired X velocity of the ball. |
| y_position_signal | Shared variable to pass in the current Y position of the ball. |
| y_pos_deriv_signal | Shared variable to pass in the current Y velocity of the ball. |
| y_target_position | Shared variable to pass in the desired Y position of the ball. |
| y_pos_deriv_target | Shared variable to pass in the desired Y velocity of the ball. |
| positionx_prop_gain | Shared variable to pass in Kp for the X direction. |
| positionx_deriv_gain | Shared variable to pass in Kd for the X direction. |
| positionx_int_gain | Shared variable to pass in Ki for the X direction. |
| cont_enable | Shared variable to store a boolean whether to enable or disable the controller. |
| ball_detected | Shared variable to store a boolean to indicate if the ball is on the platform. |
| print_queue | Print queue object for handling print statements. |
| positiony_prop_gain | Shared variable to pass in Kp for the Y direction. |
| positiony_deriv_gain | Shared variable to pass in Kd for the Y direction. |
| positiony_int_gain | Shared variable to pass in Ki for the Y direction. |
| controller_signalsx | Shared variable to pass in the X controller gains as a single object. |
| controller_signalsy | Shared variable to pass in the Y controller gains as a single object. |