How do i send Position data from RPi to Pixhawk?

My current setup requires the software to use the position estimate calculated on my RPi and not the GPS. I have read the documentation for external position estimate and external navigation, but despite setting the right parameters, I get ekf flag 0x00a7. Currently I am testing it on ArduCopter SITL. Can anyone guide me on what I might be missing? Here are the parameters I have set-

“EK3_ENABLE”: 1,

“EK3_SRC1_POSXY”: 6,

“EK3_SRC1_VELXY”: 6,

“EK3_SRC1_VELZ”: 6,

“EK3_SRC1_POSZ”: 1,

“EK3_SRC1_YAW”: 1,

Hi @Preetham,

I’m sure you’ve seen this wiki page but just in case, it has the details for the ODOMETRY message which is one of the best to use. Alternatively the VISION_POSITION_ESTIMATE and optionally VISION_SPEED_ESTIMATE can be used. One of these messages needs to be sent to the autopilot at 5hz or higher.

Also you’ve set the EKF origin somehow?

yes, i have read that page, and I am currently sending through the Odometry message. I have also tried the vision_position_estimate. After trying a couple of different changes, i do get ekf_ok as True, but the local frame coordinates are not the same as the one I am sending. Is there any implementation of this which I can refer?

Hi @Preetham,

It sounds like the issue is on the companion computer side rather than AP so I think you’ll need to give a lot more information to get a useful response. For example, you haven’t specified what the frame is of the system you’re sending from.

If you’re using ROS or ROS2 then it’s probably best to ask one of the ROS experts (@snktshrma, @rhys and @Ryan_Friedman). Maybe ask in the Discord ROS channel.