Skip to content

Commit

Permalink
Set default controller update rate parameter to 100
Browse files Browse the repository at this point in the history
Some tests require an update rate of 100 which isn't possible
if the default one is at 10.
  • Loading branch information
fmauch committed Oct 16, 2024
1 parent f5f33a7 commit c4022a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ TEST_P(TrajectoryControllerTestParameterized, correct_initialization_using_param
SetUpTrajectoryController(executor);
traj_controller_->get_node()->set_parameter(
rclcpp::Parameter("allow_nonzero_velocity_at_trajectory_end", true));
traj_controller_->get_node()->set_parameter(rclcpp::Parameter("update_rate", 10));

// This call is replacing the way parameters are set via launch
auto state = traj_controller_->configure();
Expand Down Expand Up @@ -1678,9 +1679,7 @@ TEST_P(TrajectoryControllerTestParameterized, test_jump_when_state_tracking_erro
rclcpp::executors::SingleThreadedExecutor executor;
// default if false so it will not be actually set parameter
rclcpp::Parameter is_open_loop_parameters("open_loop_control", false);
rclcpp::Parameter update_rate_param("update_rate", 100);
SetUpAndActivateTrajectoryController(
executor, {is_open_loop_parameters, update_rate_param}, true);
SetUpAndActivateTrajectoryController(executor, {is_open_loop_parameters}, true);

if (traj_controller_->has_position_command_interface() == false)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ class TrajectoryControllerTest : public ::testing::Test
traj_controller_->set_node_options(node_options);

return traj_controller_->init(
controller_name_, urdf, 10, "", traj_controller_->define_custom_node_options());
controller_name_, urdf, 100, "", traj_controller_->define_custom_node_options());
}

void SetPidParameters(double p_value = 0.0, double ff_value = 1.0)
Expand Down

0 comments on commit c4022a2

Please sign in to comment.