For using VIO data from a stereo-vision camera, I have done tranformations within ROS1 where I publish the data, if anyone could possibly check the code I have produced here and let me know of any mistakes or changes that should be made would be great. As I am using the ZED 2i, I had to manually calculate the linear and angular velocities within the code.
For the setting on PX4, I’m using v1.14 on the Pixhawk Cube, for the parameter EKF2_EV_CTRL I have set the number to 13, which is a tick for “Horizonatal Position”, “3D Velocity”, and “Yaw”, is this correct? I did not tick “Vertical Position” as I have a downward facing small FOV LiDAR for absolute height above ground, which works pretty well on its own for keeping absolute height.
I did a test flight with this code with only “Horizontal position” and “Yaw” ticked, and the drone crashed head first to the right into a wall (after a while of flying). Does the “3D velocity” part need to be ticked as well?
Also, how important is the EKF2_EV_DELAY parameter? As I have not set this as I don’t know how to check it (docs don’t help).
The end goal, I just want the drone to maintain a stable position in POSITION flight mode. Followed by issuing commands in OFFBOARD flight mode, code which I already have set up.