siemens / ros-sharp

ROS# is a set of open source software libraries and tools in C# for communicating with ROS from .NET applications, in particular Unity3D
Apache License 2.0
963 stars 367 forks source link

RosBridgeClient Refactoring #59

Closed MartinBischoff closed 6 years ago

MartinBischoff commented 6 years ago

We are just starting a major refactoring of the RosBridgeClient library.

Here are some things that we want to achieve:

You can follow the current state of development on my fork.

MartinBischoff commented 6 years ago

On my fork we just completed refactoring the RosBridgeClient library and realised all points mentioned above.

Based on above changes RosBridgeClient now comes with a different syntax. See RosSocketConsoleExample.cs for an example. We thus will also update the Unity3D project and some Wiki pages before pushing the changes upstream.

Here are some advantages of the new verison:

I hope you guys like these modifications and will not have much effort adjusting your ROS# application to this update that will come in some weeks.

If you have any concerns about the changes, please inform us here in this issue.

roalchaq commented 6 years ago

Hi!

I am interested in using ros-sharp with the Hololens so I recently tested the code from @MartinBischoff 's fork with a very simple scene and an ImagePublisher message. I noticed some difference from siemens/ros-sharp in the way that the GameObjects and the scripts are related in the scene:

When I use the code from this branch (siemens/ros-sharp) everything works perfectly fine (Image1 displayed using rviz) but it doesn't work when I used the new version (even if I use WebSockectSharp protocol - see Image2 attached).

I have tested in Unity 2018.1.6f1 and 2018.1.4f1. Is anyone else having an issue with this or am I omitting some other important steps? Thank you in advance for your help.

image1 image2

MartinBischoff commented 6 years ago

Hi @roalchaq ! Thanks for testing the code on my fork ;-) Thank you also for indicating the functional differences to the upstream version. The code on my fork is not ready yet, otherwise we would merge it upstream (into this branch as you call it). The code here is working, but not with the Hololens as discussed here #33.

IoannisKaragiannis commented 6 years ago

Hi,

Yesterday I asked a question regarding the HoloLens deployment of an app that uses ROS-Sharp. For some strange reason my comment was deleted by Siemens. Did I do something wrong?

Thanks

MartinBischoff commented 6 years ago

Hi @IoannisKaragiannis thanks for reaching out. We had to delete your message since we considered it off-topic and not constructive. Please feel free to contact us via ros-sharp.ct@siemens.com for further clarification.

Though Hololens was not the orignial contents of this issue (@rolchaq brought it up only in his message above), I go into this topic here:

At our research group we have not developed and are currently not planning to develop ROS# applications for the Hololens. So, to be honest, I personally do not know whether ROS# or any branch works with it or not.

Of course we are very much interested in developing a perferably generic ROS-Unity communication framework. This is the reason why we are currently refactoring RosBridgeClient as discussed above. We expect that one nice side-effect of the new .NET ClientWebsocket implementation will be that it also works with the Hololens, due to the higher .NET Framework version and UWP support.

In this open source project everyone is kindly invited to contribute, find and resolve bugs, and adjust the ROS# code in his forks to his needs and liking. Thanks a lot to @tarukosu again for including a websocket-sharp version for UWP that is supposed to work with the hololens on his fork: https://github.com/tarukosu/ros-sharp/tree/support-for-uwp

IoannisKaragiannis commented 6 years ago

Thanks for your thorough response.

MartinBischoff commented 6 years ago

done (cf. https://github.com/siemens/ros-sharp/commit/34fb2a8ddd58c5f099b1e4b887a253b954808fb4)

philipogorman commented 5 years ago

I'd like to update the RosBridgeClient project to be .NET Standard 2.0. The only issue I see is that the WebSocketSharp nuget and WebSocketSharpProtocol.cs would have to be removed from the project. I dont think this is an issue so long as your platform was at the supported version for .NET Standard 2.0. Although I am not sure about unity. See https://docs.microsoft.com/en-us/dotnet/standard/net-standard Does anyone see an issue moving RosBridgeClient project to be .NET Standard 2.0?