Commit graph

220 commits

Author SHA1 Message Date
79e07924d6 WIP: backport message flow tracing to foxy 2025-05-17 14:18:04 +02:00
Jacob Perron
c12abc5698 0.7.11 2022-09-20 13:21:14 -07:00
Jacob Perron
6d6b78f28d
Handle allocation errors during message deserialization (#313) (#419)
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
Co-authored-by: Michel Hidalgo <michel@ekumenlabs.com>
2022-09-20 13:17:30 -07:00
Tully Foote
440b191ae6
Merge pull request #422 from ros2/mergify/bp/foxy/pr-410
Adds topic name to error msg when create_topic fails (backport #410)
2022-09-16 13:40:08 -07:00
Voldivh
28fb2bde43 Makes topic_name a const ref
Signed-off-by: Voldivh <eloyabmfcv@gmail.com>
(cherry picked from commit df27babd11d1a655d60ce9c5a4363f79ea8d6cf5)
2022-09-15 21:22:19 +00:00
Voldivh
83df716b61 Adds topic name to error msg when create_topic fails
Signed-off-by: Voldivh <eloyabmfcv@gmail.com>
(cherry picked from commit a38a28d748e436e51540c567f506bb59f7577248)
2022-09-15 21:22:18 +00:00
Jacob Perron
f93a32c6fb 0.7.10 2022-09-12 16:53:16 -07:00
Jacob Perron
18b0eb38cf
Remove all GitHub CI jobs (#414) (#417)
Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>

Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>

Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
Co-authored-by: Christophe Bedard <christophe.bedard@apex.ai>
2022-09-01 19:59:21 -07:00
Tully Foote
97ae262422
Merge pull request #408 from ros2/mergify/bp/foxy/pr-405
Improve error message when create_topic fails (backport #405)
2022-08-31 17:56:34 -07:00
Shane Loretz
2e5c950eb4 Improve error message when create_topic fails (#405)
* Improve error message when create_topic fails

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>

* Grammar

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
(cherry picked from commit 0898d191c14d7b84f438c445d4d92d586bd91225)
2022-08-23 23:01:04 +00:00
Jacob Perron
d83b3f3903 0.7.9 2022-07-25 12:30:40 -07:00
mergify[bot]
410aa61d81
Fix the history depth for KEEP_ALL. (#305) (#394)
The comment in the code explains it in a lot more detail, but
essentially this avoids a signed/unsigned mismatch in higher
level code.  Since the depth is meaningless in KEEP_ALL anyway,
this shouldn't have any deleterious effects elsewhere.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
(cherry picked from commit d5980d5a8fb753d2d7074c635426b9a2805928ba)

Co-authored-by: Chris Lalancette <clalancette@openrobotics.org>
2022-06-02 11:09:30 -03:00
Jacob Perron
517fd655bd 0.7.8 2022-02-04 08:31:08 -08:00
Jacob Perron
ef8d7532dc
Free with the same allocator in rmw_destroy_node (#355) (#369)
Since rmw_allocate() was used to allocate memory, we should use rmw_free() to cleanup.
Otherwise, if the user provided a custom allocator to the context we will be calling deallocate with the wrong allocator.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2022-02-04 08:24:57 -08:00
Jacob Perron
fea44ac445 0.7.7 2021-08-31 17:51:57 -07:00
mergify[bot]
1a9d4f3b92
rmw_cyclonedds_cpp/CMakeLists.txt: add -latomic for RISC-V (#332) (#333)
(cherry picked from commit 91646cedfc368e29ab7e8f70cbf77aa1e354b5c4)

Co-authored-by: guillaume-pais-siemens <79512275+guillaume-pais-siemens@users.noreply.github.com>
2021-08-30 13:58:51 -03:00
Jacob Perron
c843299592 0.7.6 2020-12-08 11:49:19 -08:00
Ivan Santiago Paunovic
c8b34e3ddb
Delete problematic assert in rmw_init() (#265)
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
2020-11-03 12:46:30 -03:00
Michel Hidalgo
26b69c70fe Fix context cleanup. (#227)
Drop invalid pointers.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
2020-10-30 23:51:57 +01:00
ahcorde
0313888422
0.7.5 2020-10-15 15:46:42 +02:00
ahcorde
aedf98e260
changelog
Signed-off-by: ahcorde <ahcorde@gmail.com>
2020-10-15 15:46:24 +02:00
Dan Rose
2477456a3c Suppress cppcheck unknownMacro (#237)
Fast forward to https://github.com/ament/ament_lint/pull/268

This suppresses a defect in `ament_cppcheck` - namely that if a macro is missing, it fails loudly. This is compounded by fact that `ament_cppcheck` does not include all dependent headers, so macros are likely to be missing in the first place.

Signed-off-by: Dan Rose <dan@digilabs.io>
2020-10-15 15:45:20 +02:00
ahcorde
cd445cd1ef Update Github actions
Signed-off-by: ahcorde <ahcorde@gmail.com>
2020-10-15 15:45:20 +02:00
ahcorde
04039b5508 Fixed cppcheck issue
Signed-off-by: ahcorde <ahcorde@gmail.com>
2020-10-15 15:45:20 +02:00
ahcorde
021f5e422b Updated Github Actions
Signed-off-by: ahcorde <ahcorde@gmail.com>
2020-10-15 15:45:20 +02:00
Michel Hidalgo
b8620312dc Update service/client construction/destruction API return codes. (#247)
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
2020-10-15 15:45:20 +02:00
Alejandro Hernández Cordero
6a8004e033 Return RMW_RET_UNSUPPORTED in rmw_get_serialized_message_size (#250)
Signed-off-by: ahcorde <ahcorde@gmail.com>
2020-10-15 15:45:20 +02:00
Jose Tomas Lorente
fb175f74db Update service/client request/response API error returns (#249)
Signed-off-by: lobotuerk <jtlorente@ekumenlabs.com>
2020-10-15 15:45:20 +02:00
Alejandro Hernández Cordero
a197914d31 Updated rmw_* return codes (#246)
* Updated rmw_*_*_allocation return codes

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

* Fixed return codes in rmw_*

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

* Improved return error in rmw_wait

Signed-off-by: ahcorde <ahcorde@gmail.com>
2020-10-15 15:45:20 +02:00
Michel Hidalgo
6bc75b4a49 Update gid API return codes. (#244)
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
2020-10-15 15:45:20 +02:00
Michel Hidalgo
914037bd29 Update graph API return codes. (#243)
This patch affects:
- rmw_get_node_names()
- rmw_get_node_names_with_enclaves()
- rmw_get_topic_names_and_types()
- rmw_get_service_names_and_types()
- rmw_get_publishers_info_by_topic()
- rmw_get_subscriptions_info_by_topic()
- rmw_get_subscriber_names_and_types_by_node()
- rmw_get_publisher_names_and_types_by_node()
- rmw_get_service_names_and_types_by_node()
- rmw_get_client_names_and_types_by_node()
- rmw_count_publishers()
- rmw_count_subscribers()

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
2020-10-15 15:45:20 +02:00
Michel Hidalgo
c65c015682 Check for message_info on take where appropriate. (#245)
Fix for regression introduced in #241.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
2020-10-15 15:45:20 +02:00
Jose Tomas Lorente
4682af41c5 Updated error returns on rmw_take_serialized and with_message_info (#242)
Signed-off-by: lobotuerk <jtlorente@ekumenlabs.com>
2020-10-15 15:45:20 +02:00
Jose Tomas Lorente
966035ade4 Updated error returns on rmw_take (#241)
Signed-off-by: lobotuerk <jtlorente@ekumenlabs.com>
2020-10-15 15:45:20 +02:00
Lobotuerk
c610402b46 Update rmw_publish_serialized_message() error returns (#240)
Signed-off-by: lobotuerk <jtlorente@ekumenlabs.com>
2020-10-15 15:45:20 +02:00
Lobotuerk
3160c181f7 Update rmw_publish() error returns (#239)
Signed-off-by: lobotuerk <jtlorente@ekumenlabs.com>
2020-10-15 15:45:20 +02:00
Michel Hidalgo
16e27f6504 Ensure compliant matched pub/sub count API. (#223)
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
2020-10-15 15:45:20 +02:00
Michel Hidalgo
ba077ce061 Change RET_WRONG_IMPLID() to return RMW_RET_INCORRECT_IMPLEMENTATION (#226)
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
2020-10-15 15:45:20 +02:00
Michel Hidalgo
aa4ee36aff Fix bad conditional in rmw_serialize(). (#217)
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
2020-10-15 15:45:20 +02:00
Michel Hidalgo
bc2bc9ef1b Ensure compliant subscription API. (#214)
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
2020-10-15 15:45:20 +02:00
Michel Hidalgo
398812c12d Ensure compliant publisher API (#210)
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
2020-10-15 15:45:20 +02:00
Michel Hidalgo
3d03bf6c53 Ensure compliant node construction/destruction API. (#206)
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
2020-10-15 15:45:20 +02:00
Michel Hidalgo
5930ea020c Amend rmw_init() implementation: require enclave. (#204)
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
2020-10-15 15:45:20 +02:00
Michel Hidalgo
7eff1eab55 Ensure compliant init/shutdown API implementations. (#202)
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
2020-10-15 15:45:20 +02:00
Michel Hidalgo
f7fcf88bb4 Ensure compliant init options API implementations. (#200)
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
2020-10-15 15:45:20 +02:00
Michel Hidalgo
cab4b81278 Finalize context iff shutdown. (#196)
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
2020-10-15 15:45:20 +02:00
Jacob Perron
5559dfa221 0.7.4 2020-10-07 10:28:11 -07:00
Jacob Perron
6f9a61474f
rmw_destroy_node must remove node from graph cache (#252)
Signed-off-by: Erik Boasson <eb@ilities.com>

Co-authored-by: Erik Boasson <eb@ilities.com>
2020-10-06 09:49:16 -07:00
Jacob Perron
e0bfe46474 0.7.3 2020-07-21 16:47:18 -07:00
Jacob Perron
5333ab6be7
Lost service responses (#183, #74) (#187) (#209)
* Block rmw_send_response if response reader unknown

The client checks using rmw_service_server_is_available whether the
request it sends will be delivered to service, but that does not imply
that the (independent, as far as DDS is concerned) response reader of
the client has been discovered by the service.  Usually that will be the
case, but there is no guarantee.

Ideally DDS would offer an interface that allows checking the reverse
discovery, but that does not yet exist in either the specification or in
Cyclone.  This commit works around that by delaying publishing the
response until the number of request writers matches the number of
response readers.

Signed-off-by: Erik Boasson <eb@ilities.com>

* Change request headers to use rmw_request_id_t on the wire

Signed-off-by: Erik Boasson <eb@ilities.com>

* Precise check for matched client/service

Assign a unique identifier to each client/service on creation, add it
to the USER_DATA QoS of the reader and writer and use it for the request
ids.  This allows:

* rmw_service_server_is_available to only return true once it has
  discovered a reader/writer pair of a single service (rather than a
  reader from some service and a writer from some service); and
* rmw_send_response to block until it has discovered the requesting
  client's response reader and to abandon the operation when the client
  has disappeared.

The USER_DATA is formatted in the same manner as the participant
USER_DATA, this uses the keys "serviceid" and "clientid".

This is still but a workaround for having a mechanism in DDS to ensure
that the response reader has been discovered prior by the request writer
prior to sending the request.

Signed-off-by: Erik Boasson <eb@ilities.com>

* Address review comments

Signed-off-by: Erik Boasson <eb@ilities.com>

* Backwards compatibility

* Revert commit fb040c5db6c05be7698f05969f9bb48b8740f0fe to retain the
  old wire representation;

* Embed the publication_handle of the request inside rmw_request_id_t,
  possible because reverting to the old wire representation frees up
  enough space, and use this in rmw_send_response to check for the
  presence of the client's reader;

* Clients and services without a client/service id in the reader/writer
  user data are treated as fully matched at all times.

* Replace ERROR by FAILURE to because of windows.h

Signed-off-by: Erik Boasson <eb@ilities.com>

* Timeout rmw_send_response after waiting 100ms for discovery

The discovery will eventually result in the client's reader being known
or its writer no longer being known, so a timeout is not necessary for
correctness.  However, if it ever were to block for a longish
time (which is possible in the face of network failures), returning a
timeout to the caller is expected to result in less confusion.

Signed-off-by: Erik Boasson <eb@ilities.com>

* Make iterators "const auto &"

Signed-off-by: Erik Boasson <eb@ilities.com>

* Add TODO for eliminating rmw_send_response blocking

Signed-off-by: Erik Boasson <eb@ilities.com>

Co-authored-by: eboasson <eb@ilities.com>
2020-07-21 16:19:35 -07:00