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

Is ROS able to support C# language?

asked 2011-06-25 16:31:25 -0500

sam gravatar image

Hi, I want to use c# to build robot interface. I found c# is very convenient,because both windows and linux can run the same c# program. c# can use mono to run. So if c# can also be included in ROS, it will be very great~

edit retag flag offensive close merge delete

5 Answers

Sort by » oldest newest most voted
3

answered 2011-06-25 23:42:13 -0500

C# is not supported yet; if you must use C#, your only option would be to re-implement the basic network protocols in C#, but that will be a lot of work.

If you are just looking for a way to build a platform-independent robot interface, you could have a look at rosjava.

edit flag offensive delete link more

Comments

It's not really necessary to re-implement it. You could also use a foreign language interface and wrap it around roscpp as the old jni based rosjava did it. Of course, that wouldn't run on windows then :)
Lorenz gravatar image Lorenz  ( 2011-06-26 06:36:27 -0500 )edit
Is anyone who want to implement c# interface? Because I found that many useful libraries like aforge which has a lot of high level of tech like machine learning,neural network,fuzzy,genetic algorithms...etc.
sam gravatar image sam  ( 2011-08-10 01:37:00 -0500 )edit
4

answered 2012-06-21 15:53:02 -0500

st gravatar image

There is now a C# api, available see: http://www.ros.org/wiki/roscs

edit flag offensive delete link more
3

answered 2011-06-25 21:08:24 -0500

dornhege gravatar image

updated 2011-06-25 21:11:53 -0500

You can basically run ROS with any language supporting networking. So, yes, ROS is able to support C#. BUT there needs to be an implementation and as far as I know there is no C# one.

If you are only looking for platform independence python is supported very well in ROS. Full ROS usability in Windows is somewhat limited, though, as you will want all ROS features.

edit flag offensive delete link more

Comments

What should I do when I want to init C# program to a ros node (not by rosjava)?
sam gravatar image sam  ( 2011-08-10 01:39:47 -0500 )edit
You will need to have a client library: "http://www.ros.org/wiki/Implementing Client Libraries"
dornhege gravatar image dornhege  ( 2011-08-10 02:15:59 -0500 )edit
2

answered 2011-06-27 01:42:39 -0500

updated 2011-06-27 16:14:52 -0500

You can attempt to convert the rosjava.jar into a CLR lib using IKVM--haven't tried it but it may work. It basically convert JVM byte code into CLR IL. Once you have the DLL you just load it like you normally would in Visual Studio/MonoDevelop.

edit flag offensive delete link more

Comments

If I can make the DLL file of rosjava,is there any tutorials or documents of how to implement C# program as a ROS node?
sam gravatar image sam  ( 2011-08-10 01:42:05 -0500 )edit

https://bitbucket.org/ipre/calico/src/fbf0d2b387f94b2687ea42f9fe83728927d43f2d/examples/python/MyROS/rostest.py?at=master is an example using rosjava converted to a DLL and used by IronPython. The import clr, clr.AddReference commands have already been done.

Doug Blank gravatar image Doug Blank  ( 2013-06-14 00:52:39 -0500 )edit
0

answered 2015-02-26 14:18:55 -0500

n8ers gravatar image

ROS.NET is another project which appears to aim at this goal.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2011-06-25 16:31:25 -0500

Seen: 9,637 times

Last updated: Jun 21 '12