Commit graph

1185 commits

Author SHA1 Message Date
e57a3a393e WIP: backport message flow tracing to foxy 2025-05-17 14:51:21 +02:00
Dharini Dutia
b0c25d5f22 2.4.3 2023-05-27 02:23:33 +00:00
Dharini Dutia
6a7d35a588 updated changelog
Signed-off-by: Dharini Dutia <dharini@openrobotics.org>
2023-05-27 02:15:41 +00:00
mergify[bot]
9c82f6c925
Do not attempt to use void allocators for memory allocation. (backport #1657) (#2004)
* 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>
2023-05-16 09:54:03 -07:00
mergify[bot]
cb226baa5b
Revert "Revert "extract the result response before the callback is is… (backport #2152) (#2153)
* Revert "Revert "extract the result response before the callback is issued. (#2133)" (#2148)" (#2152)

This reverts commit 19a666f1c9393e86f0f0cc5a8213cbd18b01fc03.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
(cherry picked from commit b2b7bdeac16f6a3bd62d1f03fd18af32d1ba29f6)

* address cpplint error.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>

---------

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
2023-04-03 21:46:35 -07:00
Jacob Perron
11edf82c7d 2.4.2 2022-07-25 12:24:51 -07:00
mergify[bot]
48ec78cb24
Add statistics for handle_loaned_message (backport #1927) (#1934)
* Add statistics for handle_loaned_message (#1927)

Signed-off-by: Barry Xu <barry.xu@sony.com>
(cherry picked from commit 5c688303b3cb994969f448979f64c12971243295)

# Conflicts:
#	rclcpp/include/rclcpp/subscription.hpp

* Fix merge conflicts (#1939)

Signed-off-by: Barry Xu <barry.xu@sony.com>
2022-06-09 11:49:31 -07:00
mergify[bot]
5c1dd19456
Add test-dep ament_cmake_google_benchmark (#1904) (#1910)
Signed-off-by: Gaël Écorchard <gael.ecorchard@cvut.cz>
(cherry picked from commit eac006317692b7eff3aed671eadbff3d72cca098)

Co-authored-by: Gaël Écorchard <galou_breizh@yahoo.fr>
2022-04-25 13:34:30 -07:00
mergify[bot]
15edc93a5f
Use parantheses around logging macro parameter (#1820) (#1823)
* 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>
2022-02-04 16:57:44 -05:00
Jacob Perron
1ea25302c3 2.4.1 2022-01-31 13:58:28 -08:00
Christophe Bedard
7e1740a52b
Fix subscription instrumentation for ConstSharedPtr[WithInfo]Callback (#1872)
Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
2022-01-31 09:27:56 -05:00
mergify[bot]
a8baa3ce88
add node_waitables_ to copy constructor. (backport #1799) (#1834)
* add node_waitables_ to copy constructor.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>

* add node_time_source_ to copy constructor.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>

* add construction_and_destruction_sub_node for action server.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>

Co-authored-by: Abrar Rahman Protyasha <abrar@openrobotics.org>
(cherry picked from commit 301957515a0448de22def36559087b3338c76700)

Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
2021-12-03 16:24:28 -03:00
mergify[bot]
a58f8c1de4
Fix returning invalid namespace if sub_namespace is empty (#1658) (#1811)
* 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>
2021-11-11 09:22:24 -05:00
mergify[bot]
d7804e1b3f
[service] Don't use a weak_ptr to avoid leaking (#1668) (#1669)
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>
2021-10-25 17:07:23 -03:00
mergify[bot]
e70a07d0c0
use dynamic_pointer_cast to detect allocator mismatch in intra process manager (backport #1643) (#1645)
* 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>
2021-10-12 12:23:57 -07:00
George Stavrinos
4859c4e435
Foxy README now points to foxy docs (#1794)
Signed-off-by: George Stavrinos <gstavrinos@protonmail.com>
2021-10-04 08:52:41 -04:00
Jacob Perron
97a852454e 2.4.0 2021-09-01 10:39:37 -07:00
Jacob Perron
c191956f63
Guard against integer overflow in duration conversion (#1584) (#1761)
* 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>
2021-08-31 18:19:42 -07:00
Jacob Perron
c2285c9a40
Update for checking correct variable (#1534) (#1760)
Signed-off-by: Chen Lihui <Lihui.Chen@sony.com>

Co-authored-by: Chen Lihui <lihui.chen@sony.com>
2021-08-31 12:37:51 -07:00
mergify[bot]
92fe787a74
Fix SEGV caused by order of destruction of Node sub-interfaces (#1469) (#1736)
* 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>
2021-08-03 17:03:02 -03:00
Karsten Knese
dc3832c4ec
[Foxy backport] wait for message (#1705) (#1737)
* wait for message (#1705)

* wait for message

Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>

* move to own header file

Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>

* linters

Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>

* add gc for shutdown interrupt

Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>

* mention behavior when shutdown is called

Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>

* check gc

Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>

* change to on_shutdown API for foxy

Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>

* Update rclcpp/include/rclcpp/wait_for_message.hpp

Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>

Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
2021-08-03 12:27:03 -07:00
mergify[bot]
ac3fc4d50f
fix documentation bug (#1719) (#1721)
Signed-off-by: William Woodall <william@osrfoundation.org>
(cherry picked from commit 86c079de3111631d8ae1a42eb40e1dd2f96c016f)

Co-authored-by: William Woodall <william@osrfoundation.org>
2021-07-19 12:07:00 -07:00
Tomoya Fujita
1fff1b7cba
Fix clock thread issue (#1266) (#1267) (#1685)
Signed-off-by: Daisuke Sato <daisukes@cmu.edu>
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>

Co-authored-by: Daisuke Sato <43101027+daisukes@users.noreply.github.com>
2021-06-08 18:07:15 -03:00
Tomoya Fujita
1c92622516
Fix occasionally missing goal result caused by race condition (#1677) (#1682)
* 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>
2021-05-25 10:28:02 -07:00
Kaven Yau
122355704b
Returns CancelResponse::REJECT while goal handle failed to transit to CANCELING state (#1641) (#1659)
Signed-off-by: Kaven Yau <kavenyau@foxmail.com>
2021-05-19 15:22:41 -07:00
hsgwa
d12ed36e89
Allow timers to keep up the intended rate in MultiThreadedExecutor #1516 (#1636)
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>
2021-05-11 15:38:05 -07:00
Kaven Yau
791c23afe5
Fix action server deadlock issue that caused by other mutexes locked in CancelCallback (#1635) (#1654)
Signed-off-by: Kaven Yau <kavenyau@foxmail.com>
2021-05-05 10:28:42 -03:00
Jacob Perron
6ceeff0f0f 2.3.1 2021-04-14 14:17:00 -07:00
shonigmann
6a1b6a3f38
updating quality declaration links (re: ros2/docs.ros2.org#52) (#1616)
Signed-off-by: Simon Honigmann <shonigmann@blueorigin.com>

Co-authored-by: Simon Honigmann <shonigmann@blueorigin.com>
2021-04-02 08:39:34 +02:00
Tomoya Fujita
47f21dab3d
node_handle must be destroyed after client_handle to prevent memory leak (#1562) (#1565)
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
2021-02-28 00:03:32 +09:00
Jacob Perron
8f2809df64
Fix documented example in create_publisher (#1558) (#1559)
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2021-02-24 14:15:51 -08:00
Tomoya Fujita
a2004f8369
Fix runtime error: reference binding to null pointer of type (#1547) (#1548)
* Fix runtime error: reference binding to null pointer of type

Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>

* delete cppcheck v1.89 workaround

Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>
2021-02-11 11:08:16 +09:00
Daisuke Sato
6756ccfb50
Fix action server deadlock (#1285) (#1313) (#1518)
* 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>
2021-01-20 13:51:10 -08:00
Jacob Perron
234b5e423b 2.3.0 2020-12-09 17:43:48 -08:00
Jacob Perron
3dddfd7d93
Reserve vector capacities and use emplace_back for constructing vectors (#1464) (#1489)
* 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>
2020-12-08 14:46:36 -08:00
Jacob Perron
b132a2b0cd
[rclcpp_lifecycle] Change uint8_t iterator variables to size_t (#1461) (#1488)
* 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>
2020-12-08 12:35:37 -08:00
Stephen Brawner
a4fd8ceece
[foxy] Update QD to QL 1 (#1480)
Signed-off-by: Stephen Brawner <brawner@gmail.com>
2020-11-30 14:34:24 -08:00
Scott K Logan
965b4d2c24
Add benchmarks for components (#1479)
Cherry-picked from 08963df92644a5de963d80bd206b4185de77d822

Signed-off-by: Scott K Logan <logans@cottsay.net>
2020-11-25 16:07:50 -08:00
Stephen Brawner
bea9c5a8f6
Benchmark lifecycle features (#1462) (#1471)
* Benchmark lifecycle features

Signed-off-by: Stephen Brawner <brawner@gmail.com>

* Cleanup

Signed-off-by: Stephen Brawner <brawner@gmail.com>
2020-11-22 19:30:28 -08:00
Scott K Logan
3497650ee2 Add performance tests for parameter transport (#1470)
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>
2020-11-20 21:23:15 -08:00
Scott K Logan
17847ee90a Add benchmarks for node parameters interface (#1470)
Cherry-pick from dd0f97f1790de0384caeeb94a7c1c49e4b9f08ed

Signed-off-by: Scott K Logan <logans@cottsay.net>
2020-11-20 21:23:15 -08:00
Jacob Perron
46ec8bb5df
Fix NodeOptions copy constructor (#1376) (#1451)
* 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>
2020-11-11 10:15:27 -08:00
Jacob Perron
4cc446d9a2
Avoid reference cycle to fix memory leak (#1301) (#1450)
Signed-off-by: Chen Lihui <Lihui.Chen@sony.com>

Co-authored-by: Chen Lihui <lihui.chen@sony.com>
2020-11-11 09:38:46 -08:00
Louise Poubel
6820dac315
Bump rclcpp packages to Quality Level 2 (#1445) (#1446)
Signed-off-by: Louise Poubel <louise@openrobotics.org>
2020-11-09 18:37:16 -08:00
brawner
29cfc45e81 Add rclcpp_action action_server benchmarks (#1433)
* Add rclcpp_action action_server benchmarks

Signed-off-by: Stephen Brawner <brawner@gmail.com>

* Address cancel bug

Signed-off-by: Stephen Brawner <brawner@gmail.com>

* Fix errors

Signed-off-by: Stephen Brawner <brawner@gmail.com>

* Fix clang error

Signed-off-by: Stephen Brawner <brawner@gmail.com>
2020-11-06 16:34:23 -08:00
brawner
5607c3242d Benchmark rclcpp_action action_client (#1429)
* Benchmark rclcpp_action action_client

Signed-off-by: Stephen Brawner <brawner@gmail.com>

* Bump timeout

Signed-off-by: Stephen Brawner <brawner@gmail.com>
2020-11-06 16:34:23 -08:00
Dirk Thomas
c277b4c8bb increase test timeout necessary for Connext (#1256)
* 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>
2020-11-06 16:34:23 -08:00
Alejandro Hernández Cordero
d65bc667fa Added executor benchmark tests (#1413)
* Added executor benchmark tests

Signed-off-by: ahcorde <ahcorde@gmail.com>

* make linters happy

Signed-off-by: ahcorde <ahcorde@gmail.com>

* initialize callback_count

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Added feddback

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Added feedback

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Added add_node and remove_node benchmark tests

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Add/remove node in static_single_thread_executor

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Make linters happy

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Added StaticSingleThreadedExecutor add/remove node tests

Signed-off-by: ahcorde <ahcorde@gmail.com>

* make linters happy

Signed-off-by: ahcorde <ahcorde@gmail.com>
2020-11-06 15:05:07 -08:00
brawner
37415670c6 Add service and client benchmarks (#1425)
* 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>
2020-11-06 13:36:12 -08:00
brawner
1c22d6b2c4 Set CMakeLists to only use default rmw for benchmarks (#1427)
* 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>
2020-11-06 11:14:48 -08:00