diff --git a/example_external/README.md b/example_external/README.md index a34836ee..09fbb164 100644 --- a/example_external/README.md +++ b/example_external/README.md @@ -1,4 +1,9 @@ -# Example: +# Using parameters defined in another package + +This package is a minimal example demonstrating how the parameters defined in `generate_parameter_library/example` +can be used in a different package (i.e. the current one : `generate_parameter_library/example_external`). + +In particular, check the `CMakeLists.txt` file and the `#include` instructions in the source files. ## Build the node @@ -93,7 +98,8 @@ You should see: use_sim_time ``` -All parameter are automatically declared and callbacks are setup by default. You can set a parameter by typing: +All parameters are automatically declared and callbacks are setup by default. +You can set a parameter by typing: `ros2 param set /admittance_controller control.frame.id new_frame` @@ -103,7 +109,8 @@ You should see: Congratulations, you updated the parameter! -If you try to set a parameter that is read only, you will get an error. Running the following +If you try to set a parameter that is read only, you will get an error. +Running the following `ros2 param set /admittance_controller command_interfaces ["velocity"]` diff --git a/example_external/include/generate_parameter_library_example_external/minimal_publisher_external.hpp b/example_external/include/generate_parameter_library_example_external/minimal_publisher_external.hpp index 9a002b7f..cfca521e 100644 --- a/example_external/include/generate_parameter_library_example_external/minimal_publisher_external.hpp +++ b/example_external/include/generate_parameter_library_example_external/minimal_publisher_external.hpp @@ -1,4 +1,4 @@ -// Copyright 2022 PickNik Inc. +// Copyright 2025 Forssea Robotics // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: @@ -10,7 +10,7 @@ // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // -// * Neither the name of the PickNik Inc. nor the names of its +// * Neither the name of Forssea Robotics nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // diff --git a/example_external/src/minimal_publisher_external.cpp b/example_external/src/minimal_publisher_external.cpp index c2b23abb..bf2396b2 100644 --- a/example_external/src/minimal_publisher_external.cpp +++ b/example_external/src/minimal_publisher_external.cpp @@ -1,4 +1,4 @@ -// Copyright 2022 PickNik Inc. +// Copyright 2025 Forssea Robotics // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: @@ -10,7 +10,7 @@ // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // -// * Neither the name of the PickNik Inc. nor the names of its +// * Neither the name of Forssea Robotics nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // diff --git a/parameter_traits/include/parameter_traits/parameter_traits.hpp b/parameter_traits/include/parameter_traits/parameter_traits.hpp index f1e731a9..a44b484e 100644 --- a/parameter_traits/include/parameter_traits/parameter_traits.hpp +++ b/parameter_traits/include/parameter_traits/parameter_traits.hpp @@ -43,8 +43,8 @@ template [[deprecated( "When returning tl::expected you can call fmt::format " "directly.")]] auto -ERROR(const std::string& format, Args... args) - -> tl::expected { +ERROR(const std::string& format, + Args... args) -> tl::expected { return tl::make_unexpected(fmt::format(format, args...)); }