A list of Command objects appropriate for sending to a Group of modules; the size() must match the number of modules in the group. More...
#include <group_command.hpp>
Public Member Functions | |
Eigen::VectorXd | getEffort () const |
Convenience function for returning commanded effort values. More... | |
void | getEffort (Eigen::VectorXd &out) const |
Convenience function for returning commanded effort values. More... | |
Eigen::VectorXd | getPosition () const |
Convenience function for returning commanded position values. More... | |
void | getPosition (Eigen::VectorXd &out) const |
Convenience function for returning commanded position values. More... | |
Eigen::VectorXd | getSpringConstant () const |
Convenience function for returning commanded spring constant values. More... | |
void | getSpringConstant (Eigen::VectorXd &out) const |
Convenience function for returning commanded spring constant values. More... | |
Eigen::VectorXd | getVelocity () const |
Convenience function for returning commanded velocity values. More... | |
void | getVelocity (Eigen::VectorXd &out) const |
Convenience function for returning commanded velocity values. More... | |
GroupCommand (size_t number_of_modules) | |
Create a group command with the specified number of modules. More... | |
Command & | operator[] (size_t index) |
Access the command for an individual module. More... | |
const Command & | operator[] (size_t index) const |
Access the command for an individual module. More... | |
bool | readGains (const std::string &file) |
Import the gains from a file into this GroupCommand object. More... | |
void | setEffort (const Eigen::VectorXd &effort) |
Convenience function for setting effort commands from Eigen vectors. More... | |
void | setPosition (const Eigen::VectorXd &position) |
Convenience function for setting position commands from Eigen vectors. More... | |
void | setSpringConstant (const Eigen::VectorXd &springConstant) |
Convenience function for setting spring constant commands from Eigen vectors. More... | |
void | setVelocity (const Eigen::VectorXd &velocity) |
Convenience function for setting velocity commands from Eigen vectors. More... | |
size_t | size () const |
Returns the number of module commands in this group command. More... | |
bool | writeGains (const std::string &file) const |
Export the gains from this GroupCommand object into a file, creating it as necessary. More... | |
~GroupCommand () noexcept | |
Destructor cleans up group command object as necessary. More... | |
Public Attributes | |
HebiGroupCommandPtr | internal_ |
Private Attributes | |
std::vector< Command > | commands_ |
const size_t | number_of_modules_ |
A list of Command objects appropriate for sending to a Group of modules; the size() must match the number of modules in the group.
Definition at line 14 of file group_command.hpp.
hebi::GroupCommand::GroupCommand | ( | size_t | number_of_modules | ) |
Create a group command with the specified number of modules.
Definition at line 5 of file group_command.cpp.
|
noexcept |
Destructor cleans up group command object as necessary.
Definition at line 13 of file group_command.cpp.
Eigen::VectorXd hebi::GroupCommand::getEffort | ( | ) | const |
Convenience function for returning commanded effort values.
Definition at line 94 of file group_command.cpp.
void hebi::GroupCommand::getEffort | ( | Eigen::VectorXd & | out | ) | const |
Convenience function for returning commanded effort values.
Definition at line 141 of file group_command.cpp.
Eigen::VectorXd hebi::GroupCommand::getPosition | ( | ) | const |
Convenience function for returning commanded position values.
Definition at line 74 of file group_command.cpp.
void hebi::GroupCommand::getPosition | ( | Eigen::VectorXd & | out | ) | const |
Convenience function for returning commanded position values.
Definition at line 115 of file group_command.cpp.
Eigen::VectorXd hebi::GroupCommand::getSpringConstant | ( | ) | const |
Convenience function for returning commanded spring constant values.
Definition at line 104 of file group_command.cpp.
void hebi::GroupCommand::getSpringConstant | ( | Eigen::VectorXd & | out | ) | const |
Convenience function for returning commanded spring constant values.
Definition at line 154 of file group_command.cpp.
Eigen::VectorXd hebi::GroupCommand::getVelocity | ( | ) | const |
Convenience function for returning commanded velocity values.
Definition at line 84 of file group_command.cpp.
void hebi::GroupCommand::getVelocity | ( | Eigen::VectorXd & | out | ) | const |
Convenience function for returning commanded velocity values.
Definition at line 128 of file group_command.cpp.
Command & hebi::GroupCommand::operator[] | ( | size_t | index | ) |
Access the command for an individual module.
Definition at line 24 of file group_command.cpp.
const Command & hebi::GroupCommand::operator[] | ( | size_t | index | ) | const |
Access the command for an individual module.
Definition at line 29 of file group_command.cpp.
bool hebi::GroupCommand::readGains | ( | const std::string & | file | ) |
Import the gains from a file into this GroupCommand object.
file | The filename (or path + filename) to the file to read from. |
Definition at line 34 of file group_command.cpp.
void hebi::GroupCommand::setEffort | ( | const Eigen::VectorXd & | effort | ) |
Convenience function for setting effort commands from Eigen vectors.
Note that if the vector is not the correct link, no action is taken.
Definition at line 58 of file group_command.cpp.
void hebi::GroupCommand::setPosition | ( | const Eigen::VectorXd & | position | ) |
Convenience function for setting position commands from Eigen vectors.
Note that if the vector is not the correct link, no action is taken.
Definition at line 44 of file group_command.cpp.
void hebi::GroupCommand::setSpringConstant | ( | const Eigen::VectorXd & | springConstant | ) |
Convenience function for setting spring constant commands from Eigen vectors.
Note that if the vector is not the correct link, no action is taken.
Definition at line 66 of file group_command.cpp.
void hebi::GroupCommand::setVelocity | ( | const Eigen::VectorXd & | velocity | ) |
Convenience function for setting velocity commands from Eigen vectors.
Note that if the vector is not the correct link, no action is taken.
Definition at line 51 of file group_command.cpp.
size_t hebi::GroupCommand::size | ( | ) | const |
Returns the number of module commands in this group command.
Definition at line 19 of file group_command.cpp.
bool hebi::GroupCommand::writeGains | ( | const std::string & | file | ) | const |
Export the gains from this GroupCommand object into a file, creating it as necessary.
file | The filename (or path + filename) to the file to write to. |
Definition at line 39 of file group_command.cpp.
|
private |
The list of Command subobjects
Definition at line 33 of file group_command.hpp.
HebiGroupCommandPtr hebi::GroupCommand::internal_ |
C-style group command object. NOTE: this should not be used except by library functions!
Definition at line 22 of file group_command.hpp.
|
private |
The number of modules in this group command.
Definition at line 29 of file group_command.hpp.