Skip to content

Commit

Permalink
Add function descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Perrrewi committed Dec 11, 2024
1 parent f89e066 commit 94da813
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/modules/control_allocator/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ parameters:
short: Control Surface ${i} Angle at Maximum
long: |
Defines the angle when the servo is at the maximum.
Currently only supported in gz simulation.
Currently only supported in gz simulation and must be coherent with .sdf file.
type: float
decimal: 0
num_instances: *max_num_servos
Expand All @@ -361,7 +361,7 @@ parameters:
short: Control Surface ${i} Angle at Minimum
long: |
Defines the angle when the servo is at the minimum.
Currently only supported in gz simulation.
Currently only supported in gz simulation and must be coherent with .sdf file.
type: float
decimal: 0
num_instances: *max_num_servos
Expand Down
25 changes: 24 additions & 1 deletion src/modules/simulation/gz_bridge/GZMixingInterfaceServo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,33 @@ class GZMixingInterfaceServo : public OutputModuleInterface
float get_tl_angle_min(const size_t index);
float get_cs_angle_max(const size_t index);
float get_cs_angle_min(const size_t index);

/**
* @brief Checks if the servo index is configured to tiltrotor.
* Tiltrotors should be ordered after the control surfaces.
* @param index: int
* @return True if the index is as expected, otherwise False.
*/
bool is_tiltrotor(const int index);
double get_angle_min_wrapper(const int index);

/**
* @brief Get maximum configured angle of servo.
* Takes the maximum value from tilt or control surface param
* dependent on input index.
* @param index: servo index
* @return angle_max [rad]
*/
double get_angle_max_wrapper(const int index);

/**
* @brief Get minimum configured angle of servo.
* Takes the minimum value from tilt or control surface param
* dependent on input index.
* @param index: servo index
* @return angle_min [rad]
*/
double get_angle_min_wrapper(const int index);

gz::transport::Node &_node;
pthread_mutex_t &_node_mutex;

Expand Down

0 comments on commit 94da813

Please sign in to comment.