Giter Site home page Giter Site logo

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? about ros2_rust HOT 1 OPEN

vignesh-tw avatar vignesh-tw commented on July 2, 2024
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?

from ros2_rust.

Comments (1)

maspe36 avatar maspe36 commented on July 2, 2024

We can generate rust code for idl and msg files thanks to the rosidl_generator_rs and rosidl_runtime_rs packages in this repo.

In the rclrs_example_msgs package, we define a few .msg files and then we consume them in message_demo example. There is nothing special about the rclrs_example_msgs package, the "magic" is in message_demo's package.xml where we specify our dependency on the rosidl_runtime_rs package.

As for the second part of your question, there is no way to generate nodes from just .idl/.msg files. To quote the ROS 2 docs

A node is a fundamental ROS 2 element that serves a single, modular purpose in a robotics system.

So having codegen for types defined in .idl/.msg files is different from automatically generating a node. You'll still need to write code that uses your auto-generated types.

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.