group_feedback.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "hebi.h"
4 #include "Eigen/Eigen"
5 #include "feedback.hpp"
6 #include <vector>
7 
8 namespace hebi {
9 
14 class GroupFeedback final
15 {
16  public:
17  #ifndef DOXYGEN_OMIT_INTERNAL
18 
23  #endif // DOXYGEN_OMIT_INTERNAL
24 
25  private:
34  const size_t number_of_modules_;
38  std::vector<Feedback> feedbacks_;
39 
40  public:
44  GroupFeedback(size_t number_of_modules);
45  #ifndef DOXYGEN_OMIT_INTERNAL
46 
51  GroupFeedback(HebiGroupFeedbackPtr group_feedback);
52  #endif // DOXYGEN_OMIT_INTERNAL
53 
57  ~GroupFeedback() noexcept; /* annotating specified destructor as noexcept is best-practice */
58 
62  size_t size() const;
63 
67  const Feedback& operator[](size_t index) const;
68 
72  Eigen::VectorXd getBoardTemperature() const;
76  Eigen::VectorXd getProcessorTemperature() const;
80  Eigen::VectorXd getVoltage() const;
84  Eigen::VectorXd getDeflection() const;
88  Eigen::VectorXd getDeflectionVelocity() const;
92  Eigen::VectorXd getMotorVelocity() const;
96  Eigen::VectorXd getMotorCurrent() const;
100  Eigen::VectorXd getMotorSensorTemperature() const;
104  Eigen::VectorXd getMotorWindingCurrent() const;
108  Eigen::VectorXd getMotorWindingTemperature() const;
112  Eigen::VectorXd getMotorHousingTemperature() const;
113 
117  Eigen::VectorXd getPosition() const;
121  Eigen::VectorXd getVelocity() const;
125  Eigen::VectorXd getEffort() const;
126 
130  Eigen::VectorXd getPositionCommand() const;
134  Eigen::VectorXd getVelocityCommand() const;
138  Eigen::VectorXd getEffortCommand() const;
139 
143  Eigen::MatrixX3d getAccelerometer() const;
147  Eigen::MatrixX3d getGyro() const;
148 
152  void getBoardTemperature(Eigen::VectorXd& out) const;
156  void getProcessorTemperature(Eigen::VectorXd& out) const;
160  void getVoltage(Eigen::VectorXd& out) const;
164  void getDeflection(Eigen::VectorXd& out) const;
168  void getDeflectionVelocity(Eigen::VectorXd& out) const;
172  void getMotorVelocity(Eigen::VectorXd& out) const;
176  void getMotorCurrent(Eigen::VectorXd& out) const;
180  void getMotorSensorTemperature(Eigen::VectorXd& out) const;
184  void getMotorWindingCurrent(Eigen::VectorXd& out) const;
188  void getMotorWindingTemperature(Eigen::VectorXd& out) const;
192  void getMotorHousingTemperature(Eigen::VectorXd& out) const;
193 
197  void getPosition(Eigen::VectorXd& out) const;
201  void getVelocity(Eigen::VectorXd& out) const;
205  void getEffort(Eigen::VectorXd& out) const;
206 
210  void getPositionCommand(Eigen::VectorXd& out) const;
214  void getVelocityCommand(Eigen::VectorXd& out) const;
218  void getEffortCommand(Eigen::VectorXd& out) const;
219 
223  void getAccelerometer(Eigen::MatrixX3d& out) const;
227  void getGyro(Eigen::MatrixX3d& out) const;
228 
229 };
230 
231 } // namespace hebi
A list of Feedback objects that can be received from a Group of modules; the size() must match the nu...
Eigen::VectorXd getVelocityCommand() const
Convenience function for returning commanded velocity values.
Eigen::VectorXd getBoardTemperature() const
Convenience function for returning feedback board temperature values.
Eigen::VectorXd getEffort() const
Convenience function for returning feedback effort values.
struct _HebiGroupFeedback * HebiGroupFeedbackPtr
The C-style&#39;s API representation of group feedback.
Definition: hebi.h:346
Definition: color.hpp:5
Eigen::VectorXd getDeflection() const
Convenience function for returning feedback deflection values.
Definition: LDLT.h:16
size_t size() const
Returns the number of module feedbacks in this group feedback.
Eigen::VectorXd getVelocity() const
Convenience function for returning feedback velocity values.
Eigen::VectorXd getProcessorTemperature() const
Convenience function for returning feedback processor temperature values.
Feedback objects have various fields representing feedback from modules; which fields are populated d...
Definition: feedback.hpp:30
Eigen::MatrixX3d getGyro() const
Convenience function for returning feedback gyroscope values.
const bool manage_pointer_lifetime_
GroupFeedback(size_t number_of_modules)
Create a group feedback with the specified number of modules.
Eigen::VectorXd getMotorSensorTemperature() const
Convenience function for returning feedback motor sensor temperature values.
std::vector< Feedback > feedbacks_
Eigen::VectorXd getDeflectionVelocity() const
Convenience function for returning feedback deflection velocity values.
Eigen::VectorXd getVoltage() const
Convenience function for returning feedback voltage values.
HebiGroupFeedbackPtr internal_
const size_t number_of_modules_
Eigen::VectorXd getMotorWindingCurrent() const
Convenience function for returning feedback motor winding current values.
Eigen::VectorXd getMotorVelocity() const
Convenience function for returning feedback motor velocity values.
Eigen::MatrixX3d getAccelerometer() const
Convenience function for returning feedback accelerometer values.
Eigen::VectorXd getMotorHousingTemperature() const
Convenience function for returning feedback motor housing temperature values.
Eigen::VectorXd getMotorCurrent() const
Convenience function for returning feedback motor current values.
~GroupFeedback() noexcept
Destructor cleans up group feedback object as necessary.
Eigen::VectorXd getPositionCommand() const
Convenience function for returning commanded position values.
Eigen::VectorXd getEffortCommand() const
Convenience function for returning commanded effort values.
Eigen::VectorXd getPosition() const
Convenience function for returning feedback position values.
Eigen::VectorXd getMotorWindingTemperature() const
Convenience function for returning feedback motor winding temperature values.


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