Comments (5)
@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.
@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.
@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.
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.
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)
- rosidl_runtime_rs differences between main and crate breaks colcon build HOT 3
- Does ROS2_Rust support .srv code generation? HOT 3
- Support for building Debian packages HOT 1
- Getting an Result::unwrap() Error when launching a launch file. HOT 2
- Remove Support for Foxy HOT 1
- Add support for Iron Irwini
- Zero copy publisher example fails HOT 1
- `extern` block uses type `u128`, which is not FFI-safe HOT 7
- support `rclrs::SerializedMessage`
- compile failed when deserilize msg struct
- Improve support for rust analyzers
- Fix documentation now that rclrs is on crates.io HOT 1
- Does it make sense to publish Docker images? HOT 2
- Docs Fail to Generate on Docs.rs HOT 3
- Barebone Compile of Repository Fails HOT 3
- 0.4 Release Tracking Issue HOT 5
- does ros2_rust support autogeneration of code from .idl and .msg files, is there any example implementation to autogenerate rust nodes from .idl/.msg files? HOT 1
- A small tool for creating ros2 rust packages is available. HOT 3
- Build Error: unable to find std_msgs HOT 1
- Support for Bevy HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ros2_rust.