ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

Porting all of ROS 2 to rust

asked 2018-12-27 06:14:36 -0600

kanishkarj gravatar image

updated 2018-12-27 08:50:51 -0600

gvdhoorn gravatar image

I was wondering of porting ROS to a newer Language like Rust-lang or Go-lang. They are also compiled and pretty fast, and they are being adopted in the industry heavily. Also, from what I heard about Rust-lang, it would do really well for safety-critical systems. And why to shift from C++? because both these languages have great package management systems and build systems too. Second and most important, is that both these language are pretty, hence enhancing maintainability and scalability. Also anyways we are building ROS2, and hence rewiring most of the other software's too to work with it, So why can't we start off with rust? And if there are any plans for working on it. I would love to work on it.

edit retag flag offensive close merge delete

Comments

I was actually talking of implementing ROS as a whole in rust. Not a client library.

I've updated your question's title to better reflect what you are asking.

gvdhoorn gravatar image gvdhoorn  ( 2018-12-27 08:51:45 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2018-12-27 08:41:31 -0600

gvdhoorn gravatar image

updated 2018-12-27 08:54:41 -0600

So why can't we start off with rust?

I won't answer this, as it would seem to go into the direction of "why tabs, not spaces?", but as far as ROS 2 compatibility with Rust, please see Announcing Rust bindings for ROS2.

Even for ROS 1, there are several implementations of client libraries for Rust and Go-lang.

For a more generic overview of the available client libraries for ROS 2, see Home > ROS2 Overview > ROS 2 Client Libraries.


Edit:

Also anyways we are building ROS2, and hence rewiring most of the other software's too to work with it, [..]

This may not be apparent, but ROS 2 has been in development for quite some time already, with a significant code base developed, maintained and released for quite some time as well. What you're suggesting is to essentially throw all of that away and start over (or perhaps do some conceptual reuse).

From a plain resource perspective (ie: time, money) that wouldn't be feasible I believe, as nice as rust (or <insert-other-language-here>) is.

edit flag offensive delete link more

Comments

I was actually talking of implementing ROS as a whole in rust. Not a client library.

kanishkarj gravatar image kanishkarj  ( 2018-12-27 08:45:34 -0600 )edit
1

I understand, but that is not a question that can be answered on ROS Answers. That would be a discussion for ROS Discourse.

But anticipating the reactions you would get a bit, I suggested taking a look at the rust client library, as that is most likely what will be suggested to you.

gvdhoorn gravatar image gvdhoorn  ( 2018-12-27 08:48:22 -0600 )edit

The same question could be asked for Erlang (and in fact it has) or any other language.

I'll leave my answer here, but let's see if there are others who would/could way in.

gvdhoorn gravatar image gvdhoorn  ( 2018-12-27 08:49:30 -0600 )edit

I would highly not recommend trying to use ROS 1,2 on a different platform other than supported (to be honest, only Linux Ubuntu is the only platform that ROS 2 works pretty well, despite having support on other platforms).

stevemartin gravatar image stevemartin  ( 2018-12-27 10:44:44 -0600 )edit

Linux Ubuntu is the only platform that ROS 2 works pretty well

@stevemartin Can you point to specific issues on macOS and Windows why you make this statement?

Dirk Thomas gravatar image Dirk Thomas  ( 2018-12-27 11:00:12 -0600 )edit
0

answered 2021-05-28 02:30:03 -0600

audrius gravatar image

The two industrial projects I worked before that called themselves "ROS centric" mostly used timer and messages. They also used some of the ROS infrastructure for building everything with the single command and running together multiple nodes.

Some other parts traditionally provided by ROS (especially the logger and the configuration parser) can be replaced by dedicated open source libraries. ROS implementations are not unique or significantly better.

That much can probably be replicated in some independent project. C++ integration is still vital as some nodes were interfacing various devices via they C based SDKs.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-12-27 06:14:36 -0600

Seen: 1,984 times

Last updated: May 28 '21