How steering is accomplished using two t200 thrusters?
Hi @mahmoudf98, welcome to the forums
Not entirely sure what you mean here, could you clarify what you’re trying to do? If you have individual control over two thrusters then as long as they’re not in line with each other you can driving one harder than the other to create a turning force. Are you using your thrusters with an autopilot board, or controlling them directly with buttons or something?
Hello Eliot, thank you for your reply,
I am using it with ROS navigation stack, I receive the desired linear and angular velocity from the ROS.
Then I am able to calculate the desired velocities for the right and left thrusters. Now I want to convert these velocities to a PWM values that the ESC can send to the thrusters, but I don’t know how yet.
Do you have an idea how to accomplish this task?
Thanks in advance!
Thrusters create a force which pushes/pulls in a particular direction. I go into more detail on the force generation in this comment. Depending on the mass and buoyancy distribution relative to the thruster positions that thrust force will have different effects, and there’s also drag from the water involved which depends on the velocity of the object in motion and its aerodynamic properties in that direction. I go into that side of things a bit more in this thread.
In terms of the control you’re trying to exert, you can either have a really accurate mathematical model of all the forces involved (feed-forward control - could calculate expected velocity changes as a result of a given input action), or you can use sensors to determine whether you need more or less thrust on each side (feed-back control), or some combination of the two.
In general, a more accurate model means your control actions can be more precise and correct, so you need less compensation for error, but accurate and fast sensing means a feedback controller can correct for error without needing as accurate of a model, and is also robust to external noise from behaviour that’s difficult or impossible to model. In combination, a decent model means your sensors don’t need to be as accurate or fast to still maintain the control that you want. There’s a compromise to be made between how much detail you can avoid adding to the model, while still having the model be good enough that your sensors and control algorithm give you sufficiently tight control for your operating requirements.
Note that some understanding of the system is at least required to determine physical limits, so I’d recommend at minimum looking at the T200 technical details to see the PWM input limits, and how much thrust you’ll get for a given input PWM signal with your chosen power supply. If you then weigh the object you’re trying to move you can determine the maximum theoretical acceleration given the thrust you’ve got, and if you want you can do tests to determine the maximum velocities you can achieve given the object’s drag characteristics.
For the process of actually controlling it, I’d recommend you look into PID control - it’s super versatile and really widely used, but you can start with just P control for simplicity and build up to the full controller as you need the different components. In your case you’d be using the sensor data you’ve got to measure or estimate the relevant velocities, and the difference between those measured/estimated velocities and your desired velocities is your error, which then forms the control input for your thruster control algorithm, which outputs PWM signals.