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

Question: ROS2 model #167

Open
peter-nebe opened this issue Oct 18, 2021 · 2 comments
Open

Question: ROS2 model #167

peter-nebe opened this issue Oct 18, 2021 · 2 comments
Labels

Comments

@peter-nebe
Copy link

Hello Maintainers,
I have a ROS2 system and I want to create a model of it. The tutorials only work for ROS1, right? Is there any way to make a ROS2 model, for example for galactic?
It is a very simple system, consisting of a publisher and a subscriber, that defines its own message.
Any help is greatly appreciated.
Thanks!

@ipa-nhg
Copy link
Member

ipa-nhg commented Oct 18, 2021

@peter-nebe thanks for your interested.

ROS2 is already supported by the models, the documentation will be submitted soon.

To define a package as a ROS2 one you only have to open the .ros file with a text editor and where it says "CatkinPackage" modify the attribute to "AmentPackage".

At system level the backend will detect automatically that your system is composed by ROS2 nodes and will generate automatically the ROS2 launch file. No changes are needed.

@peter-nebe
Copy link
Author

Thank you for your quick response. That sounds great.

I generated the model of the message with the cloud ROS Model Extractor. It is important that you enter melodic or noetic as the Ros version, and not foxy. (This .ros file does not contain the "CatkinPackage" attribute.)

To create the model for a node, I used this tutorial as a guide, starting with "Add new Ros Project". (The web interface "Node analysis" didn't work for me.) In the .ros file of the node I then replaced "Catkin ..." with "Ament ...".

Next, I'll try to create a complete ROS system.
Thanks again for your help!

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

No branches or pull requests

2 participants