* Do not attempt to use void allocators for memory allocation. (#1657)
Keep a rebound allocator for byte-sized memory blocks around
for publisher and subscription options.
Follow-up after 1fc2d58799a6d4530522be5c236c70be53455e60
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
(cherry picked from commit 0659d829cec5a39c6ad861d597b4aa9aee224a25)
# Conflicts:
# rclcpp/include/rclcpp/publisher_options.hpp
# rclcpp/include/rclcpp/subscription_options.hpp
* fix conflicts
Signed-off-by: Dharini Dutia <dharini@openrobotics.org>
---------
Signed-off-by: Dharini Dutia <dharini@openrobotics.org>
Co-authored-by: Michel Hidalgo <michel@ekumenlabs.com>
Co-authored-by: Dharini Dutia <dharini@openrobotics.org>
* Use parantheses around logging macro parameter
This allows the macro to expand "correctly", i.e. macro argument
expression is fully evaluated before use.
Signed-off-by: Abrar Rahman Protyasha <aprotyas@u.rochester.edu>
* Remove redundant parantheses around macro param
`decltype(X)` already provides sufficient "scoping" to the macro
parameter `X`.
Signed-off-by: Abrar Rahman Protyasha <aprotyas@u.rochester.edu>
* Add test case for expressions as logging param
Signed-off-by: Abrar Rahman Protyasha <aprotyas@u.rochester.edu>
(cherry picked from commit f7bb88fc8fabcaf5008dfe87b5aec7d2269ba147)
Co-authored-by: Abrar Rahman Protyasha <aprotyas@u.rochester.edu>
* Create valid effective namespace when sub-namespace is empty
Fix#1656.
Signed-off-by: Markus Hofstaetter <markus.hofstaetter@ait.ac.at>
* Add regression test for effective namespace and empty sub-namespace
Adds regression test for #1656.
Signed-off-by: Markus Hofstaetter <markus.hofstaetter@ait.ac.at>
(cherry picked from commit 3cddb4edab317758dc8a8cac94b90794641c7488)
Co-authored-by: M. Hofstätter <markus.hofstaetter@gmx.net>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
(cherry picked from commit d488535f366f9f59d3f72f6e15d1b5258c7d63c6)
# Conflicts:
# rclcpp/include/rclcpp/service.hpp
Co-authored-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
* use dynamic_pointer_cast to detect allocator mismatch in intra process manager (#1643)
* use dynamic_pointer_cast to detect allocator mismatch in intra process manager
Signed-off-by: William Woodall <william@osrfoundation.org>
* add test case for mismatched allocators
Signed-off-by: William Woodall <william@osrfoundation.org>
* forward template arguments to avoid mismatched types in intra process manager
Signed-off-by: William Woodall <william@osrfoundation.org>
* style fixes
Signed-off-by: William Woodall <william@osrfoundation.org>
* refactor to test message address and count, more DRY
Signed-off-by: William Woodall <william@osrfoundation.org>
* update copyright
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix typo
Signed-off-by: William Woodall <william@osrfoundation.org>
Co-authored-by: Michel Hidalgo <michel@ekumenlabs.com>
Co-authored-by: Michel Hidalgo <michel@ekumenlabs.com>
(cherry picked from commit 79c2dd8e8b3e73366c59474b91271a2fd57954bc)
# Conflicts:
# rclcpp/include/rclcpp/experimental/intra_process_manager.hpp
* fix conflicts
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
* cpp14 compatibility
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
* More cpp14 compat
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
* fix
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
* Fix bug
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Co-authored-by: William Woodall <william@osrfoundation.org>
Co-authored-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
* Guard against integer overflow in duration conversion (#1584)
Guard against overflow when converting from rclcpp::Duration to builtin_interfaces::msg::Duration,
which is a unsigned to signed conversion.
Use non-std int types for consistency
Handle large negative values
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Fix test
rclcpp::Duration::from_nanoseconds is not available in Foxy.
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* added tear-down of node sub-interfaces in reverse order of their creation (#1469)
Signed-off-by: Colin MacKenzie <colin@flyingeinstein.com>
* added name of service to log message for leak detection. Previously it gave no indication of what node is causing the memory leak (#1469)
Signed-off-by: Colin MacKenzie <colin@flyingeinstein.com>
(cherry picked from commit b9ffd72f42ae44352256f2eab585299bf85c6346)
Co-authored-by: Colin MacKenzie <guru-florida@users.noreply.github.com>
Signed-off-by: William Woodall <william@osrfoundation.org>
(cherry picked from commit 86c079de3111631d8ae1a42eb40e1dd2f96c016f)
Co-authored-by: William Woodall <william@osrfoundation.org>
* Fix occasionally missing goal result caused by race condition
Signed-off-by: Kaven Yau <kavenyau@foxmail.com>
* Take action_server_reentrant_mutex_ out of the sending result loop
Signed-off-by: Kaven Yau <kavenyau@foxmail.com>
* add note for explaining the current locking order in server.cpp
Signed-off-by: Kaven Yau <kavenyau@foxmail.com>
Co-authored-by: Kaven Yau <kavenyau@foxmail.com>
Backports #1516 and follow-up fix#1628
Patched to keep ABI compatibility by using static class variables to store the mutex two priorities instances.
Signed-off-by: hsgwa <hasegawa@isp.co.jp>
* Add missing locking to the rclcpp_action::ServerBase. (#1421)
This patch actually does 4 related things:
1. Renames the recursive mutex in the ServerBaseImpl class
to action_server_reentrant_mutex_, which makes it a lot
clearer what it is meant to lock.
2. Adds some additional error checking where checks were missed.
3. Adds a lock to publish_status so that the action_server
structure is protected.
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
* [backport] Fix action server deadlock (#1285, #1313)
Signed-off-by: Daisuke Sato <daisukes@cmu.edu>
* revert comment
Signed-off-by: Daisuke Sato <daisukes@cmu.edu>
Co-authored-by: Chris Lalancette <clalancette@openrobotics.org>
* Reserve vector capacities and use emplace_back for constructing vectors
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Use resize instead of reserve
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Remove push_back
Signed-off-by: Stephen Brawner <brawner@gmail.com>
Co-authored-by: brawner <brawner@gmail.com>
* Change uint8_t iterator variables to size_t
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Change to unsigned int
Signed-off-by: Stephen Brawner <brawner@gmail.com>
Co-authored-by: brawner <brawner@gmail.com>
Note that these tests are written without using
performance_test_fixture. Because the parameter server is running in the
same process, any allocations happening in the spin thread for the
server get picked up by the allocation statistics even though those
functions aren't invoked in the tests.
If we can find a way to turn off the memory tracking on a per-thread
basis, we can enable memory tracking. Until then, leaving the memory
statistics enabled could be misleading.
Cherry-picked from f5e35bda86c1d95cf0296bb4f756d3bb63781d97
Signed-off-by: Scott K Logan <logans@cottsay.net>
* Fix NodeOptions copy constructor (#1376)
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
* Remove rosout_qos assignment
Not applicable in Foxy.
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Co-authored-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
* increase test timeout necessary for Connext
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
* revert changes overlapping with another PR
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
* Add service and client benchmarks
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Style
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Uncrustify
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Set CMakeLists to only use default rmw for benchmarks
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Add comment
Signed-off-by: Stephen Brawner <brawner@gmail.com>