Commit Graph

994 Commits

Author SHA1 Message Date
Chris Lalancette 3e795547d4 10.0.0 2025-07-01 15:43:10 +00:00
Chris Lalancette 8ac0312ccd Changelog.
Signed-off-by: Chris Lalancette <clalancette@gmail.com>
2025-07-01 15:43:00 +00:00
Nadav Elkabets 4859c8a83c
Feature: add logger_name property to subscription, publisher, service and client (#1471)
Signed-off-by: Nadav Elkabets <elnadav12@gmail.com>
Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
2025-06-24 16:06:51 +02:00
Michael Carlstrom 8dd9417c5b
Update `test_node` Types (#1464)
* Update test_node types

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* don't attempt to use typevar defaults

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

---------

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
2025-06-22 20:06:29 -07:00
Jean Paul 684bb13fbf
Add method that get datetime.datetime from Time (#1443)
Signed-off-by: Jean Paul Sierra Boom <jeanpaulsierraboom@gmail.com>
Signed-off-by: Jean Paul <88939729+JeanPaulSB@users.noreply.github.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
2025-06-10 07:45:40 -07:00
Tomoya Fujita 4c1a7dfab0
add `MessageInfo.publisher_gid` (#1466)
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
2025-06-05 13:31:35 +02:00
Michael Carlstrom 006dec6636
Add types to `test_action_*.py` (#1444)
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
2025-06-01 11:13:55 -07:00
Tomoya Fujita a7c8631c7a
Revert "Fix Duration, Clock, and QoS Docs (#1428)" (#1447)
This reverts commit 59671a0b4a.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
2025-05-09 12:24:40 -07:00
Tomoya Fujita 587e4ccbaf
remove all deprecated classes and methods (#1456)
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
2025-05-09 13:13:12 +02:00
Alon Borenshtein 3414456dda
[rclpy] Fix spin() incorrectly removing node from executor if already attached (#1446)
Signed-off-by: Alon <alonborn@gmail.com>
2025-04-29 09:37:18 -07:00
Scott K Logan 4daae24f4d
9.2.0 2025-04-25 15:25:25 -05:00
Scott K Logan 6ff040750c
9.1.0 2025-04-18 16:08:31 -05:00
Michael Carlstrom b74d0a787b
Update parameter types (#1441)
* Update Parameter types

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Undo unecssary change

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

---------

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
2025-04-14 11:41:33 -07:00
Zahi Kakish f9646678a8
Add TypeError string arg for better clarity (#1442)
Signed-off-by: Zahi Kakish <zkakish@gmail.com>
2025-04-07 13:18:54 -07:00
Tomoya Fujita 3f9111aca8
fix loading parameter behavior from yaml file. (#1193)
* fix loading parameter behavior from yaml file.

  Ref: https://github.com/ros2/ros2cli/issues/863

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

* remove debug print.

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

* address review comments.

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

* address flake8 warnings.

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

---------

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
2025-04-05 11:50:57 -07:00
Michael Carlstrom c489ab80c3
Update `lifecycle` types (#1440)
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
2025-04-02 15:34:45 -07:00
Michael Carlstrom 0dda6bc777
Update _rclpy_pybind11.pyi (#1436)
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
2025-04-01 20:28:20 -07:00
Tomoya Fujita f6dc98939b
remove .github/ISSUE_TEMPLATE.md (old version of templates) (#1439)
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
2025-03-31 13:42:44 -07:00
Michael Carlstrom c34b90f345
Update Clock Types (#1433)
* init

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Add types around clock objects

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

---------

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
2025-03-24 22:19:54 -07:00
Brad Martin 4c05d92a62
Introduce EventsExecutor implementation (#1391)
* Introduce EventsExecutor implementation (#1389)

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Fix explosion for reference count updates without GIL

The previous version worked on 22.04+Iron, but fails on 24.04+Jazzy or Rolling.  It
seems like the behavior of std::bind() may have changed when asked to bind a py::object
to a callback taking a py::handle.

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Fix ament linter complaints

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Switch to non-boost asio library

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Use internal _rclpy C++ types instead of jumping through Python hoops

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Reformat with clang-format, then uncrustify again

clang-format fixes things that uncrustify tends to leave alone, but then uncrustify seems slightly
unhappy with that result.  Also reflow comments at 100 columns.

This uses the .clang-format file from the ament-clang-format package, with the exception of
SortIncludes being set to false, because I didn't like what it tried to do with includes without
that override.

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Respect init signal handling options

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Reconcile signal handling differences with SingleThreadedExecutor

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* test_executor.py: Add coverage for EventsExecutor

Tests that currently work are enabled, and those that don't are annotated what needs to be done before they can be enabled

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Make spin_once() only return after a user-visible callback

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Add get_nodes() method

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Add context management support

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Remove mutex protection on nodes_ member access

It was being used only inconsistently, and on reflection it wasn't adding any protection beyond what
the GIL already provides.

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Fix deadlock during shutdown()

Needed to release the GIL while blocking on another lock.

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* A little further on using C++ _rclpy types instead of Python interface

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Fix issue with iterating through incomplete Tasks

Never bool-test a py::object::attr() return value without an explicit py::cast<bool>.

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Add support for coroutines to timer handling

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Fix test_not_lose_callback() test to destroy entities properly

EventsExecutor was exploding because the test was leaving destroyed entities in the node by using an
incorrect API to destroy them.

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Correct test that wasn't running at all, and remove EventsExecutor from it

* Test methods need to be prefixed with 'test_' in order to function.  This had been entirely dead
  code, and when I enabled it EventsExecutor deadlocked.

* On reflection, it seems like a deadlock is exactly what should be expected from what this test is
  doing.  Remove EventsExecutor from the test and document the problem.

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Warn on every timer added over the threshold, not just the first

Co-authored-by: Janosch Machowinski <jmachowinski@users.noreply.github.com>
Signed-off-by: Brad Martin <52003535+bmartin427@users.noreply.github.com>

* Keep rcl_timer_call() tightly coupled with user callback dispatch

This both prevents an issue where user callbacks could potentially queue up if they didn't dispatch
fast enough, and ensures that a timer that has passed its expiration without being dispatched yet
can still be canceled without the user callback being delivered later.

This commit also makes use of the new rcl API for querying the absolute timer expiration time,
instead of the relative number of nanoseconds remaining until it expires.  This should both make
things more accurate, and potentially reduce overhead as we don't have to re-query the current time
for each outstanding timer.

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Protect against deferred method calls happening against a deleted ClockManager

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Add support for new TimerInfo data passed to timer handlers

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Simplify spin_once() implementation

This both reduces duplicate code now, and simplifies the asio interface used which would need
replacing.

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Fix stale Future done callbacks with spin_until_future_complete()

This method can't be allowed to leave its Future done callback outstanding in case the method is
returning for a reason other than the Future being done.

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Use existing rclpy signal handling instead of asio

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Replace asio timers with a dedicated timer wait thread

This is dumb on its own, but it helps me move towards eliminating asio.

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Correct busy-looping in async callback handling

This isn't ideal because there are some ways async callbacks could become unblocked which wouldn't
get noticed right away (if at all); however this seems to match the behavior of
SingleThreadedExecutor.

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Replace asio::io_context with a new EventsQueue object

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Add EventsExecutor to new test_executor test from merge

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Swap 'pragma once' for ifndef include guards

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Add test coverage for Node.destroy_subscription()

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Replace '|' type markup with typing.Optional and typing.Union

Python 3.9, still used by RHEL 9, doesn't seem to understand '|' syntax, and
Optional/Union seems to be what gets used throughout the rest of the codebase.

Additionally, fix a couple other mypy nits:
 * mypy is mad that I haven't explicitly annotated every __init__ as returning None
 * mypy wants generic arguments to service and action clients now

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Use 'auto' in place of explicit return type on hash

pybind11::hash() is documented as returning ssize_t, but this seems to be a lie because MSVC
doesn't understand that type; so, let's just return whatever we do get.

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Change initialization of struct members

MSVC didn't like the more concise method.

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Use subTest in test_executor to distinguish which executor type failed

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

* Use time.perf_counter() instead of time.monotonic() in executor test

time.monotonic() has a resolution of 16ms, which is way too coarse for the intervals
this test is trying to measure.

Signed-off-by: Brad Martin <bmartin@fatlxception.org>

---------

Signed-off-by: Brad Martin <bmartin@fatlxception.org>
Signed-off-by: Brad Martin <52003535+bmartin427@users.noreply.github.com>
Co-authored-by: Brad Martin <bmartin@fatlxception.org>
Co-authored-by: Janosch Machowinski <jmachowinski@users.noreply.github.com>
2025-03-21 23:25:04 +01:00
Michael Carlstrom 59671a0b4a
Fix Duration, Clock, and QoS Docs (#1428)
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
2025-03-20 16:13:39 -07:00
Tomoya Fujita edbb86f89f
add exception doc for configure_introspection. (#1434)
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
2025-03-20 09:49:02 +01:00
Michael Carlstrom 624c9aecaa
Fix Task constructor type bug (#1431)
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
2025-03-13 09:23:05 -07:00
Barry Xu 93c68bb3b3
Add new interfaces to enable intropsection for action (#1413)
* Add new interfaces to enable intropsection for action

Signed-off-by: Barry Xu <barry.xu@sony.com>

* Address review comments

Signed-off-by: Barry Xu <barry.xu@sony.com>

---------

Signed-off-by: Barry Xu <barry.xu@sony.com>
2025-03-12 17:59:20 -07:00
Tomoya Fujita 94f42b6b16
Check parameter callback signature during registration. (#1425)
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
2025-03-10 20:04:25 +01:00
Christophe Bedard 238ab50fec
Fix function params indentation (#1426)
And add return type.

Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
2025-03-10 10:27:04 +01:00
Michael Carlstrom f8606f03d9
Update Service and Action Protocols (#1409)
* init

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Various fixes

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* update parameter_event_handler

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Add back EventMessage

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Move import of TypeAlias

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

---------

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
2025-02-28 13:17:25 -08:00
Wolf Vollprecht 7fb093ba17
Remove `SHARED` (#1305)
When the module is compiled with `MODULE` (the default), the proper linker flags are added on macOS (specifically `-undefined dynamic_lookup`). Otherwise, `rclpy` segfaults when linked on conda. 

Is the `SHARED` really necessary? The `pybind11` documentation says:

> Specifying `SHARED` will create a more traditional dynamic library which can also be linked from elsewhere. 

Signed-off-by: Wolf Vollprecht <w.vollprecht@gmail.com>
2025-02-28 10:42:08 +01:00
Tomoya Fujita 87fbec0d6b
publish action goal status once accepted before execution. (#1228)
Signed-off-by: Tomoya.Fujita <tomoya.fujita825@gmail.com>
2025-02-17 09:56:55 +01:00
Emmanuel bbc46d7126
Fix readme deprecated link (#1411)
Signed-off-by: Emmanuel <EmmanuelMess@users.noreply.github.com>
2025-02-05 14:35:35 -08:00
R Kent James e545f60c5c
Add missing dependencies so that rosdoc2 shows Node (#1408)
Signed-off-by: R Kent James <kent@caspia.com>
2025-02-05 09:29:03 -05:00
Yadunund 1ffd2af51e 9.0.0 2025-02-02 13:04:38 -08:00
Yadunund ba7c99158d
Update changelogs
Signed-off-by: Yadunund <yadunund@gmail.com>
2025-02-02 13:04:07 -08:00
Tomoya Fujita 25a3cf337b
add QoS Profile/Depth support to Node. (#1376)
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
2025-01-30 11:12:33 +01:00
Michael Carlstrom 90436bf658
Various typing fixes (#1402)
* Various typing fixes

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Parameter narrowing in node.py

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Update tuple[None, None] narrowing in actio clients and services

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Flake8 fixes in service_instrospection.pyi

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

---------

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
2025-01-27 08:49:54 -08:00
Michael Carlstrom 2b38e662b3
Add types to Action with rhel roscli fix (#1361)
* Add types to Action objects

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* fix inheritance order

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* move type into string

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* string around type

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* missed string type

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* switch to 2 arg generics for clients/services

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* move import into TYPE_CHECKING block

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Type over type

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Add ClassVar

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Hopefully fix rhel failure

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* re-run CI

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* re-run CI

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Fix import

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Delete .vscode/settings.json

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Update client.py

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

---------

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2025-01-15 14:44:04 -08:00
Tomoya Fujita 9a144bf040
Check if Task(Future) is canceled. (#1377)
* Check if Task(Future) is canceled.

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

* Close cancelled coroutine (#1394)

* Add FutureState

Signed-off-by: Nadav Elkabets <elnadav12@gmail.com>

* Close canceled coroutine

Signed-off-by: Nadav Elkabets <elnadav12@gmail.com>

* Fixed behavior in test

Signed-off-by: Nadav Elkabets <elnadav12@gmail.com>

---------

Signed-off-by: Nadav Elkabets <elnadav12@gmail.com>
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>

* address flake8 and pep257 failures.

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

* Cancelled future is not done (#1397)

* Remove redundant coro.close

Signed-off-by: nadav <elnadav12@gmail.com>

* Only finished future is done

Signed-off-by: nadav <elnadav12@gmail.com>

* Add function _pending and fix checks

Signed-off-by: = <elnadav12@gmail.com>

* Replace check in done from pending to finished

Signed-off-by: = <elnadav12@gmail.com>

* Adapt test to new behavior

Signed-off-by: = <elnadav12@gmail.com>

* Add tests

Signed-off-by: = <elnadav12@gmail.com>

* Make changes within active task mutex

Signed-off-by: = <elnadav12@gmail.com>

---------

Signed-off-by: nadav <elnadav12@gmail.com>
Signed-off-by: = <elnadav12@gmail.com>

* keep the consistent behavior to avoid exception, and adjusted some tests accordingly.

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

* revert doc section to raise the exception.

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

* remove StrEnum and put logical operator in the beginning of line.

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

* add more test to check Task state.

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

---------

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Nadav Elkabets <elnadav12@gmail.com>
Signed-off-by: nadav <elnadav12@gmail.com>
Signed-off-by: = <elnadav12@gmail.com>
Co-authored-by: Nadav Elkabets <elnadav12@gmail.com>
Co-authored-by: Nadav Elkabets <32939935+nadavelkabets@users.noreply.github.com>
2025-01-15 08:26:45 -08:00
Michael Carlstrom 296425c418
Executors types (#1370)
* Add types to wait_for_message.py

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Add copyright

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* re-run CI

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* re-run CI

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* move Handles into _rclpy_pybind11

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Move Handles into type stubs:

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Move Handles into type stubs

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* move [] into string

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* fix imports

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* remove extra line

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* puy _rclpy.Publisher in quotes

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* fix capitalization

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Add EventHandle Constructor

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Use RuntimeError for context

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Add TYPE_CHECKING import

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* init

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* stash

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* more progress

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* done

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* move type into string

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* rclpy.impl

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* spelling error and type in string

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* type in string

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Narrow Task[] type

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* remove if statements around nodes_to_use

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Change Generic Srv/Cli

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Update rclpy/rclpy/executors.py

Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* EntityT cleanup

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Fix Optional goof

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* remove SrvEventT

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Only 2 args for srv/client

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* fix Callable[]

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

---------

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
2025-01-09 10:09:23 -08:00
Michael Carlstrom 4e8b071127
event_handler.py types (#1340)
* Add types to wait_for_message.py

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Add copyright

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* re-run CI

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* re-run CI

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* move Handles into _rclpy_pybind11

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Move Handles into type stubs:

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Move Handles into type stubs

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* move [] into string

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* fix imports

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* remove extra line

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* puy _rclpy.Publisher in quotes

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* fix capitalization

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Add EventHandle Constructor

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Use RuntimeError for context

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* Add TYPE_CHECKING import

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* init

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* remove .vscode file

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* move into string

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* fix flake8

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

---------

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2025-01-03 15:27:13 -08:00
Chris Lalancette ba72a017a9 8.0.0 2024-12-20 16:13:14 +00:00
Chris Lalancette abcf1e670b Changelog.
Signed-off-by: Chris Lalancette <clalancette@gmail.com>
2024-12-20 16:12:22 +00:00
Arjo Chakravarty ca59a7f05b
Add support for operator overloading of `Duration` (#1387)
* Add support for operator overloading of `Duration`

This PR adds support for operator overloading of the `Duration` class in
python. This should improve the overall UX of the rclpy library.
---------

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
2024-12-19 13:39:51 +08:00
Michael Carlstrom 8f1f16f160
Service/Client Implementation types (#1384)
* Init types

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* add typealias

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* re-run ci

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* re-run ci

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* re-run ci

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

* re-run ci

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>

---------

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
2024-12-16 09:20:51 -08:00
Tomoya Fujita 23e9c570db
avoid lifecycle node transition exception (#1319)
* catch the RCLError exception during transition and print error.

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

* remove a few exception cases from test_lifecycle.py.

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

---------

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
2024-12-13 10:03:57 -08:00
Tomoya Fujita 6dbeb86b3a
Client:call generates TimeoutError exception when it is timed out. (#1271)
* Client:call generates TimeoutError exception when it is timed out.

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

* call Thread.is_alive() to make sure the thread has started.

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

---------

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
2024-12-12 20:22:44 -08:00
Chris Lalancette 78f5e14cda
Remove CODEOWNERS and mirror-rolling-to-master workflow. (#1382)
They are both outdated and both no longer serving their
intended purpose.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
2024-11-26 22:58:43 +01:00
Chris Lalancette 510c1f606e
Add in python3-dev build dependency. (#1380)
We need this because we call find_package(Python3 Development)
in our CMakeLists.txt here.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
2024-11-26 09:14:25 -05:00
Chris Lalancette e6b625ea88 7.7.0 2024-11-20 15:40:47 +00:00
Chris Lalancette 3713057c7e Changelog.
Signed-off-by: Chris Lalancette <clalancette@gmail.com>
2024-11-20 15:29:11 +00:00
Barry Xu 34f9e13e72
Fix the race condition while calling rcl_shutdown (#1353)
* Fix the race condition while calling rcl_shutdown

Signed-off-by: Barry Xu <barry.xu@sony.com>

* Avoid calling rcl_shutdown() multiple times on the same context

Signed-off-by: Barry Xu <barry.xu@sony.com>

* Multiple calls to Context::shutdown will throw an exception

Signed-off-by: Barry Xu <barry.xu@sony.com>

* Update the name of an exception

Signed-off-by: Barry Xu <barry.xu@sony.com>

---------

Signed-off-by: Barry Xu <barry.xu@sony.com>
2024-11-08 09:32:55 -08:00