Closed bryceikeda closed 3 years ago
Hi bryceikeda,
Try to build your solution using UWP Socket instead of Web Socket Sharp. I had the same problem (or a similar one) and was solved changing that.
@Rive4
Just tried that and I am still getting the same error.
Hi both 👋 I'll have a look at it later today.
@bryceikeda : I noticed:
"is not a valid type string"
means that the type string Ros received is invalid.
In this UWP Fork all messages must defined their RosMessageName
field slightley differently compared to the normal Ros#.
public const string RosMessageName = "perception/Landmark";
should be public override string RosMessageName => "perception/Landmark";
(This was one of the changes I had to make to get everything serializing with the IL2CPP backend. The same is true for Landmarks.cs
, Observabtion.cs
and Observations.cs
Could you try it with that setup? I think everything else looks fine.
(I did not yet have time to update the RosMsgsGenerator project for this fork. It generates slightley wrong messages...)
@EricVoll
That works! Thanks for looking into this for me.
-Bryce
I fixed the generator to generate properties now.
Hi @EricVoll
I just run into this problem using the current version of the master branch. I used "Auto Generate Messages -> All Messages in directory". Your fix in the post above worked for me, but this means that the RosMsgsGenerator is producing wrong messages again.
Are you using the Unity Menu-Options thing for that? I think I did not adjust the Unity Editor Scripts for that. The console tool in the library folder should work properly.
@jstiefel recompiling the MessageGeneration.dll and pulling it into the /Assets/RosSharp/Plugins folder should do the trick, if you want to use the MessageGeneration in the Unity Menu and not use the Console Tool.
Ok, this makes sense. I used the Unity Menu of RosBridgeClient, but just changed the message manually. Now switching to the console script.
Hi,
I have experienced the same. But even with the console script I had to manually change the action messages.
[ 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 found a bug!
[x ] I am using the latest ROS# version available here on the master branch.
[x] I am adding all required information, code and data files, screenshots and log files so that you can reproduce the problem.
My OS is: Ubuntu 18.04
My Unity Version is: 2019.4.15f1
My ROS Distribution is: Melodic
Here is my bug description: I am trying to use a custom message to communicate with Ros Bridge Websocket but I am getting an error "[id: /topic: 0] subscribe: is not a valid type string". I have tested my custom message with the original Ros Sharp by Martin Bischoff and the custom messages are successfully subscribed to. This leads me to believe it is something with this fork that is the issue. Any idea what it could be?
Perform the following steps reproduce the bug:
Necessary files: Assets.zip
Observed results: error "[id: /topic: 0] subscribe: is not a valid type string"
Expected results: [INFO] [1611354062.824861]: [Client 0] Subscribed to /topic