I wonder if I should write my own controller or extend the currently available controller modules.
I’m trying to set up a USV (Unmanned Sufrace Vehicle) with OmniX frame in PX4.
I was able to set it up in Gazebo, only to find out that available controllers don’t work well, or behave in strange ways. This is what I found out:
rover_pos_control – is able to drive differential drivers like the RoboX model with two motors. It behaves like a fixed-wing aircraft in the way it takes turns. Maybe because it extends fw controllers.
uuv_att_control & uuv_pos_control – I’m not sure if I’m doing something wrong with my setup. Maybe some sort of regression was introduced with the new dynamic mixing system? They do not support all flight modes and I found simulating them troublesome.
What I want to achieve is functionality similar to what ArduRover supports. Which should be possible with recent developments with the new dynamic mixing system. I have seen the omnicopter demo, which shows that driving a 6DOF frame is possible. 6DOF is even defined in airframe reference. As I understand, my case would drop 2 degrees and I would end up with a 4DOF Omni-directional frame.
I also won’t hide the fact, that this is motivated by the RoboBoat competition that will take place in two months. We have settled on the OmniX design, but ArduPilot SITL happened to be in a strange place when it comes to ROS Ubuntu and Gazebo version compatibility.
Not much implemented yet. Just got this module running in SITL. I would be happy if you could pick apart these requirements, as I may not know everything about PX4. One thing I know is to really split those controllers by pos and att. I could use the rover position controller if it wouldn’t be so tightly coupled.
Control allocation works quite well. It looks like the attitude controller was quite simple to modify based on uuv_att_control.
For the position controller, I’m looking at PositionControl in mc_pos_control. Maybe I could reuse a lot of math here, and get rid of take-off logic?
We have created an Engineering Model with the desired motor configuration. Real-life tests showed behaviors not present in SITL. I’m unsure if this is related to the usv_att_control that I’m writing, a bug in PX4/QGC, or misconfiguration.
Joystick control configuration
When using a joystick with Full down stick is zero throttle I’m unable to arm, because of the “high throttle” error. If I change it to Center stick is zero throttle, then I’m unable to arm, but immediately the drone starts to put half of the throttle on all motors!. This is a no-go, we can’t go on the water with such a problem.
When manual control is lost switches mode to “Return”
When the joystick becomes disconnected for any reason, it switches to “Land/Return” mode putting a full-throttle on the motors. This is unacceptable, I would prefer for it to become disarmed, as there is no reason for it to land. It should.
I will report more after Monday. As we have arranged the model pool.