PIXhawk communication with Raspberry Pi

Hi all

I have been working on an autonomous drone for a University project. The goal of this project is to produce a drone which can autonomously fly from point a to point b, approximately 4m away. As the project is indoors, GPS is not an option.

I have the drone position calculated from an onboard Raspberry Pi with a camera, tracking fiducials placed on the ground. However, I am having serious issues getting communication working between the flight controller, a pixhawk, and Raspberry Pi Python scripts. The mavlink protocol appears to work, and the raspberry pi is able to receive data from the pixhawk via mavlink. However, I am having no luck in sending actual flight commands from the Raspberry Pi to the pixhawk. Any commands I attempt to send are rejected by the pixhawk, and it seems that the reason for this is the lack of GPS fix. Any suggestions as to the approach I can take to solve this would be much appreciated

what type of mavlink command are you using for copter positioning?

As an another option (not sure if it good or not thought) - if you already know copter’s position then you could generate a fake GPS (NMEA) and feed your FC.
So while LOITER if you move your GPS coordinates then copter will try to compensate that and will be moving.