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

Exception with string subscriber #24

Closed gnanukoth closed 6 months ago

gnanukoth commented 6 months ago

I have a question!

sending sub: none, 2147483647, /HL2/gesture/bbox:0, subscribe, /HL2/gesture/bbox [XR] [MROpenXR][Info ][12:54:20.304612][tid:9e8] XrSpaceProvider_CreatingSessionOriginAnchor [XR] [MROpenXR][Info ][12:54:20.304612][tid:9e8] XrSpaceProvider_CreatingSessionOriginAnchor Exception: This feature is not available on the current platform at RosSharp.RosBridgeClient.MicrosoftSerializer.Serialize[T] (T obj) [0x00000] in <00000000000000000000000000000000>:0 at RosSharp.RosBridgeClient.RosSocket.Send[T] (T communication) [0x00000] in <00000000000000000000000000000000>:0 at RosSharp.RosBridgeClient.RosSocket.Subscribe[T] (System.String topic, RosSharp.RosBridgeClient.SubscriptionHandler1[T] subscriptionHandler, System.Int32 throttle_rate, System.Int32 queue_length, System.Int32 fragment_size, System.String compression) [0x00000] in <00000000000000000000000000000000>:0 at RosSharp.RosBridgeClient.UnitySubscriber1[T].Subscribe () [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ThreadStart.Invoke () [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ContextCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ThreadHelper.ThreadStart () [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ThreadStart.Invoke () [0x00000] in <00000000000000000000000000000000>:0 UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object) UnityEngine.DebugLogHandler:LogException(Exception, Object) UnityEngine.Logger:LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) UnityEngine.<>c:b__0_0(Object, UnhandledExceptionEventArgs) System.UnhandledExceptionEventHandler:Invoke(Object, UnhandledExceptionEventArgs)

But when I run it from the Unity Editor, the subscribed topic seems to be registered fine, without any issues. I have not been able to debug why this is happening. My other Hololens2 Unity 2020.3.48f1 seems to be working alright. Any help in debugging why this exception occurs in this project setup will be greatly helpful. Let me know what other details are required from my side for resolving this

EricVoll commented 6 months ago

Hi, it has been a few years since I did anything with Ros#. Can you post some code? Also, if you have your own message format, did you add a link.xml?

gnanukoth commented 6 months ago

Hi @EricVoll, Thanks for checking! I am not sure what the exact cause of this issue was, but I tried changing the deployment settings and the ROS protocol to different options, a few more times and the issue got resolved somehow. I will close this for now and reach out again if the issue persists. Thanks for your time!