EricVoll / 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
36 stars 7 forks source link

RosBridgeClientUWP cannot connect to ros2 rosbridge server #21

Closed cxiliu closed 2 years ago

cxiliu commented 2 years ago

I found a bug!

Here is my bug description: I am using ros2 branch of the rosbridge server at https://github.com/RobotWebTools/rosbridge_suite. Ros-sharp library works perfectly with ros2 server from within the Unity editor (with small complaints on timestamp formatting https://github.com/siemens/ros-sharp/issues/315 but connection was not an issue). When I switch from Websocket Sharp/.NET to the UWP version to deploy it on HoloLens, connection cannot be established.

Perform the following steps to reproduce the bug: Build the demo unity project in ProjectSetup/RosSharpUnity (to either HoloLens1 or 2) and try to connect with the ros2 branch of rosbridge_websocket

Observed results: Connection cannot be established (no useful information in the log, see attached snippet UnityPlayer.log )

Expected results: Connection established, as it did in the Unity editor

Thanks!

EricVoll commented 2 years ago

Hi @cxiliu This looks like a serialization / code-stripping issue. I have no experience with ROS2 so far, so I can't really help out here. Maybe try to disable Code-Stripping from the IL2CPP backend as described here. If it works after code stripping was disabled, then its "only" a matter of finding the right dll to exclude from code-stripping.