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

Bridge services #70

Closed
chapulina opened this issue Apr 29, 2020 · 12 comments
Closed

Bridge services #70

chapulina opened this issue Apr 29, 2020 · 12 comments
Labels
enhancement New feature or request

Comments

@chapulina
Copy link
Contributor

Ignition offers several services. It would be good to bridge them directly to ROS (1 and 2) so users can do things like spawning entities directly from ROS.

@gezp
Copy link
Contributor

gezp commented Apr 30, 2021

Hi,I have some simple and rough work about it: https://github.com/gezp/ros_ign_gazebo_py

it's very useful to control ignition Gazebo (by service) with ROS , for example, resume and pasue Ignition Gazebo, create model,delete model and set pose of model.

In my case, I need control Ignition Gazebo with python, but ign-transport doesn't support python, so i use ROS as bridge with C++, and then i create ROS Client Node with python so that i can control ignition Gazebo with python.

by the way, before implementing bridge services, ros_ign_interfaces is necessary to provide ros msg,srv files related to ign-msgs , like EntityFactory.msg . i think this package should be considered currently, and this is my opinion, any discussions is welcome.

finally, this is a very useful function, i hope it can be implemented earlier.

@chapulina
Copy link
Contributor Author

Hi @gezp , we're not currently planning to work on this, but we can review a pull request if you're willing to implement it.

@gezp
Copy link
Contributor

gezp commented May 1, 2021

I'm glad to contribute, but the New ROS Package ros_ign_interfaces is allowed to pull request?

In addition, I think ign_gazebo_manager.cpp (https://github.com/gezp/ros_ign_gazebo_py : bridge part services ) should be put in ros_ign_gazebo/src , and ign_gazebo_interface.py (ros client node for ign_gazebo_manager service, provide python interface )should be put in ros_ign_gazebo/ros_ign_gazebo (python package will be created).

I will do this work if it's ok.

@chapulina
Copy link
Contributor Author

New ROS Package ros_ign_interfaces is allowed to pull request?

Yes, thanks! I think there's no way around it, we'll need to add some Ignition-specific ROS messages that aren't provided by other packages.

I considered maybe using gazebo_msgs, but those messages carry some Gazebo-classic concepts that I think we wouldn't want here.

I think ign_gazebo_manager.cpp (https://github.com/gezp/ros_ign_gazebo_py : bridge part services ) should be put in ros_ign_gazebo/src

I'm curious, why ros_ign_gazebo instead of ros_ign_bridge?

ign_gazebo_interface.py (ros client node for ign_gazebo_manager service, provide python interface )should be put in ros_ign_gazebo/ros_ign_gazebo

This sounds reasonable to me.

@gezp
Copy link
Contributor

gezp commented May 4, 2021

I'm curious, why ros_ign_gazebo instead of ros_ign_bridge?

because ros_ign_bridge currently provides a general topic's transfer between ROS and Ignition. and i don't find a way to provide a general service's transfer between ROS and Ignition.

ign_gazebo_manager(https://github.com/gezp/ros_ign_gazebo_py) provide a function to control Ignition Gazebo (create model, etc) in ROS, which is based on service's transfer , just like ros_ign_gazebo/src/create, this is why I want to put ign_gazebo_manager in ros_ign_gazebo/src.

@chapulina
Copy link
Contributor Author

because ros_ign_bridge currently provides a general topic's transfer between ROS and Ignition. and i don't find a way to provide a general service's transfer between ROS and Ignition.

Oh, thank you for the clarification, I thought that your solution would be generic.

provide a function to control Ignition Gazebo (create model, etc) in ROS, which is based on service's transfer , just like ros_ign_gazebo/src/create

In that case, maybe it makes more sense to add the missing functionality to the existing create node?

@gezp
Copy link
Contributor

gezp commented May 4, 2021

Oh, thank you for the clarification, I thought that your solution would be generic.

ign_gazebo_manager is a bundle of specific services for Ignition Gazebo. it's a service's bridge, but also specific for Ignition Gazebo, I am not sure to add it in ros_ign_bridge or ros_ign_gazebo.

Perhaps, the generic code from ign_gazebo_manager can be wrapped and added to ros_ign_bridge .

In that case, maybe it makes more sense to add the missing functionality to the existing create node?

create node is a executable, which is useful to create model in ROS launch file.
ign_gazebo_manager is a service's bridge, which is useful to create model at ROS task's runtime.
i think they are both useful in different way.

@gezp
Copy link
Contributor

gezp commented May 21, 2021

I create a c++ class template for general service bridge (only ROS Client -> Ignition Service), and any advice is welcome.

In addition, i have some questions about implementation of service bridge .

do we need bidirectional service bridge like topic?

In my opinion, we needn't. I think only unidirectional service bridge( ROS Client -> Ignition Service)is useful.

do we need factory interfaces to create service bridge from string of service type, so that we can create service bridge in launch file ?

In my opinion, we needn't. There are various of services (ROS .srv) which are made up of different messages (ROS .msg), so it's more complex than topic bridge.

@ivanpauno
Copy link
Contributor

Hi @gezp, did you make any further progress related to this issue?

I might need to work in this ticket in a near future.

@gezp
Copy link
Contributor

gezp commented Dec 7, 2021

no, i have no plan, you are free to work in this ticket @ivanpauno .

@jacobperron
Copy link
Contributor

Is this ticket resolved with #211?

@ivanpauno
Copy link
Contributor

I think so, we can open follow-up tickets if something is missing.

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

No branches or pull requests

4 participants