Skip to content

Commit

Permalink
Small fixes of pid_controller for compilation.
Browse files Browse the repository at this point in the history
  • Loading branch information
destogl committed Nov 29, 2022
1 parent c28a4c9 commit 5120bb3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
3 changes: 2 additions & 1 deletion pid_controller/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ set(THIS_PACKAGE_INCLUDE_DEPENDS
control_msgs
controller_interface
hardware_interface
parameter_traits
pluginlib
rclcpp
rclcpp_lifecycle
Expand Down Expand Up @@ -117,7 +118,7 @@ ament_export_include_directories(
include
)
ament_export_dependencies(

${THIS_PACKAGE_INCLUDE_DEPENDS}
)
ament_export_libraries(
pid_controller
Expand Down
9 changes: 1 addition & 8 deletions pid_controller/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,15 @@
<build_depend>generate_parameter_library</build_depend>

<depend>control_msgs</depend>

<depend>controller_interface</depend>

<depend>hardware_interface</depend>

<depend>parameter_traits</depend>
<depend>pluginlib</depend>

<depend>rclcpp</depend>

<depend>rclcpp_lifecycle</depend>

<depend>realtime_tools</depend>

<depend>std_srvs</depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_cmake_gmock</test_depend>
<test_depend>controller_manager</test_depend>
<test_depend>hardware_interface</test_depend>
Expand Down
8 changes: 7 additions & 1 deletion pid_controller/src/pid_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,18 @@ controller_interface::CallbackReturn PidController::configure_parameters()
std::make_shared<control_toolbox::PidROS>(get_node(), "gains." + params_.dof_names[i]);
pids_[i]->initPid();
}

return CallbackReturn::SUCCESS;
}

controller_interface::CallbackReturn PidController::on_configure(
const rclcpp_lifecycle::State & /*previous_state*/)
{
configure_parameters();
auto ret = configure_parameters();
if (ret != CallbackReturn::SUCCESS)
{
return ret;
}

// topics QoS
auto subscribers_qos = rclcpp::SystemDefaultsQoS();
Expand Down

0 comments on commit 5120bb3

Please sign in to comment.