Skip to content

Add examples from the ros2-rust repository #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 24 commits into from

Conversation

esteve
Copy link
Contributor

@esteve esteve commented Jan 28, 2025

This PR moves the examples folder from ros2-rust @ 9a845c17873cbdf49e8017d5f0af6d8f795589cc

nnmm and others added 24 commits January 28, 2025 14:56
* feat: add example launch

Signed-off-by: Daisuke Nishimatsu <[email protected]>

* docs: fix README.md

Co-authored-by: Nikolai Morin <[email protected]>

Co-authored-by: Nikolai Morin <[email protected]>
* Move create_node and create_node_builder back to the rclrs module

* Fix tests

* Fix tests

* Fix formatting
* Added support for clients and services
This was not a straightforward extension because
1. ReadOnlyLoanedMessage has a lifetime
2. The take_loaned_message() method was restricted to Subscription<T: RmwMessage>, i.e. not available
   for subscriptions on idiomatic messages.
   This has been fixed and now the method is implemented for Subscription<T: Message> like the other
   `take*` methods – though you still will get an RMW-native loaned message even if T is the idiomatic
   message type, because idiomatic message types can never be loaned.
…tions (#294)

* Fine-grained locks. Made create_subscription, create_service, create_client not take a mutable self

* Return an Arc from rclrs::create_node to match other create_X functions

* Update spin* to take an Arc

* Fix clippy warning
* Added rclcpp/rclpy-like executor

* Fix comments
* Add check if service is ready

* Update changelog

* Fix unneeded return

---------

Co-authored-by: carter <[email protected]>
Co-authored-by: carter <[email protected]>
Signed-off-by: Esteve Fernandez <[email protected]>
This reverts commit 5475f72c071d14df850c8d100d4272ad10628127.
* Add wchar support and .idl example

* Undo automatic IDE formatting noise

* Added back unused imports to see if this fixes the build

* More attempts to fix the weird build failure

* Removed the linter tests for auto-generated message source files in `rclrs_example_msgs`. Re-applied some changes removed when root causing.

---------

Co-authored-by: Sam Privett <[email protected]>
…ackage was only ever used by examples. (#384)
* Use nightly for style check

Signed-off-by: Michael X. Grey <[email protected]>

* Install nightly for cargo +nightly fmt

Signed-off-by: Michael X. Grey <[email protected]>

* Fix style in examples

Signed-off-by: Michael X. Grey <[email protected]>

* Update style for rosidl_runtime_rs

Signed-off-by: Michael X. Grey <[email protected]>

* Add a comment indicating that nightly release is needed for formatting

Signed-off-by: Michael X. Grey <[email protected]>

---------

Signed-off-by: Michael X. Grey <[email protected]>
…ntation #378 (#390)

* Added another tutorial to ros2 rust.

---------

Co-authored-by: GueLaKais <[email protected]>
Co-authored-by: GueLaKais <[email protected]>
Co-authored-by: Esteve Fernandez <[email protected]>
Co-authored-by: Esteve Fernandez <[email protected]>
Co-authored-by: Sam Privett <[email protected]>
* Fix buffer overflow for bounded sequence example

Signed-off-by: Michael X. Grey <[email protected]>

* Allow longer characters for wstring

Signed-off-by: Michael X. Grey <[email protected]>

---------

Signed-off-by: Michael X. Grey <[email protected]>
@esteve esteve changed the title Add examples Add examples from the ros2-rust repository Jan 28, 2025
Copy link

@nwn nwn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate your efforts to maintain the history of these components!

We'll probably want to add some CI testing for these new repos, but that can happen later.

Copy link

@maspe36 maspe36 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy if we want to merge as is, one small question

path="src/simple_subscriber.rs"

[dependencies]
rclrs = "*"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm should we start listing version numbers?

@esteve
Copy link
Contributor Author

esteve commented Jan 31, 2025

@maspe36 @nwn thanks for the quick reviews. I'll be closing this PR since I've reverted the removal of the examples folder in ros2-rust/ros2_rust#454

@esteve esteve closed this Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants