Commit graph

1176 commits

Author SHA1 Message Date
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
brawner
9f2f754029 Initial benchmark tests for rclcpp::init/shutdown create/destroy node (#1411)
* Initial benchmark tests for rclcpp::init/shutdown create/destroy node

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

* Pr feedback

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

* Fixes to cmakelists

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

* Remove quotes

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

* Move find_package calls

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

* Skip create/destroy node for rmw_connext_cpp

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

* SKIP TEST in cmakelists

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

* Add warmup loops

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

* remove for loop

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

* reset_heap_counters

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

* Change to make_shared

Signed-off-by: Stephen Brawner <brawner@gmail.com>
2020-11-06 11:14:48 -08:00
Jacob Perron
0e8450940f
Use global namespace for parameter events subscription topic (#1257) (#1261)
Similar to https://github.com/ros2/rclcpp/pull/929, but for the subscription.

This fixes an issue listening to parameter events from a remote node when the local node has a different namespace.
Originally reported here: https://answers.ros.org/question/358170/parameter-events-on-foxy/

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2020-11-06 09:37:02 -08:00
brawner
7266e67683
[foxy backport] Refactor test CMakeLists.txt (#1422) and moving rosidl_generate_interfaces_call (#1424) (#1437)
* Refactor test CMakeLists in prep for benchmarks (#1422)

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

* Address #1423 by moving rosidl_generate_interfaces call (#1424)

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

* Remove rolling-only tests

Signed-off-by: Stephen Brawner <brawner@gmail.com>
2020-11-06 09:27:25 -08:00
Dirk Thomas
d04ec4bf80 fix race in test_lifecycle_service_client (#1204)
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
2020-11-03 19:35:22 +01:00
brawner
e920175dae Increase test coverage of rclcpp_lifecycle to 96% (#1298)
* Increase test coverage of rclcpp_lifecycle to 96%

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

* PR Fixup

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

* test_depend

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

* rcutils test_depend

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

* More windows warnings

Signed-off-by: Stephen Brawner <brawner@gmail.com>
2020-11-03 19:35:22 +01:00
Alejandro Hernández Cordero
ed7a23731a Added missing tests for rclcpp lifecycle (#1240)
* Added missing test rclcpp lifecycle
 - remove_on_set_parameters_callback
 - notify_graph_change
 - get_service_names_and_types_by_node

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

* omit the name of the argument in lambda function

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

* Added feedback

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

* Added feedback

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

* Removed extra line

Signed-off-by: ahcorde <ahcorde@gmail.com>
2020-11-03 19:35:22 +01:00
Alejandro Hernández Cordero
85235938f6
Update tracetools' QL in rclcpp's QD (#1428) (#1430)
Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>

Co-authored-by: Christophe Bedard <bedard.christophe@gmail.com>
2020-10-29 14:43:43 -07:00
ahcorde
f357033ad7 udpate QD links to foxy
Signed-off-by: ahcorde <ahcorde@gmail.com>
2020-10-28 09:17:36 +01:00
brawner
bee4b760fb Add coverage statement (#1367)
Signed-off-by: Stephen Brawner <brawner@gmail.com>
2020-10-28 09:17:36 +01:00