HEBI C++ API  3.8.0
hebi::GroupInfo Class Referencefinal

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. More...

#include <group_info.hpp>

Public Member Functions

 GroupInfo (size_t number_of_modules)
 Create a group info with the specified number of modules. More...
 
 ~GroupInfo () noexcept=default
 Destructor cleans up group info object as necessary. More...
 
 GroupInfo (GroupInfo &&)=default
 Allows moving result from "subview". More...
 
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) More...
 
bool isSubview () const
 Was this created as a subview of another GroupInfo? More...
 
size_t size () const
 Returns the number of module infos in this group info. More...
 
const Infooperator[] (size_t index) const
 Access the info for an individual module. More...
 
bool writeGains (const std::string &file) const
 Export the gains from this GroupInfo object into a file, creating it as necessary. More...
 
FunctionCallResult writeSafetyParameters (const std::string &file) const
 Export the safety parameters from this GroupInfo object into a file, creating it as necessary. More...
 
Eigen::VectorXd getSpringConstant () const
 Convenience function for returning spring constant values. More...
 
void getSpringConstant (Eigen::VectorXd &out) const
 Convenience function for returning spring constant values. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ GroupInfo() [1/2]

hebi::GroupInfo::GroupInfo ( size_t  number_of_modules)

Create a group info with the specified number of modules.

◆ ~GroupInfo()

hebi::GroupInfo::~GroupInfo ( )
defaultnoexcept

Destructor cleans up group info object as necessary.

◆ GroupInfo() [2/2]

hebi::GroupInfo::GroupInfo ( GroupInfo &&  )
default

Allows moving result from "subview".

Member Function Documentation

◆ subview()

GroupInfo hebi::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.

◆ isSubview()

bool hebi::GroupInfo::isSubview ( ) const
inline

Was this created as a subview of another GroupInfo?

◆ size()

size_t hebi::GroupInfo::size ( ) const

Returns the number of module infos in this group info.

◆ operator[]()

const Info & hebi::GroupInfo::operator[] ( size_t  index) const

Access the info for an individual module.

◆ writeGains()

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

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

Parameters
fileThe filename (or path + filename) to the file to write to.

◆ writeSafetyParameters()

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

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

Parameters
fileThe filename (or path + filename) to the file to write to.

◆ getSpringConstant() [1/2]

Eigen::VectorXd hebi::GroupInfo::getSpringConstant ( ) const

Convenience function for returning spring constant values.

◆ getSpringConstant() [2/2]

void hebi::GroupInfo::getSpringConstant ( Eigen::VectorXd &  out) const

Convenience function for returning spring constant values.


The documentation for this class was generated from the following files: