visualOdometry#
Executive Summary#
The visualOdometry module implements an algorithm which seeks to find the direction of motion of a camera tracking features between images. The output of the module is the DirectionOfMotion message which contains a unit vector of the velocity direction in the camera frame, the covariance in the camera frame, the time, and camera ID.
Message Connection Descriptions#
The following table lists all the module input and output messages. The module msg connection is set by the user from python. The msg type contains a link to the message structure definition, while the description provides information on what this message is used for.
Msg Variable Name |
Msg Type |
Description |
---|---|---|
keyPointPairInMsg |
PairedKeyPointsMsgPayload |
Key points matched between two images input message |
cameraConfigInMsg |
CameraConfigMsgPayload |
camera configuration input message |
dirOfMotionMsgOutput |
DirectionOfMotionMsgPayload |
direction of motion output message |
Module Assumptions and Limitations#
The pixel error on the features \(\sigma_{uv}\) is assumed constant.
Algorithm#
The algorithm is described and derived in the reference paper: “Image-Based Lunar Terrain Relative Navigation Without a Map: Measurements” by John A. Christian et al, published in JOURNAL OF SPACECRAFT AND ROCKETS Vol. 58, No. 1, January–February 2021. The summary can be found in pseudo-code on page 171 and similar notation is used in the implementation.
User Guide#
The module is first initialized as follows:
module = visualOdometry.VisualOdometry()
module.modelTag = "directionOfMotion"
module.errorTolerance = 1E-5
module.sigma_uv = 1
module.deltaKsi_tilde = 0.1
The input messages also need to be connected:
module.keyPointPairInMsg.subscribeTo(keyPointMsg)
module.cameraConfigInMsg.subscribeTo(cameraMsg)
Class VisualOdometry#
-
class VisualOdometry : public SysModel#
Odometry module which reads key-point pairs and outputs a spacecraft direction of motion.
Public Functions
-
void reset(uint64_t currentSimNanos) override#
Reset the module and checks that required input messages are connected.
- Parameters:
currentSimNanos – current simulation time in nano-seconds
- Returns:
void
-
void updateState(uint64_t currentSimNanos) override#
Main method that gets called every time the module is updated.
- Parameters:
currentSimNanos – current simulation time in nano-seconds
- Returns:
void
-
void reset(uint64_t currentSimNanos) override#