Skip to content

TwistNode

This module contains TwistNode, a ROS node that estimates camera twist i.e. velocity in the camera’s intrinsic (REP 103 camera_optical) frame of reference.

The reference image is a previous image frame from the onboard camera. Visual odometry (VO) provides a smooth local (relative) pose or twist estimate that drifts over the long-term.

The pose is estimated by finding matching keypoints between the query and reference images and then solving the resulting PnP problem.

Does not publish a Twist message, instead publishes Pose which should then be fused differentially by the EKF.

Classes:

TwistNode(*args, **kwargs)Estimates camera pose in intrinsic (REP 103 camera_optical) frame of reference by finding matching keypoints and solving the PnP problem.

class gisnav.core.twist_node.TwistNode(*args, **kwargs)

Bases: Node

Estimates camera pose in intrinsic (REP 103 camera_optical) frame of reference by finding matching keypoints and solving the PnP problem.

Class initializer

  • Parameters:
    • args – Positional arguments to parent Node constructor
    • kwargs – Keyword arguments to parent Node constructor

Attributes:

CONFIDENCE_THRESHOLDConfidence threshold for filtering out bad keypoint matches
MAX_KEYPOINTSMax number of SIFT keypoints to detect when matching on CPU
MIN_MATCHESMinimum number of keypoint matches before attempting pose estimation
camera_infoCamera info including the intrinsics matrix, or None if unknown
imageSubscribed raw image from vehicle camera, or None if unknown
poseCamera pose in previous REP 105 gisnav_odom frame

CONFIDENCE_THRESHOLD = 0.7

Confidence threshold for filtering out bad keypoint matches

MAX_KEYPOINTS = 1024

Max number of SIFT keypoints to detect when matching on CPU

See also PoseNode.MAX_KEYPOINTS.

Keep this low to increase matching speed especially on resource constrained systems.

MIN_MATCHES = 30

Minimum number of keypoint matches before attempting pose estimation

property camera_info : CameraInfo | None

Camera info including the intrinsics matrix, or None if unknown

property image : Image | None

Subscribed raw image from vehicle camera, or None if unknown

property pose : PoseWithCovarianceStamped | None

Camera pose in previous REP 105 gisnav_odom frame

This is computed as the the relative 3D position and orientation of the REP 105 camera_optical frame in its intrinsic frame from successive camera images

GISNav v0.68.1-2-gf2c72641

Released under the MIT License.