Class VisualNFrameSimulator

Class Documentation

class simulation::VisualNFrameSimulator

Public Functions

VisualNFrameSimulator() = default
inline virtual ~VisualNFrameSimulator()
void simulateVisualNFrames(const Eigen::VectorXd &timestamps_seconds, const aslam::TransformationVector &T_G_Bs, const Eigen::Matrix3Xd &G_landmarks, const aslam::NCamera::Ptr &camera_rig, double keypoint_sigma_px, bool add_noise_to_keypoints, size_t num_bits_to_flip, aslam::VisualNFrame::PtrVector *nframe_list, aslam::TransformationVector *poses_without_keypoints)

Takes a path generator with a generated path and landmarks and returns a list of Visual NFrames filled with projected landmarks.

  • [in] timestamps_seconds: Timestamps in seconds.

  • [in] T_G_Bs: Transformations taking points from body frame to global frame.

  • [in] G_landmarks: Landmarks in global frame.

  • [in] camera_rig: A pointer to a valid camera rig. This rig will be referenced in all the Visual N-Frames.

  • [in] keypoint_sigma_px: The noise sigma on the keypoints in [px]. This will be used to set the uncertainty matrix in the VisualFrame too. So set this value even if you do not add any noise.

  • [in] add_noise_to_keypoints: Say yes or no to adding noise to the keypoints. If yes, noise will be sampled acc. to the keypoint variance specified above.

  • [in] num_bits_to_flip: Number of bits to flip wrt. the ground truth descriptor when generating keypoints for the frames.

  • [out] nframe_list: List of Visual NFrames filled with projected keypoints.

  • [out] poses_without_keypoints: Optional. If != nullptr, this returns a list of poses where zero landmarks are seen from.

const aslam::VisualFrame::DescriptorsT &getGroundTruthDescriptors() const

Returns a ref to const to the Eigen matrix containing the ground truth descriptors.

const vi_map::LandmarkIdList &getGroundTruthLandmarkIds() const

Returns a ref to const to the vector containing the ground truth landmark ids.

const Eigen::VectorXd &getGroundTruthLandmarkScores() const

Returns a ref to const to the vector containing the ground truth landmark scores.

inline const std::vector<size_t> &getGroundTruthLandmarkObservationCount()

Public Members


Public Static Attributes

static constexpr uint32_t kDescriptorSizeBytes = 48

The descriptor size.