-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internal parameters api #30
Conversation
9e61e0d
to
6c5619f
Compare
Nice. Looks good to me. |
Node::set_parameters_atomically( | ||
const std::vector<rcl_interfaces::Parameter> & parameters) | ||
{ | ||
std::lock_guard<std::mutex> lock(mutex_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@esteve can you explain a little bit why we need a mutex here but not in the other functions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an oversight from me, I'll lock the mutex
to every method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just locked the mutex in every method. Thanks @wjwwood
lgtm |
959c0ff
to
1e51642
Compare
@@ -146,6 +148,24 @@ class Node | |||
FunctorT callback, | |||
rclcpp::callback_group::CallbackGroup::SharedPtr group = nullptr); | |||
|
|||
const std::vector<rcl_interfaces::SetParametersResult> set_parameters( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why return a const non-reference
here? If it can't be a reference what is the purpose of const
then?
if (kv.first.find(prefix + ".") == 0) { | ||
size_t length = prefix.length(); | ||
std::string substr = kv.first.substr(length); | ||
return std::count(substr.begin(), substr.end(), '.') < depth; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line results in a compile warning. @esteve Can you please update it to build without warnings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add spin_some default arg
C clients/services
* ros2GH-23 Get all topics from node and sanitize * ros2GH-23 Move methods to node for better interface * ros2GH-23 Use rmw_serialized_message_t consistently * ros2GH-23 Improve santization of topics * ros2GH-65 Introduce and use better logging macros * ros2GH-23 Use publisher to serialized message directly * ros2GH-23 Improve readability of sanitizing topics and types * ros2GH-23 Allow to write all available topics * ros2GH-23 Add test for record all * ros2GH-23 Cleanup: add missing const ref to record interface * Cleanup for doxygen * Improve topic sanitization - correctly expand topic names using rcl - do not check type correctness (supposed to be done internally) * Pass topic_name by reference
…ackage (ros2#48) * ros2GH-111 Add package for converter plugins * ros2GH-111 Add CDR converter plugin * ros2GH-111 Add test for more primitives types * ros2GH-116 Fix cdr converter after rebase on new converters interface * ros2GH-116 Use rmw_serialize/rmw_deserialize directly in converter and link against rmw_fastrtps_cpp * Fix converter package.xml * Fix clang warnings * ros2GH-30 Change interface to the same convention as rmw_(de)serialize * comply to new rcutils error handling API * use poco to load fastrtps * Update rosbag2_converter_default_plugins/src/rosbag2_converter_default_plugins/cdr/cdr_converter.cpp Co-Authored-By: Karsten1987 <[email protected]>
* ros2GH-112 Open storage for reading handing in rmw_identifier * ros2GH-113 Cleanup: better naming * ros2GH-113 Introduce interface for StorageFactory to allow mocks in tests * ros2GH-113 Add test for SequentialReader for using converters - Added mocks for storage and converters (and factories) * ros2GH-113 Implement skeleton convert function - Use convert only if necessary (different input and output formats), converters are only loaded if really necessary. - Allocate_ros2_message is public to enable extensive tests for this function. - Helper function to get any typesupport by name - Helper function for empty ros2_message * ros2GH-113 Implement allocate_ros2_message - Treats most messages already. - Some combinations of nested messages with arrays are still missing - Cleanup of DynamicArrayNested messages is failing - Main difficulty is the cleanup of the allocated ros2_message which needs to be done manually - The test_ros2_message is intended to be run with valgrind and there should be no leaks or problems with free! * ros2GH-113 Fix DynamicArrayNested deallocation Swapping with empty container seems more stable than deleting the data pointer of the container. * ros2GH-113 Add test for BoundedArrayNested deallocation * ros2GH-113 Refactoring of deallocation code * ros2GH-113 Fix string initialization in all types * ros2GH-113 Fix vector<bool> initialization * ros2GH-113 Add test for deallocation of topic name + Refactoring * ros2GH-113 Minor refactoring of converter * ros2GH-113 Make sure to throw an error if converters do not exist * ros2GH-113 Delete superfluous imports * ros2GH-113 Small fix for deleting vectors * ros2GH-113 Fix build after rebase * ros2GH-30 Minor refactoring - The TODO comments have been removed because they're no longer relevant: they have been discussed in the PR review * ros2GH-30 Give an allocator as parameter to allocate_ros2_message() * ros2GH-111 Add missing test dependencies for CDR converter test * ros2GH-128 Extend message allocation test to also cover big strings - Big strings are not treated with small string optimization and need to be checked, too. * ros2GH-128 Add tests for nested arrays * ros2GH-128 always initialize vectors with a placement new * pass by ref * use new getter functions * consistent function naming * uncrustify * ros2GH-30 Fix windows build * use visibility macros on all functions
This adds the API acting on parameters on instances of nodes.
Connects to ros2/ros2#11
Connects to ros2/ros2#28
@dirk-thomas @tfoote @wjwwood