Exception with string subscriber
- [x] I am at the right place and my issue is directly related to ROS#. General technical questions I would post e.g. at ROS Answers or Stack Overflow. For library-specific questions I would look for help in the corresponding library forums.
- [x] I have thoroughly read the Contributing Guideline and writing this issue is the right thing to do in my case.
I have a question!
- [x] I searched the Wiki, open and closed issues for an answer. I tried my best to find the answer by myself without success. I believe that the discussion we will have in this issue, and the solutions we might find, will help me, and likely other community members who have a similar problem. Here is my question: I am using Rossharp with Unity 2020.3.48f1 for Hololens2 My application is able to connect to the rosbridge server, but the subscriber is not getting setup properly, the subscribed topic is not registered with rosbridge. I got the following exception:
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.SubscriptionHandler
1[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
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?
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!