You can have a look at our implementation and at the code. We use a different tracking solution, but the architecture is very similar. You should use EKF2 now as it is the supported pose estimator. In my experience, LPE had issues with timeouts.
I strongly recommend that you install mavproxy.py or mavlink router on the companion computer. This will allow multiple sources of data to communicate with the Pixhawk, including QGC. In our implementation, QGC connects automatically to the drone over wifi. This is because mavproxy is automatically launched on the companion computer and it acts as a multiplexer of QGC, pose data and control script mavlink messages. QGC is very helpful as it allows you to check that the data is correctly received, especially during development. In QgroundControl, go in Widget>Analyze. You will see many, many state messages (roll, battery status...). If everything is set up correctly, you will see VISION_XXX messages from your motion capture system. The data of those messages should be very close to the state estimator messages. You need to change PX4 parameters on the drone as explained in the README of the gitlab repo linked above.
Do you need ROS for your test? It is absolutely possible to use ROS, but you may also find that using a forward script on the drone and Dronecode SDK is easier, as we do in our implementation.
I hope our code can be of some use! We had to implement a lot of checks, and getting everything right usually takes months of work. You might find that the shell scripts (part 1 and part 2) that builds the environment on our companion computer are especially useful. You don't need everything in there: for example, the code for the small OLED screen is only for convenience, as it just displays information on the drone (IP address, tracking status ...). However, many small steps took us weeks to figure out and debug. Since we are developing an open platform, we are always looking for merge requests and suggestions, so if you use our code and find improvements, don't hesitate to let us know! Let me know if you have other questions.