Skip to content

Commit ddf5724

Browse files
committed
Add API documentation for set_scaling_factor
1 parent 6c886b5 commit ddf5724

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

joint_trajectory_controller/include/joint_trajectory_controller/joint_trajectory_controller.hpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,24 @@ class JointTrajectoryController : public controller_interface::ControllerInterfa
283283
void resize_joint_trajectory_point_command(
284284
trajectory_msgs::msg::JointTrajectoryPoint & point, size_t size, double value = 0.0);
285285

286+
/**
287+
* @brief Set scaling factor used for speed scaling trajectory execution
288+
*
289+
* If the hardware supports and has configured setting speed scaling, that will be sent to the
290+
* hardware's command interface.
291+
*
292+
* If the hardware doesn't support a command interface for speed scaling, but a state interface
293+
* for reading speed scaling, calling this function will have no effect, as the factor will be
294+
* overwritten by the state interface.
295+
*
296+
* @param scaling_factor has to fulfil 0 <= scaling_factor <= 1.0
297+
*
298+
*/
286299
bool set_scaling_factor(double scaling_factor);
300+
287301
using SpeedScalingMsg = control_msgs::msg::SpeedScalingFactor;
288302
rclcpp::Subscription<SpeedScalingMsg>::SharedPtr scaling_factor_sub_;
303+
289304
/**
290305
* @brief Assigns the values from a trajectory point interface to a joint interface.
291306
*

0 commit comments

Comments
 (0)