group_info.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "hebi.h"
4 #include "Eigen/Eigen"
5 #include "info.hpp"
6 #include <vector>
7 
8 namespace hebi {
9 
14 class GroupInfo final
15 {
16  public:
17  #ifndef DOXYGEN_OMIT_INTERNAL
18 
23  #endif // DOXYGEN_OMIT_INTERNAL
24 
25  private:
29  const size_t number_of_modules_;
33  std::vector<Info> infos_;
34 
35  public:
39  GroupInfo(size_t number_of_modules);
40 
44  ~GroupInfo() noexcept; /* annotating specified destructor as noexcept is best-practice */
45 
49  size_t size() const;
50 
54  const Info& operator[](size_t index) const;
55 
60  bool writeGains(const std::string& file) const;
61 
65  Eigen::VectorXd getSpringConstant() const;
66 
70  void getSpringConstant(Eigen::VectorXd& out) const;
71 
72 };
73 
74 } // namespace hebi
A list of Info objects that can be received from a Group of modules; the size() must match the number...
Definition: group_info.hpp:14
size_t size() const
Returns the number of module infos in this group info.
Definition: group_info.cpp:19
Definition: color.hpp:5
Definition: LDLT.h:16
struct _HebiGroupInfo * HebiGroupInfoPtr
The C-style&#39;s API representation of group info.
Definition: hebi.h:354
Info objects have various fields representing the module state; which fields are populated depends on...
Definition: info.hpp:30
GroupInfo(size_t number_of_modules)
Create a group info with the specified number of modules.
Definition: group_info.cpp:5
bool writeGains(const std::string &file) const
Export the gains from this GroupInfo object into a file, creating it as necessary.
Definition: group_info.cpp:29
Eigen::VectorXd getSpringConstant() const
Convenience function for returning spring constant values.
Definition: group_info.cpp:34
~GroupInfo() noexcept
Destructor cleans up group info object as necessary.
Definition: group_info.cpp:13
std::vector< Info > infos_
Definition: group_info.hpp:33
HebiGroupInfoPtr internal_
Definition: group_info.hpp:22
const size_t number_of_modules_
Definition: group_info.hpp:29


hebiros
Author(s): Xavier Artache , Matthew Tesch
autogenerated on Thu Sep 3 2020 04:08:14