Giter Site home page Giter Site logo

Comments (5)

michalfita avatar michalfita commented on July 2, 2024

@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.

from ros2_rust.

esteve avatar esteve commented on July 2, 2024

@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.

from ros2_rust.

esteve avatar esteve commented on July 2, 2024

@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 ros2-rust or not, but contributions are always welcome 🙂

from ros2_rust.

michalfita avatar michalfita commented on July 2, 2024

Thanks @esteve!

Your C++ project works because it uses CMake, which has macros for triggering message generation.

Anything what build.rs would lift? Is it matter of running some tool prior to rest of the process?

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.

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.

mainly lifecycle nodes, actions and timers

Is it deliberate choice, or matter of effort required to add them? Time to switch to Rust is now...

but contributions are always welcome 🙂

I'd love to, but neither my main role is doing ROS code nor Rust code at the moment. This is only feasibility demonstration.

from ros2_rust.

esteve avatar esteve commented on July 2, 2024

Anything what build.rs would lift? Is it matter of running some tool prior to rest of the process?

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 ros2-rust project` and neither does the Python, Java and the other client libraries. Generating code from messages involves many parts in the ROS 2 infrastructure that makes no sense to replicate in Rust (e.g. generate C and C++ messages, adding entries to the ament registry, handle dependencies, etc.)

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.

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.

Is it deliberate choice, or matter of effort required to add them? Time to switch to Rust is now...

Just a lack of time. @jhdcs is working on lifecycle nodes right now and I'm working on actions (see #295)

I'd love to, but neither my main role is doing ROS code nor Rust code at the moment. This is only feasibility demonstration.

No worries! Thanks for your interest in ros2-rust 🙂 Let me know if you need help.

from ros2_rust.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.