Skip to content

Commit ff0afaa

Browse files
Merge branch 'master' into feat/fixes_#3409
2 parents 0c089bf + 8a37176 commit ff0afaa

8 files changed

Lines changed: 173 additions & 146 deletions

joint_limits/include/joint_limits/data_structures.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
/// \author Sai Kishor Kothakota
15+
/// @author Sai Kishor Kothakota
1616

1717
#ifndef JOINT_LIMITS__DATA_STRUCTURES_HPP_
1818
#define JOINT_LIMITS__DATA_STRUCTURES_HPP_

joint_limits/include/joint_limits/joint_limiter_interface.hpp

Lines changed: 40 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
/// \author Denis Stogl
15+
/// @author Denis Stogl
1616

1717
#ifndef JOINT_LIMITS__JOINT_LIMITER_INTERFACE_HPP_
1818
#define JOINT_LIMITS__JOINT_LIMITER_INTERFACE_HPP_
@@ -38,18 +38,19 @@ class JointLimiterInterface
3838

3939
virtual ~JointLimiterInterface() = default;
4040

41-
/// Initialization of every JointLimiter.
4241
/**
42+
* @brief Initialize every JointLimiter.
43+
*
4344
* Initialization of JointLimiter for defined joints with their names.
4445
* Robot description topic provides a topic name where URDF of the robot can be found.
4546
* This is needed to use joint limits from URDF (not implemented yet!).
4647
* Override this method only if initialization and reading joint limits should be adapted.
4748
* Otherwise, initialize your custom limiter in `on_init` method.
4849
*
49-
* \param[in] joint_names names of joints where limits should be applied.
50-
* \param[in] param_itf node parameters interface object to access parameters.
51-
* \param[in] logging_itf node logging interface to log if error happens.
52-
* \param[in] robot_description_topic string of a topic where robot description is accessible.
50+
* @param[in] joint_names names of joints where limits should be applied.
51+
* @param[in] param_itf node parameters interface object to access parameters.
52+
* @param[in] logging_itf node logging interface to log if error happens.
53+
* @param[in] robot_description_topic string of a topic where robot description is accessible.
5354
*/
5455
virtual bool init(
5556
const std::vector<std::string> & joint_names,
@@ -132,7 +133,7 @@ class JointLimiterInterface
132133
}
133134

134135
/**
135-
* Wrapper init method that accepts the joint names and their limits directly
136+
* @brief Initialize joints from directly provided names and limits.
136137
*/
137138
virtual bool init(
138139
const std::vector<std::string> & joint_names,
@@ -160,7 +161,8 @@ class JointLimiterInterface
160161
}
161162

162163
/**
163-
* Wrapper init method that accepts pointer to the Node.
164+
* @brief Initialize joints using a Node pointer.
165+
*
164166
* For details see other init method.
165167
*/
166168
virtual bool init(
@@ -173,7 +175,8 @@ class JointLimiterInterface
173175
}
174176

175177
/**
176-
* Wrapper init method that accepts pointer to the LifecycleNode.
178+
* @brief Initialize joints using a LifecycleNode pointer.
179+
*
177180
* For details see other init method.
178181
*/
179182
virtual bool init(
@@ -191,14 +194,15 @@ class JointLimiterInterface
191194
return on_configure(current_joint_states);
192195
}
193196

194-
/** \brief Enforce joint limits to desired joint state for multiple physical quantities.
197+
/**
198+
* @brief Enforce joint limits to desired joint state for multiple physical quantities.
195199
*
196200
* Generic enforce method that calls implementation-specific `on_enforce` method.
197201
*
198-
* \param[in] current_joint_states current joint states a robot is in.
199-
* \param[in,out] desired_joint_states joint state that should be adjusted to obey the limits.
200-
* \param[in] dt time delta to calculate missing integrals and derivation in joint limits.
201-
* \returns true if limits are enforced, otherwise false.
202+
* @param[in] current_joint_states current joint states a robot is in.
203+
* @param[in,out] desired_joint_states joint state that should be adjusted to obey the limits.
204+
* @param[in] dt time delta to calculate missing integrals and derivation in joint limits.
205+
* @return true if limits are enforced, otherwise false.
202206
*/
203207
virtual bool enforce(
204208
const JointLimitsStateDataType & current_joint_states,
@@ -211,46 +215,53 @@ class JointLimiterInterface
211215
virtual void reset_internals() = 0;
212216

213217
protected:
214-
/** \brief Method is realized by an implementation.
218+
/**
219+
* @brief Initialize the limiter's internal states and libraries.
215220
*
216221
* Implementation-specific initialization of limiter's internal states and libraries.
217-
* \returns true if initialization was successful, otherwise false.
222+
* @return true if initialization was successful, otherwise false.
218223
*/
219224
virtual bool on_init() = 0;
220225

221-
/** \brief Method is realized by an implementation.
226+
/**
227+
* @brief Configure the limiter's internal states and libraries.
222228
*
223229
* Implementation-specific configuration of limiter's internal states and libraries.
224-
* \returns true if initialization was successful, otherwise false.
230+
* @return true if initialization was successful, otherwise false.
225231
*/
226232
virtual bool on_configure(const JointLimitsStateDataType & current_joint_states) = 0;
227233

228-
/** \brief Method is realized by an implementation.
234+
/**
235+
* @brief Enforce joint limits for multiple dependent physical quantities.
229236
*
230237
* Filter-specific implementation of the joint limits enforce algorithm for multiple dependent
231238
* physical quantities.
232239
*
233-
* \param[in] current_joint_states current joint states a robot is in.
234-
* \param[in,out] desired_joint_states joint state that should be adjusted to obey the limits.
235-
* \param[in] dt time delta to calculate missing integrals and derivation in joint limits.
236-
* \returns true if limits are enforced, otherwise false.
240+
* @param[in] current_joint_states current joint states a robot is in.
241+
* @param[in,out] desired_joint_states joint state that should be adjusted to obey the limits.
242+
* @param[in] dt time delta to calculate missing integrals and derivation in joint limits.
243+
* @return true if limits are enforced, otherwise false.
237244
*/
238245
virtual bool on_enforce(
239246
const JointLimitsStateDataType & current_joint_states,
240247
JointLimitsStateDataType & desired_joint_states, const rclcpp::Duration & dt) = 0;
241248

242-
/** \brief Checks if the logging interface is set.
243-
* \returns true if the logging interface is available, otherwise false.
249+
/**
250+
* @brief Checks if the logging interface is set.
251+
*
252+
* @return true if the logging interface is available, otherwise false.
244253
*
245-
* \note this way of interfacing would be useful for instances where the logging interface is not
254+
* @note this way of interfacing would be useful for instances where the logging interface is not
246255
* available, for example in the ResourceManager or ResourceStorage classes.
247256
*/
248257
bool has_logging_interface() const { return node_logging_itf_ != nullptr; }
249258

250-
/** \brief Checks if the parameter interface is set.
251-
* \returns true if the parameter interface is available, otherwise false.
259+
/**
260+
* @brief Checks if the parameter interface is set.
261+
*
262+
* @return true if the parameter interface is available, otherwise false.
252263
*
253-
* * \note this way of interfacing would be useful for instances where the logging interface is
264+
* @note this way of interfacing would be useful for instances where the logging interface is
254265
* not available, for example in the ResourceManager or ResourceStorage classes.
255266
*/
256267
bool has_parameter_interface() const { return node_param_itf_ != nullptr; }

joint_limits/include/joint_limits/joint_limits.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
/// \author Adolfo Rodriguez Tsouroukdissian
15+
/// @author Adolfo Rodriguez Tsouroukdissian
1616

1717
#ifndef JOINT_LIMITS__JOINT_LIMITS_HPP_
1818
#define JOINT_LIMITS__JOINT_LIMITS_HPP_
@@ -24,7 +24,8 @@
2424
namespace joint_limits
2525
{
2626
/**
27-
* JointLimits structure stores values from from yaml definition or `<limits>` tag in URDF.
27+
* @brief Store joint limits values from YAML definition or URDF `<limits>` tag.
28+
*
2829
* The mapping from URDF attributes to members is the following:
2930
* lower --> min_position
3031
* upper --> max_position
@@ -107,8 +108,7 @@ struct JointLimits
107108
};
108109

109110
/**
110-
* SoftJointLimits stores values from the `<safety_controller>` tag of URDF.
111-
* The meaning of the fields are:
111+
* @brief Store soft joint limits values from the URDF `<safety_controller>` tag.
112112
*
113113
* An element can contain the following attributes:
114114
*

joint_limits/include/joint_limits/joint_limits_helpers.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
/// \author Adrià Roig Moreno
15+
/// @author Adrià Roig Moreno
1616

1717
#ifndef JOINT_LIMITS__JOINT_LIMITS_HELPERS_HPP_
1818
#define JOINT_LIMITS__JOINT_LIMITS_HELPERS_HPP_
@@ -33,15 +33,15 @@ constexpr double OUT_OF_BOUNDS_EXCEPTION_TOLERANCE = 0.0087;
3333
} // namespace internal
3434

3535
/**
36-
* @brief Updates the previous command with the desired command.
36+
* @brief Update the previous command with the desired command.
3737
* @param prev_command The previous command to update.
3838
* @param desired The desired command which is limited.
3939
*/
4040
void update_prev_command(
4141
const JointControlInterfacesData & desired, JointControlInterfacesData & prev_command);
4242

4343
/**
44-
* @brief Checks if a value is limited by the given limits.
44+
* @brief Check if a value is limited by the given limits.
4545
* @param value The value to check.
4646
* @param min The minimum limit.
4747
* @param max The maximum limit.
@@ -50,7 +50,7 @@ void update_prev_command(
5050
bool is_limited(double value, double min, double max);
5151

5252
/**
53-
* @brief Computes the position limits based on the velocity and acceleration limits.
53+
* @brief Compute the position limits based on the velocity and acceleration limits.
5454
* @param joint_name The name of the joint.
5555
* @param limits The joint limits.
5656
* @param act_vel The actual velocity of the joint.
@@ -66,7 +66,7 @@ PositionLimits compute_position_limits(
6666
const std::optional<double> & prev_command_pos, double dt);
6767

6868
/**
69-
* @brief Computes the velocity limits based on the position and acceleration limits.
69+
* @brief Compute the velocity limits based on the position and acceleration limits.
7070
* @param joint_name The name of the joint.
7171
* @param limits The joint limits.
7272
* @param act_pos The actual position of the joint.
@@ -80,7 +80,7 @@ VelocityLimits compute_velocity_limits(
8080
const std::optional<double> & prev_command_vel, double dt);
8181

8282
/**
83-
* @brief Computes the effort limits based on the position and velocity limits.
83+
* @brief Compute the effort limits based on the position and velocity limits.
8484
* @param limits The joint limits.
8585
* @param act_pos The actual position of the joint.
8686
* @param act_vel The actual velocity of the joint.
@@ -92,7 +92,7 @@ EffortLimits compute_effort_limits(
9292
const std::optional<double> & act_vel, double /*dt*/);
9393

9494
/**
95-
* @brief Computes the acceleration limits based on the change in velocity and acceleration and
95+
* @brief Compute the acceleration limits based on the change in velocity and acceleration and
9696
* deceleration limits.
9797
* @param limits The joint limits.
9898
* @param desired_acceleration The desired acceleration.

0 commit comments

Comments
 (0)