I need to control a PX4 (autonomously) indoors with a companion computer. I will use "external" onboard positioning (simple ultrasound and lidar or the like; a system like Marvelmind, Games On Track, is not an option) handled by the companion computer and eventually additional units like PX4Flow and Lidar-Lite coupled to the PX4. The external sensors are needed although the flow module is used, as I need to react to the environment in an behavior based/subsumption inspired manner.
I see these approaches:
- Attiude control
- HIL_GPS injection and offboard position control
- HIL_GPS injection and offboard velocity control
- Hardware GPS injection
HIL_GPS injection may be exchanged with a flow module connected to the PX4 but I do not consider this as a valid solution as I will be flying above very limited texture like plain concrete floors.
Attitude control are working well but it does not seem feasible to implement an external attitude/altitude controller outside the well functional ones in the PX4. Also it will be quite an effort to reach the stability on e.g. thrust control that are present in the PX4.
On the technical level attitude control is working well and position control seems to do its best effort with limited position data available from the PX4Flow module. This pointed me to testing HIL_GPS as I understand GPS_INPUT is not available.
I have tested HIL_GPS with mavros 0.18.7 on the mavros/fake_gps/fix and this works well besides that I cannot change the origin from ETH Zürich using the /mavros/geo_origin topic. I try to achieve the same behavior with pymavlink without any result yet. I use the same settings as with ROS namely HIL_GPS=1 and EKF2_AID_MASK=0. Pymavlink works will with the PX4 in all other matters. I have sniffed the mavlink messages from pymavlink and ROS and they are identical. Any suggestions on what the problem may be?
I have also tried to use the distance sensor of the PX4Flow module with no results. I have been trying different settings in all the parameters related to the distance sensor I have been able to find based on topics on this site and elsewhere. Can someone point me in the right direction with e.g. a set of parameter settings that should work together?
On a meta level, feel very welcome to comment on the feasibility of the approach.