Class GroupInfo

Class Documentation

class GroupInfo

A list of Info objects that can be received from a Group of modules; the size() must match the number of modules in the group.

Public Functions

GroupInfo(size_t number_of_modules)

Create a group info with the specified number of modules.

~GroupInfo() noexcept = default

Destructor cleans up group info object as necessary.

GroupInfo(GroupInfo&&) = default

Allows moving result from “subview”.

GroupInfo subview(std::vector<int> indices) const

Creates a “subview” of this group info object, with shared access to a subset of the Info elements. Note that certain functions (write gains and write safety parameters and not currently supported on subviews)

The indices do not need to remain in order, and do not need to be unique; however, they must each be >= 0 and < size(); otherwise an out_of_range exception is thrown.

inline bool isSubview() const

Was this created as a subview of another GroupInfo?

size_t size() const

Returns the number of module infos in this group info.

const Info &operator[](size_t index) const

Access the info for an individual module.

bool writeGains(const std::string &file) const

Export the gains from this GroupInfo object into a file, creating it as necessary.

Parameters:

file – The filename (or path + filename) to the file to write to.

inline FunctionCallResult writeSafetyParameters(const std::string &file) const

Export the safety parameters from this GroupInfo object into a file, creating it as necessary.

Parameters:

file – The filename (or path + filename) to the file to write to.

Eigen::VectorXd getSpringConstant() const

Convenience function for returning spring constant values.

void getSpringConstant(Eigen::VectorXd &out) const

Convenience function for returning spring constant values.

Public Members

std::shared_ptr<GroupInfoWrapper> internal_

Light wrapper around C-style group info object. NOTE: this should not be used except by library functions!