-
Notifications
You must be signed in to change notification settings - Fork 5
3.2 Controls
The control system is tasked with listening to desired setpoint commands from the planner and continually producing an effort (force/torque) that is deemed most likely to guide the AUV towards the desired setpoint.
The controls package has 2 modes of operation: State mode and Superimposer mode. In either case, the control system runs an action server that listens to commands from an action client in the planner package. When the server receives a command, it is processed depending on the mode of operation.
When in state mode the control systems has 3 layers:
- State Server: The state server listens to state goals from the planner. State goals contain 4 optional degrees of freedom: x,y,z, and orientation. They are optional in the sense that not all DOFs need to be enabled. If a DOF is not enabled, then the control system makes no effort to adjust the AUV's pose in that DOF. For example, if the state server receives a state goal that only specifies a z position, the AUV will descend or ascend to the corresponding depth while not controlling its x and y position or orientation. After receiving a goal, the state server publishes setpoints to the PID nodes. It monitors the progress of the goal and informs the planner when the goal pose has been achieved and maintained for a certain period of time.
- PID nodes: Specifics about PID and quaternions are covered later in this wiki page. There are 4 PID nodes: x,y,z and quaternion (orientation). Each PID only cares about its corresponding degree of freedom. The x,y,z PID nodes publish the topics global_x, global_y, and global_z respectively. These topics are a desired force to be exerted by the thrusters in the global coordinate frame. Of course, the effort published by controls is body framed not global framed. This will be taken care of in superimposer. The quaternion PID node is responsible for running PID controls on the AUV's rotation. Unlike the x,y,z PID nodes, the quaternion PID node outputs three topics, roll, pitch, yaw. These topics are the x,y,z components of the desired torque.
- Superimposer: Superimposer subscribes to the global_x, global_y, global_z, roll, pitch, yaw topics and combines them into a single effort wrench. The global x,y,z forces are combined into a single global force vector and rotated to find the desired linear force within the AUV's body frame. This makes up the force component of the wrench. The torque component of the wrench is just the roll, pitch, yaw values. No transformation is necessary for the torques.
When in superimposer mode the controls package has 2 layers:
- Superimposer Server: The superimposer server is an action server that listens to superimposer goals from the planner package. A superimposer goal consists of 6 optional effort components: force x,y,z and torque x,y,z. If a given degree of freedom is specified, then that value is passed to superimposer to put into the effort. For the force x,y,z DOFs, the topics are surge, sway, heave. The forces are body framed. For the torque x,y,z DOFs, the topics are roll, pitch, yaw.
- Superimposer: Superimposer subscribes to the surge, sway, heave, roll, pitch, yaw topics and combines them into a single effort vector.
Note that these modes of operation are not mutually exclusive and can be used at the same time. For example, you can use the state server to fix the AUV's orientation while using the superimposer server to apply a constant surge force.
Interacting with the controls package should be done with a action client in the planner. The planner has a Controller class that provides abstractions for all control actions. The class can be found in controller.py. In a missions plan, instantiate a controller object from controller.py and use its method to control the AUV.
Description of what this node does.
Description of what this node does.
List and describe any important ROS launch files provided by the package. Explain what each launch file is responsible for and how to use them.
If your package has configurable parameters, explain how to configure them. This could involve editing configuration files or using ROS parameter tools.