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

Support bridging services #211

Merged
merged 14 commits into from
Apr 22, 2022
Merged

Support bridging services #211

merged 14 commits into from
Apr 22, 2022

Conversation

ivanpauno
Copy link
Contributor

🎉 New feature

Closes #70

Summary

  • Add support for bridging services.
    At the moment you can only bridge the world control service.
  • Add some message definitions that can be useful for bridging other ignition services.

I plan to clean up the code a bit and support to bridge more services in a follow up PR.

Test it

ros ign /path/to/any/world/with/ign/gui/world/control/enabled
ros2 run ros_ign_bridge parameter_bridge /world/wheel_slip/control@ros_ign_interfaces/srv/ControlWorld
ros2 service call /world/<world_name>/control ros_ign_interfaces/srv/ControlWorld "world_control:
  pause: false
  step: false
  multi_step: 0
  reset:
    all: false
    time_only: false
    model_only: false
  seed: 0
  run_to_sim_time:
    sec: 0
    nanosec: 0"

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@ivanpauno ivanpauno added the enhancement New feature or request label Jan 19, 2022
@ivanpauno ivanpauno self-assigned this Jan 19, 2022
@osrf-triage osrf-triage added this to Inbox in Core development Jan 19, 2022
Copy link
Collaborator

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

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

I can't see any tests here, is there any chance to add then ?

Core development automation moved this from Inbox to In review Jan 19, 2022
@ivanpauno
Copy link
Contributor Author

I can't see any tests here, is there any chance to add then ?

Yes, I will add tests.
I opened a PR to get some early feedback.

@ivanpauno
Copy link
Contributor Author

I can't see any tests here, is there any chance to add then ?

See ab63ae6.

Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

This is great! The overall approach looks good to me! I mainly have suggestions on how to split up the PR, so that it's easier to check that all new code is tested and documented.

ros_ign_bridge/src/parameter_bridge.cpp Show resolved Hide resolved
ros_ign_bridge/src/parameter_bridge.cpp Outdated Show resolved Hide resolved
// skip the process name in argument procesing
++argv;
--argc;
auto filteredArgs = rclcpp::init_and_remove_ros_arguments(argc, argv);
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a nice cleanup! Also a good candidate for its own PR

ros_ign_bridge/src/service_factory.hpp Show resolved Hide resolved
ros_ign_bridge/test/launch/test_ign_server.launch.py Outdated Show resolved Hide resolved
ros_ign_bridge/test/serverclient/ign_server.cpp Outdated Show resolved Hide resolved
ros_ign_bridge/test/serverclient/ign_server.cpp Outdated Show resolved Hide resolved
ros_ign_interfaces/msg/VideoRecord.msg Outdated Show resolved Hide resolved
@ivanpauno
Copy link
Contributor Author

I mainly have suggestions on how to split up the PR, so that it's easier to check that all new code is tested and documented.

Sounds good!
Yeah, I ended up putting a lot of different things together.

@mjcarroll
Copy link
Collaborator

Alright @ivanpauno this is probably ready for a rebase. Sorry for causing so much chaos with the other fixes, but now we are getting debs again on galactic and rolling.

@ivanpauno
Copy link
Contributor Author

Alright @ivanpauno this is probably ready for a rebase. Sorry for causing so much chaos with the other fixes, but now we are getting debs again on galactic and rolling.

No problem, that's easy to fix, I only need to discard one commit 😉 .
I will probably be opening some PRs split from this one (similar to #214), before rebasing.

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
ivanpauno and others added 2 commits February 11, 2022 14:12
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>

Co-authored-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
ros_ign_bridge/test/serverclient/ros_client.cpp Outdated Show resolved Hide resolved
ros_ign_bridge/test/serverclient/ign_server.cpp Outdated Show resolved Hide resolved
ros_ign_bridge/src/parameter_bridge.cpp Outdated Show resolved Hide resolved
ros_ign_bridge/src/parameter_bridge.cpp Outdated Show resolved Hide resolved
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Copy link
Contributor

@jacobperron jacobperron left a comment

Choose a reason for hiding this comment

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

LGTM, but I think we should get someone from the Ignition team to approve ultimately.

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@chapulina chapulina self-requested a review February 28, 2022 19:33
@ivanpauno
Copy link
Contributor Author

CI failures seem to be unrelated ...

Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

Great work! 👍

@ivanpauno
Copy link
Contributor Author

@chapulina should I wait for the CI (infrastructure?) issue to be fixed or can this be merged?

@chapulina
Copy link
Contributor

It would be good to have CI passing to merge this, since it's such a big change. I believe everything here should be backportable, right? How about targeting foxy and we merge it forward? That's usually our preferred pattern anyway, and will allow us to run CI for this while #219 is being worked on.

@ivanpauno
Copy link
Contributor Author

Applying the same changes to the foxy branch is not that easy after #192 and some other PRs.
I will check what I can do

@ivanpauno
Copy link
Contributor Author

Applying the same changes to the foxy branch is not that easy after #192 and some other PRs.
I will check what I can do

Well, either way it's going to be hard to rebase 😰.
@chapulina do you prefer to also have #192 and the related PRs applied to foxy/galactic/etc or should I try to apply this change directly to foxy?

In the later case, I probably want to apply #214 and #216 before.

@chapulina
Copy link
Contributor

do you prefer to also have #192 and the related PRs applied to foxy/galactic/etc

Those aren't easily backportable either because they change public headers 😕

or should I try to apply this change directly to foxy?

If you're not in a rush to get this in, it may be better to wait until we have CI working on Jammy. It's probably not worth the effort trying to backport this right now.

@ivanpauno
Copy link
Contributor Author

If you're not in a rush to get this in, it may be better to wait until we have CI working on Jammy. It's probably not worth the effort trying to backport this right now.

Sounds good, I think we're not in a rush, and worst case we could use a fork temporally (or complete the rebasing).

@chapulina chapulina added the needs upstream release Blocked by a release of an upstream library label Mar 12, 2022
Signed-off-by: Louise Poubel <louise@openrobotics.org>
@chapulina chapulina removed the needs upstream release Blocked by a release of an upstream library label Apr 22, 2022
@chapulina
Copy link
Contributor

No new test failures, merging!

@chapulina chapulina dismissed ahcorde’s stale review April 22, 2022 22:12

tests were added

@chapulina chapulina merged commit 699a195 into ros2 Apr 22, 2022
@chapulina chapulina deleted the ivanpauno/services-support branch April 22, 2022 22:12
Core development automation moved this from In review to Done Apr 22, 2022
@chapulina chapulina moved this from Done to Highlights in Core development Apr 25, 2022
@jacobperron jacobperron mentioned this pull request Apr 26, 2022
@j-rivero j-rivero removed this from Highlights in Core development May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants