Manual Relocalization
If you are flying with Cyclops in the loop but have some additional information (i.e. visual information, or a GPS fix) you are able to manually reset the Cyclops position over MAVLink with Vozilla.

To manually relocalize, right click on the map while connected over MAVLink and click "Relocalize here". The Cyclops position will update to the point you clicked. It also resets Cyclops and can be useful if scale or heading estimation is offset.
Overview
Cyclops can accept a manual relocalize command over MAVLink. Send a targeted COMMAND_INT using command id 43003 (MAV_CMD_EXTERNAL_POSITION_ESTIMATE) with the new WGS84 latitude and longitude. When accepted, Cyclops synchronously resets its map-match position state to that coordinate.
Use COMMAND_INT, not COMMAND_LONG, so latitude and longitude are carried as degE7 integers instead of lossy float32 values.
Target
Target the Cyclops MAVLink identity:
target_system
218
mavproxy.source_system
target_component
191
mavproxy.mvps_compid
Read the deployed values with:
The command must arrive on a MAVLink path that Cyclops receives. For autopilot Lua scripts, send it from the flight controller.
To restart MAVLink Router service, use the command:
COMMAND_INT Fields
command
43003 (MAV_CMD_EXTERNAL_POSITION_ESTIMATE)
frame
MAV_FRAME_GLOBAL (0)
current
0
autocontinue
0
param1
0 for a reset request
param2
0
param3
Optional accuracy in meters; 0 is accepted
param4
0
x
Latitude in degE7, e.g. 37.4221234 -> 374221234
y
Longitude in degE7, e.g. -122.0839876 -> -1220839876
z
NaN; altitude is not used for the reset
Cyclops validates that latitude and longitude are finite and inside normal WGS84 bounds. The target must also be inside the loaded map area.
Response
Cyclops replies with COMMAND_ACK for command 43003:
MAV_RESULT_ACCEPTED
Reset succeeded.
MAV_RESULT_TEMPORARILY_REJECTED
Cyclops is already relocalizing. Retry later.
MAV_RESULT_FAILED
Coordinates are invalid, outside the map, or the map matcher is unavailable.
After an accepted reset, Cyclops also publishes a GLOBAL_POSITION_INT confirmation at the reset coordinate. Normal map matching resumes after the first post-reset odometry sample refreshes the displacement baseline.
pymavlink Example
Use the endpoint that reaches Cyclops in your deployment. With MAVProxy, that is the flight-controller path or a configured upstream endpoint like the example above.
Last updated
