17 from thruster
import Thruster
21 """This model corresponds to the linear relation between a function 22 abs(command)*command of the command input (usually the command angular 23 velocity) to the thrust force. A constant gain has to be provided. 28 * `index` (*type:* `int`): Thruster's ID. 29 * `topic` (*type:* `str`): Thruster's command topic. 30 * `pos` (*type:* `numpy.array` or `list`): Position vector 31 of the thruster with respect to the vehicle's frame. 32 * `orientation` (*type:* `numpy.array` or `list`): Quaternion 33 with the orientation of the thruster with respect to the vehicle's 34 frame as `(qx, qy, qz, qw)`. 35 * `axis` (*type:* `numpy.array`): Axis of rotation of the thruster. 36 * `gain` (*type:* `float`): Constant gain. 38 LABEL =
'proportional' 41 super(ThrusterProportional, self).
__init__(*args)
43 if 'gain' not in kwargs:
44 rospy.ROSException(
'Thruster gain not given')
46 rospy.loginfo(
'Thruster model:')
47 rospy.loginfo(
'\tGain=' + str(self.
_gain))
50 """Compute the angular velocity necessary 51 for the desired thrust force. 55 * `thrust` (*type:* `float`): Thrust force magnitude in N 59 `float`: Angular velocity set-point for the thruster in rad/s 61 return numpy.sign(thrust) * \
62 numpy.sqrt(numpy.abs(thrust) / self.
_gain)
65 """Computes the thrust force for the given angular velocity 70 * `command` (*type:* `float`): Angular velocity set-point for 75 `thrust` (*type:* `float`): Thrust force magnitude in N 77 return self.
_gain * numpy.abs(command) * command
def get_command_value(self, thrust)
def __init__(self, args, kwargs)
def get_thrust_value(self, command)