Closed gianmarco96 closed 5 months ago
So ok I sorted it by using RosSocket rosSocket = new RosSocket(new RosBridgeClient.Protocols.WebSocketSharpProtocol(uri)); rather than WebSocketNetProtocol, is there a reason why the latter would not work?
outdated / closing due to inactivity
I have a question!
Here is my question:
Hello, thank you for the fantastic work you did with library!
I'm really struggling to call services from Unity. I have checked the wiki and the examples, but they do not seem to work for me. I'm sure I'm being thick and don't think it's necessarily a ROS# issue. I don't really understand the example of call service shown below:
Or better I tried doing the same exact thing to no result. The server is running on the ROS side and when I call it from unity nothing seems to happen. I have created the ServiceCallHandler and generated the service request and response as per instruction. I could provide the example of my application, but I thought that would be very specific to my use case, while instead a more generic example could be useful to everyone.
Let's say I wanted to call the /spawn service from turtlesim node, which everyone has access to, from Unity using this library. What would I need to do? Possibly step by step?
I have used this library for over a year now, but never managed to use a service properly (I always had to find a work around using topics), I reckon I'm not the only one so I'm sure a more generic guide would be useful to others as well.
Thank you so much for your help,