[ros-users] ROS C#

Stephan Opfer opfer at vs.uni-kassel.de
Mon Jul 21 06:57:10 UTC 2014

Hi Zsolt,

as one of the former maintainer of the roscs package, I would recomment you to avoid using roscs. Without changes, it only works for fuerte and the critics you are pointing out, are more or less true.

So we stopped developing roscs and decideded to port our remaining software to c++.

If you choose option 1) we could help you understand the code, but if I have to further develop roscs I would rewrite it, so that it is integrated in ROS like the auto-generation of message-stuff for c++ and python.


On 20.07.2014 22:17, Zsolt Szabo wrote:
> Dear ROS Community,
> First of all, let me say hello. I am Zsolt Szabo from Obuda University (Budapest, Hungary). Our department has recently bought a Turtlebot2 robot (and another department from the uni has a Nao, if I am correct) - both is running ROS.
> However, students in our faculty mainly learn C# (with a little (very little) java). Of course, you can say that they should use rosjava, or learn a proper programming language instead. However, it is not for us to question their choice. The fact is that most of the students know only C# and I plan to make it possible for them to work with ROS using C#, somehow.
> I checked the official roscs, but it is very old and uses heavily some cpp middleware. Also, the code is funny on some places. So instead I started messing around, and managed to create a lightweight (~2K) cpp middleware that allowes sending fixed-size text messages between c# ROS nodes. However, sending complex (struct) messages, this poses a problem.
> Without a middleware, I do not think that it is possible, as the mono documentation says <quote>This makes it nearly impossible to directly invoke functions that are not C ABI compatible, such as C++ library functions that are not extern "C".</quote>
> Another solution I tried is re-implementing the big ROS api itself, but to be honest I did not put too much effort into this one. I checked the Master API ( http://wiki.ros.org/ROS/Master_API ), I managed to execute the getSystemState via XMLRPC, but I got stuck at the registerSubscriber call, because the ROS documentation says "the subscriber will also receive notifications of new publishers via the publisherUpdate API" , and I found absolutely ZERO documentation about the publisherUpdate API ...
> So to access ROS from c#, I think we have the following three possibilities; these pose three nice questions:
> 1) try to use and modify the old roscs ==> QUESTION: any details/documentation about the current roscs implementation? Does anyone have any clue about the code structure and about the reason behind the quarks in the .cs code (e.g. MessageField.cs freaks me out A LOT)
> 2) implement a new roscs with this lightweight cpp middleware using converters or something similar to support more complex messages. ==> QUESTION: do you think this is doable? Right now, to pass non-text messages, I managed to give the absolute pointer of the data from the cpp middleware to the c# code. But I do not think that a cpp code and a c# code sharing the same pointer is a wise idea...
> 3) implement a new roscs without a cpp middleware (just like rosjava), with XMLRPC + TCPROS support. ==> QUESTION: do you think this is doable / worthwhile? QUESTION: can anyone point me to the proper protocol specifications? the ones I found at the ROS wiki seem kinda stripped down and short.
> Sorry for the long mail, and thank you all for your help and suggestions.
> Yours,
> Zsolt Szabo
> _______________________________________________
> ros-users mailing list
> ros-users at lists.ros.org
> http://lists.ros.org/mailman/listinfo/ros-users

Distributed Systems Research Group
Stephan Opfer  T. +49 561 804-6283  F. +49 561 804-6277
Univ. Kassel,  FB 16,  Wilhelmshöher Allee 73,  D-34121 Kassel
WWW: http://www.vs.uni-kassel.de/mitarbeiter/wiss-mitarbeiter/stephan-opfer/

More information about the ros-users mailing list