19 #ifndef DOXYGEN_OMIT_INTERNAL 25 #endif // DOXYGEN_OMIT_INTERNAL 56 Command& operator[](
size_t index);
61 const
Command& operator[](
size_t index) const;
79 bool writeGains(const std::
string& file) const;
125 void setEffort(
const Eigen::VectorXd& effort);
162 void getEffort(Eigen::VectorXd& out)
const;
GroupCommand(size_t number_of_modules)
Create a group command with the specified number of modules.
Eigen::VectorXd getPosition() const
Convenience function for returning commanded position values.
Command objects have various fields that can be set; when sent to the module, these fields control in...
bool writeGains(const std::string &file) const
Export the gains from this GroupCommand object into a file, creating it as necessary.
FunctionCallResult readSafetyParameters(const std::string &file)
Import the safety parameters from a file into this GroupCommand object.
~GroupCommand() noexcept
Destructor cleans up group command object as necessary.
HebiStatusCode hebiGroupCommandReadSafetyParameters(HebiGroupCommandPtr command, const char *file)
Import safety parameters from a file into a GroupCommand object.
Eigen::VectorXd getSpringConstant() const
Convenience function for returning commanded spring constant values.
Eigen::VectorXd getEffort() const
Convenience function for returning commanded effort values.
struct HebiGroupCommand_ * HebiGroupCommandPtr
The C-style's API representation of a command object for a group of modules.
size_t size() const
Returns the number of module commands in this group command.
const size_t number_of_modules_
bool readGains(const std::string &file)
Import the gains from a file into this GroupCommand object.
A list of Command objects appropriate for sending to a Group of modules; the size() must match the nu...
HebiGroupCommandPtr internal_
std::vector< Command > commands_
FunctionCallResult writeSafetyParameters(const std::string &file) const
Export the safety parameters from this GroupCommand object into a file, creating it as necessary...
void setVelocity(const Eigen::VectorXd &velocity)
Convenience function for setting velocity commands from Eigen vectors.
void setSpringConstant(const Eigen::VectorXd &springConstant)
Convenience function for setting spring constant commands from Eigen vectors.
void setPosition(const Eigen::VectorXd &position)
Convenience function for setting position commands from Eigen vectors.
HebiStatusCode hebiGroupCommandWriteSafetyParameters(HebiGroupCommandPtr command, const char *file)
Export safety parameters from a GroupCommand object into a file.
void setEffort(const Eigen::VectorXd &effort)
Convenience function for setting effort commands from Eigen vectors.
const char * hebiSafetyParametersGetLastError(void)
Misc Functions.
void clear()
Clears all data in this GroupCommand object; this returns to the state the GroupCommand was at time o...
Eigen::VectorXd getVelocity() const
Convenience function for returning commanded velocity values.