However, when I try to run the MAVROS node, it prompts with the following :
[ INFO] [1720100062.545421418, 153.670000000]: HP: requesting home position
[ WARN] [1720100100.352328823, 163.197000000]: CMD: Unexpected command 410, result 4
I need to understand why a home position needs to be explicity set here, if I am relying on my Optical Flow sensor device for navigation.
Also, I tried setting the hoemposition on the map in QGC, but it was displaying the error message :
MAV_CMD_DO_SET_HOME command failed.
I am a little clueless as to what is going on underneath. Could someone show me where to look ?
I might be completely wrong and there might be a more straightforward solution, but you might have to right-click on the map (in Mission Planner, or maybe in the MAVproxy map) and set a home manually.
Otherwise, there are probably MAVLINK commands that can be sent via MAVROS to create a home point.
You are right, that is doable. While doing that is when I get the MAV_CMD_DO_SET_HOME command failed message displaying.
I understand that home position is not necessary for internal reference, which is the EKF origin. Looking to do that now. Any help or explanations would be appreciated again @bobzwik
Hi @Iqua ! For GPS denied navigation, you require to have a reference to your starting point to calculate local position information without GPS. You generally need to set a global origin and a home position to use local position estimates without GPS.
@dkemxr , I am using Ardupilot V4.6.0-dev. I dont think this has a lua script support by default. Is it better to switch to a stable version which has ? What d o you suggest ?
Ah, there ! I am on SITL, Copter, Dave. Did you just say that Ardupilot V4.6.0-dev has Lua scripting enabled by default ? Why is it that I am still getting a bad GPS fix then ? I tried the SCR_ENABLE flag, and adding the above mentioned script. On a side note, why Lua of all languages?
I can’t help you with MAVROS.
Enable scripts
Write the script to the Scripts directory
Set EK3_SRCx_POSXY to none (so a GPS position it not set before the script runs)