18 from thruster
import Thruster
22 """This model corresponds to the linear relation between a function 23 abs(command)*command of the command input (usually the command angular 24 velocity) to the thrust force. A constant gain has to be provided. 26 LABEL =
'proportional' 29 super(ThrusterProportional, self).
__init__(*args)
31 if 'gain' not in kwargs:
32 rospy.ROSException(
'Thruster gain not given')
34 rospy.loginfo(
'Thruster model:')
35 rospy.loginfo(
'\tGain=' + str(self.
_gain))
38 return numpy.sign(thrust) * \
39 numpy.sqrt(numpy.abs(thrust) / self.
_gain)
42 """Computes the thrust force for the given command.""" 43 return self.
_gain * numpy.abs(command) * command
def get_command_value(self, thrust)
def __init__(self, args, kwargs)
def get_thrust_value(self, command)