18 from uuv_control_interfaces
import DPPIDControllerBase
19 from geometry_msgs.msg
import Wrench, Vector3
24 """MIMO Nonlinear PID controller with acceleration feedback for the dynamic 25 positioning of underwater vehicles. 30 - Fossen, Thor I. Handbook of Marine Craft Hydrodynamics and Motion 31 Control (April 8, 2011). 34 _LABEL =
'MIMO Nonlinear PID Controller with Acceleration Feedback' 37 DPPIDControllerBase.__init__(self,
True)
38 self._logger.info(
'Initializing: ' + self.
_LABEL)
41 if rospy.has_param(
'Hm'):
42 hm = rospy.get_param(
'Hm')
44 self.
_Hm = self._vehicle_model.Mtotal + np.diag(hm)
46 raise rospy.ROSException(
'Invalid feedback acceleration gain coefficients')
54 self._logger.info(self.
_LABEL +
' ready')
66 acc = self._vehicle_model.compute_acc(
67 self._vehicle_model.to_SNAME(self.
_tau), use_sname=
False)
73 self._vehicle_model.restoring_forces
74 self.publish_control_wrench(self.
_tau)
78 if __name__ ==
'__main__':
79 rospy.init_node(
'rov_nl_pid_controller')
84 except rospy.ROSInterruptException:
85 print(
'caught exception')
def update_controller(self)
def _reset_controller(self)