Omni Boat: Maintain Position with Translational Motion and Orientation with Yaw

Hi! I’m new to the forum, and my question is similar to some existing questions about ArduBoat loiter mode, but different enough that I’m going to ask it despite the existing threads.

I’ve set up an ArduRover ArduBoat using a Pixhawk 6c and four blue robotics thrusters. It’s configured as an omni frame boat with 45-degree vectored thrusters, and I’m hoping to implement behavior that seems like a variant of the existing loiter mode. I would like to use translational motion to maintain position while adjusting yaw to maintain an absolute cardinal orientation. The boat should physically be able to accomplish this with the motor configuration used, and I can achieve the behavior I’m seeking with manual control. Configuring the autopilot to prioritize this behavior, however, has proved challenging.

With a frame that supports it, is there a mode or setting that will allow me to prioritize translational motion, or that will allow me to adjust position and orientation separately. Is it possible to achieve this behavior using ArduPilot without customization?

I think it could be achieved with Lua scripting and guided mode, though I’m afraid that any significant translational motion may result in yaw toward the desired loiter location. Worth a go in SITL to see how a boat model responds to velocity (vector based) or geo-referenced positioning.

Perhaps also, loiter mode with a little scripting on top to maintain a specific heading could be accomplished with a little testing and effort. Again, there may be a tendency to yaw toward the loiter location.

It would be entirely possible to create a script (or added mode) that purely controls all outputs, but that would almost certainly require that you write a PID controller within the script (or added mode if you so chose that route).

I’m not aware of an existing mode that does exactly what you want in the Rover firmware.

Thank you, I think you’re probably correct that a Lua script or new mode will be required. I will try to write a Lua script for this in the near future, but first I will need to bring myself up to speed on how to do so.