Map between servos, their busses and the joints they actuate.
More...
#include <ServoLayout.h>
|
void | add_servo (const int servo_id, const int bus_id, const std::string &joint_name) |
| Add a servo to the layout. More...
|
|
int | bus (const int servo_id) const |
| Get identifier of the CAN bus a servo is connected to. More...
|
|
const std::string & | joint_name (const int servo_id) const |
| Get the name of the joint a servo actuates. More...
|
|
const std::map< int, int > & | servo_bus_map () const noexcept |
| Get the full servo-bus map. More...
|
|
const std::map< int, std::string > & | servo_joint_map () const noexcept |
| Get the full servo-joint map. More...
|
|
size_t | size () const noexcept |
| Get the number of servos in the layout. More...
|
|
Map between servos, their busses and the joints they actuate.
Definition at line 12 of file ServoLayout.h.
◆ add_servo()
void vulp::actuation::ServoLayout::add_servo |
( |
const int |
servo_id, |
|
|
const int |
bus_id, |
|
|
const std::string & |
joint_name |
|
) |
| |
|
inline |
Add a servo to the layout.
- Parameters
-
[in] | servo_id | Servo ID (id.id for moteus) |
[in] | bus_id | CAN bus the servo is connected to. |
[in] | joint_name | Name of the joint the servo actuates. |
Definition at line 20 of file ServoLayout.h.
◆ bus()
int vulp::actuation::ServoLayout::bus |
( |
const int |
servo_id | ) |
const |
|
inline |
Get identifier of the CAN bus a servo is connected to.
- Parameters
-
- Returns
- CAN bus the servo is connected to.
- Exceptions
-
std::out_of_range | if the servo is not in the layout. |
Definition at line 34 of file ServoLayout.h.
◆ joint_name()
const std::string& vulp::actuation::ServoLayout::joint_name |
( |
const int |
servo_id | ) |
const |
|
inline |
Get the name of the joint a servo actuates.
- Parameters
-
- Returns
- Name of the joint the servo actuates.
- Exceptions
-
std::out_of_range | if the servo is not in the layout. |
Definition at line 44 of file ServoLayout.h.
◆ servo_bus_map()
const std::map<int, int>& vulp::actuation::ServoLayout::servo_bus_map |
( |
| ) |
const |
|
inlinenoexcept |
◆ servo_joint_map()
const std::map<int, std::string>& vulp::actuation::ServoLayout::servo_joint_map |
( |
| ) |
const |
|
inlinenoexcept |
◆ size()
size_t vulp::actuation::ServoLayout::size |
( |
| ) |
const |
|
inlinenoexcept |
Get the number of servos in the layout.
Definition at line 59 of file ServoLayout.h.
The documentation for this class was generated from the following file: