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.

  • timestamps_seconds[in] Timestamps in seconds.

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

  • G_landmarks[in] Landmarks in global frame.

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

  • keypoint_sigma_px[in] 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.

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

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

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

  • poses_without_keypoints[out] 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.