Skip to content
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

[Re-write] Free fleet adapter using easy-full-control fleet adapter and zenoh bridges #145

Merged
merged 42 commits into from
Jan 9, 2025

Conversation

aaronchongth
Copy link
Member

@aaronchongth aaronchongth commented Sep 30, 2024

New feature implementation

A large motivation of this re-write, is to fully utilize the well tested tools already available in the ROS ecosystem and Zenoh, and also take advantage of python bindings as much as possible, to allow for easier iterations, testing and contributions.

The use of Zenoh bridges will hopefully also minimize disruption to any existing robot navigation stack, and can be spun up with just a standalone binary with the appropriate configuration file.

The legacy implementation can still be found at the legacy branch.

Architecture

This architecture and the use of Zenoh bridges will ideally improve the integration experience, with just setting up the zenoh-bridge-ros2dds and its configuration, instead of building and running a separate node.

This PR does not support the ROS 1 navigation stack, the diagram is just for illustrating the proposed architecture once it is implemented down the road.

Single robot example using official nav2_bringup's tb3_simulation

Two robots example using official nav2_bringup's unique_multi_tb3_simulation

Although the two robot simulation example is just for testing purposes as it uses a different architecture as intended

Single nav1 robot sim using official turtlebot3_gazebo and turtlebot3_navigation

Next TODOs (over subsequent PRs)

  • attempt to optimize tf messages (not all are needed)
  • map switching support
  • docking support
  • support for Rolling
  • docker images
  • releases
  • testing and support for other RMW implementations

There are plenty of TODOs left, but this is the bare minimum testable and usable state

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
@aaronchongth aaronchongth marked this pull request as ready for review September 30, 2024 17:45
@aaronchongth aaronchongth marked this pull request as draft September 30, 2024 17:46
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
@aaronchongth aaronchongth marked this pull request as ready for review October 1, 2024 02:50
@aaronchongth aaronchongth requested review from mxgrey and xiyuoh October 1, 2024 02:57
@aaronchongth aaronchongth changed the title [Re-write] Free fleet adapter using easy full control and zenoh bridges [Re-write] Free fleet adapter using easy-full-control fleet adapter and zenoh bridges Oct 1, 2024
Copy link
Member

@xiyuoh xiyuoh left a comment

Choose a reason for hiding this comment

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

After discussing more about the abstract class with Aaron, free fleet seems like a good place to house it since the goal is for a single fleet to integrate with multiple types of robot adapters. It would be extremely useful for future maintainers and community members to contribute their own robot adapters with other nav stacks.

However, since the current iteration of the class is meant for testability and is subjected to change after experimenting with nav1, I suggested it might be more appropriate to flesh out the class methods, and only introduce it after we ensure that there will be no breaking changes (especially with nav1).

Apart from that this PR looks good to me, have tested it out in sim + witnessed the hardware working well with the fleet adapter. Thanks for this massive refactor!

* Basic testing on docker image for tf works

Signed-off-by: Aaron Chong <aaronchong@google.com>

* Renaming types and starting conversions

Signed-off-by: Aaron Chong <aaronchong@google.com>

* Renaming and verifying regression tests

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* minimal-zenoh-bridge-ros1 to build bridge from source

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Clone bridge recursively for rosrust

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* nav1 tf integration tests

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Fix nav1 robot testing namespace, lint

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Fix imports, lint, new cmake and action argument to split nav1 or nav2 integration tests

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Fix ros master race condition, basic conversion

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* TransformStamped ros1 type

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Build with updated images

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Reduce size of minimal zenoh bridge ros1 image, lint

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Setup for more testing scripts

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* move base handler

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* lint

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* free_fleet testing

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* move_base_handler integration testing

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Basic testing on the level of nav1 robot adapter

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Basic nav1 fleet adapter setup done

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* New image builds and new tests

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Refactor out the part of starting fleet adapters for future testing

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Turn off nightly on-push build

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Update documentation with nav1 simulation example

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* nav1 sim architecture

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Update CI branch, todos on readme

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

---------

Signed-off-by: Aaron Chong <aaronchong@google.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
@aaronchongth aaronchongth requested a review from xiyuoh December 31, 2024 06:05
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
* Bump major versions

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Added nav1 and nav2 to names to make it clearer

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Revert schedule and free fleet branch

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

---------

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
* Use nav2 tag for nav1 map image, rebuild images, remove typename, use more encompassing check for namespace

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Remove update handle check, and just check individually

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Use conditional in launch instead of group conditional

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Fixed namespacify logic, reverted to nightly build

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Fixed tests that catch runtime errors, check for replan counts instead

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Opens issue ticket when navigation fails

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Fix launch file, remove spam of nav1 message in log

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

---------

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
…tialization before checks

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
@aaronchongth aaronchongth requested a review from mxgrey January 7, 2025 17:03
Copy link
Collaborator

@mxgrey mxgrey left a comment

Choose a reason for hiding this comment

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

-20k net lines of code while also improving capabilities is such a rare treat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants