-
Notifications
You must be signed in to change notification settings - Fork 1
Control
Control of the vehicle is achieved through a combination of Proportional Integral Derivative(PID) controllers. The autonomous operation of the AUV is brought about using set-point directives to the PID control loops. Pose and Depth of the vehicle is determined from the inbound IMU and the Pressure Sensor Data. Each PID controller maintains the pose and the depth of the vehicle using setpoint directives from the High-Level Software which includes GUI while testing and Mission PLanner while autonomous.
- /thruster This package publishes processed thruster PWM values ranging from 1100 to 1900 on the topic /thruster which is subscribed in the microcontrollers controlling the thruster servos.
- /imu/HeadingTrue_degree (Published by SpartonCompassIMU):
- To control the heading and pose of the vehicle.
- Callback Function: Updates the variable heading_value to maintain the heading or to reach a heading goal.
- /pressure (Published by Pressure Sensor):
- To control the depth of the vehicle.
- Callback Function: Updates the variable pressure_value to maintain the depth or to reach a depth goal.
- /offsetData (Published by Image Processing Scripts)
- It feeds the controller, goals, to reach a particular heading or depth(pressure) according to the target detected in image processing scripts.
- Callback Function: Receives offset data from image processing scripts.
- /pressurePIDdata and /headingPIDdata (Published By Mission Planner, GUI)
- PID Gain constants may vary in different conditions making them dynamic variables, so while testing we feed PID constants from GUI and while autonomous operations we feed PID constants from Mission Planner.
- Corresponding callback- Updates the PID Gain Constans for heading and depth. (hKp,hKi,hKd and pKp,pKi,pKd).
Function maintains the heading of the vehicle, updates the heading thorugh PID controller when new goal is arrived and publishes the updated thruster values accordingly.
thruster.speeddir1 = 1500 - tVal;
thruster.speeddir2 = 1500 - tVal;
Function maintains the depth of the vehicle, updates the depth through PID Controller when new goal is arrived and publishes the updated thruster values accordingly.
thruster.speedup1 = 1500 - tVal;
thruster.speedup2 = 1500 - tVal;
thruster.speedup3 = 1500 - tVal;
thruster.speedup4 = 1500 - tVal;