-
Notifications
You must be signed in to change notification settings - Fork 140
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
Example of package with srv
definitions
#299
Comments
@nnmm as you seem to be most active contributor to this project, maybe pinging you would prompt some response. I'd be really glad to get some hint as if I cannot progress I would have to declare this project unusable for us = delaying pick up of Rust for very long. Thanks. |
@michalfita it's tricky because we don't have support for generating messages directly from a Cargo project, in the future we might be able to generate messages dynamically, but not now. Your C++ project works because it uses CMake, which has macros for triggering message generation. As a general guideline in the ROS world, it is recommended to separate message packages from code, that way your projects can talk to each other without integrating the messages in the same package. For example, the ROS 2 Python bindings don't support mixing code and message definitions either. I'm closing this issue, but feel free add more comments if you need further clarifying. |
@michalfita I suggest you move the message definitions to a separate package (you can use many of the existing message packages as a template) and have your code separate from the messages. Having said that, we don't support many of the standard features that other client libraries have (mainly lifecycle nodes, actions and timers), so if those are important in your project, you'll have to reevaluate whether you can use |
Thanks @esteve!
Anything what
In this case it's actually only one that uses rest defined elsewhere. My experience with ROS is zero, so I have no idea why it's done this way, I'll try to poke some souls.
Is it deliberate choice, or matter of effort required to add them? Time to switch to Rust is now...
I'd love to, but neither my main role is doing ROS code nor Rust code at the moment. This is only feasibility demonstration. |
Perhaps that would be the place, but I strongly encourage you to the messages to a separate package, we won't support generating messages from a
I can only speculate, but perhaps that was done to quickly iterate and because the project was already in C++. In any case, this approach against ROS's best practices.
Just a lack of time. @jhdcs is working on lifecycle nodes right now and I'm working on actions (see #295)
No worries! Thanks for your interest in |
I have a C++ package that has a definition of a service in
srv
directory. That was a working one that I'm tasked to covert to Rust.Apart of lack of good documentation easily available (#275), I think I figure out most of easy things apart this one.
My
package.xml
has among others:but I can't find anything resembling
mypackage::srv::ServiceType
like my C++ package has.It would be nice if there's an example how to set up such thing right where the service isn't actually specified in extra package (like
example_interfaces
).Thank you.
The text was updated successfully, but these errors were encountered: