Skip to content

Control

Pushkal Katara edited this page Feb 2, 2018 · 4 revisions

Package 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.

Publisher

  1. /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.

Subscribers

  1. /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.
  1. /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.
  1. /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.
  1. /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).

HeadingController()

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;

PressureController()

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;
Clone this wiki locally