-
Notifications
You must be signed in to change notification settings - Fork 435
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
Allocator template for publish/subscribe pipeline #137
Conversation
Contrary to my expectations, the branch in its current state built on the Windows Jenkins job! |
Well that's exciting. |
I tried to implement a change to Executor where I got rid of MemoryStrategy and replaced with ExecutorRuntimeState, a templated class that keeps track of all the stdlib structures that dynamically change size during the execution path, and inherits from a pure virtual non-templated base class. I ripped out a lot of the functionality of Executor (basically anything that interfaces with the lists and vectors in Executor) and put it in ExecutorRuntimeState. But then I realized it wouldn't compile because a lot of the other entities in rclcpp declare themselves as Back to the drawing board... I'm going to look at how to template the IntraProcessManager next. |
We may be able to get rid of the friend relationships. Don't be afraid to suggest changes in the relationships between objects. |
25fe598
to
b4c7cb1
Compare
I now consider this ready for review. CI jobs: http://ci.ros2.org/job/ros2_batch_ci_linux/488/ |
New code should pass cpplint. Btw. the jobs are failing to compile. |
namespace allocator | ||
{ | ||
|
||
template<typename U, typename Alloc> |
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.
What does the U
stand for? If nothing specific I would recommend to use the common variable T
for template typenames.
Same below.
Another set of CI jobs. I'm going to wait on a clean set of CI before squashing, just in case: http://ci.ros2.org/job/ros2_batch_ci_linux/511/ |
Why do you think the Linux CI job is broken? |
there are two jobs pending that haven't started yet, and they've both been pending for a few minutes. |
This job is currently running on the Linux slave: http://ci.ros2.org/view/packaging/job/ros2_packaging_linux/ |
07ca744
to
b6d2033
Compare
There are a lot of regressions. But many of them exist in the nightly build: http://ci.ros2.org/view/nightly/job/ros2_batch_ci_osx_nightly/94/testReport/ On Linux, the allocator test doesn't work, probably because the backtrace trick only works when the code is compiled in Debug mode. I will change the test so that it fails if the number of allocations during execution per call to "spin" exceeds a set number, which is not as great. I'm not sure where many of the regressions in Windows are coming from: the nightly build has 86 failures and the CI for this branch has 214 failures. I am rerunning Windows CI on default just to compare. |
For some of the failing tests ( |
+1 I just ran this on Windows and the tests pass |
1df0f24
to
142c9ab
Compare
Allocator template for publish/subscribe pipeline
* fix documentation of expand_topic_name() * use expand_topic_name() in pub/sub/client/service * update test expectations * use absolute topic names to avoid mismatch due to expansion * propagate new functions from rcutils error handling * convert given rcl allocator to a rcutils allocator
* ros2GH-118 Make rosbag2::Writer use converters - Use converters in Writer::write() when input rmw serialization format is different from desired storage serialization format - Add new field in rosbag2::StorageOptions to keep track of the rmw format given by the user to store the message in * ros2GH-118 Add --encoding option to ros2 bag record * ros2GH-118 Associate to each topic its rmw_serialization_format - Add 'serialization_format' field to TopicMetadata - Add 'serialization_forat' column in 'topics' table in sqlite storage - Remove 'storage_format' from BagMetadata and use the TopicMetadata field directly, instead - the field 'rmw_serialization_format' has been moved from rosbag2::StorageOptions to rosbag2_transport::RecordOptions, because it's a topic property rather than a storage one. - Currently all topics in a bag file must have the same serialization format - The tests have been updated accordingly * ros2GH-118 Fix tests after rebase * ros2GH-118 Fix MockMetadataIO and use it in test_writer * ros2GH-118 Fix Windows build and minor refactoring * ros2GH-118 Add test for writer to check that error is thrown if converter plugin does not exist * ros2GH-118 Add test to check that metadat_io_ writes metadata file in writer's destructor * ros2GH-118 Build Converter before opening the database in Writer::open() - This assures that if one of the converter plugins does not exist, the database is not created * ros2GH-118 Add end-to-end tests to check graceful failure if converter plugins do not exists - Both a test for record and play has been added * ros2GH-118 Rename 'encoding' CLI option to 'serialization_format' * ros2GH-127 Write serialization format in database also when it's not specified at CLI level - Tests to check that the serialization format is written in the database have also been added. * ros2GH-17 Add leak sanitizer to test - one of the main test goals can only be ssen by valgrind or sanitizers - enable leak sanitizer for gcc builds only (for now) * ros2GH-137: Fix cdr converter plugin - update pluginlib descriptions file after several renames - fix export of missing includes folder * ros2GH-137 Add integration test for cdr converter * ros2GH-137 Fix superfluous printf * ros2GH-137 It suffices to have only one converter test * ros2GH-137 Minor refactoring for better readability of test N.B. This exposes an pre-existing memory leak (not fixed here). * ros2GH-137 Fix memory leak of topic_name - topic_name member needs to be freed - provide a setter for convenience - Directly assigning a string literal in the test is not sufficient as this would be static memory that does not need to be freed. * ros2GH-17 Allow disabling the usage of sanitizers This allows manual usage of valgrind. * ros2GH-17 Fix renaming after rebase * ros2GH-17 Small cleanups (addressing review comments)
…2#137) Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>
This pull request exposes template arguments to Publisher, Subscription, AnySubscriptionCallback, and MappedRingBuffer so that a custom allocator can be passed to these entities.
After this PR is merged, both the intra-process and inter-process pipelines should be set up for real-time safe allocation.