Struct vicon_transformer::FixedSizeViconFrameΒΆ

template<size_t NUM_SUBJECTS>
struct FixedSizeViconFrame

This is an alternative to ViconFrame with a fixed number of subjects.

For some applications like o80 the data structure needs to be of fixed size. This is not the case in ViconFrame due to the use of std::map for the subjects. FixedSizeViconFrame can be used as an (less flexible) alternative for these applications.

Note that here, the names of the subjects are not stored, so one needs to keep track of the order of subjects in a different way (e.g. by having a fixed mapping from subject name to index).

Public Functions

template<class Archive>
inline void serialize(Archive &archive)
template<class Archive>
inline void serialize(Archive &archive)

Public Members

int frame_number = 0

Frame sequence number.

double frame_rate = 0.0

Frame rate of the Vicon system.

double latency = 0.0

Latency of the frame.

int64_t time_stamp = 0

Time stamp when the frame was acquired.

std::array<SubjectData, NUM_SUBJECTS> subjects

List of subjects.

Note that this list always contains entries for all registered subjects, even if they are not visible in the current frame. Therefore, always check the is_visible field of the subject before using its pose.

Public Static Attributes

static constexpr size_t max_num_subjects = NUM_SUBJECTS

Friends

template<size_t N>
friend std::ostream &operator<<(std::ostream &os, const FixedSizeViconFrame<N> &vf)
template<size_t N>
friend std::ostream &operator<<(std::ostream &os, const FixedSizeViconFrame<N> &vf)