ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to publish a message from Unity3D to ROS node?

asked 2018-01-15 21:32:42 -0600

updated 2018-01-17 02:14:10 -0600

Hello,

I am trying to send over msg of type string from Unity to my ROS node that contains the subscriber topic, over rosbridge_websocket.

I have already tried the following:

ROS-Sharp: With ROS Sharp I have issues with UWP (Universal Windows Platform) build. The ROSBridelib library is written in order to target .NET 4 and above, however, they are using websocketsharp library websocket-sharp library we are using does not support UWP.

To accommodate that, I used directives:

#If WINDOWS_UWP    

#endif

and also tried using the ROSbridgeLib directly as an imported package instead of using it as a .dll file.

Related: https://github.com/siemens/ros-sharp/...

But I still got the error:

Assets/RosSocket.cs(201,45): error CS1644: Feature **null propagating operator** cannot be used because it is not part of the C# 4.0 language specification

Unity ROS : This is what I have done while using Unity ROS. https://answers.ros.org/question/2788...

I did have some partial success using Unity ROS, in publishing a message topic from ROS to Unity3D, however the other way round has not been achieved.

Any help will be appreciated.

edit retag flag offensive close merge delete

Comments

1

I can't help you, but if I could, I was probably going to need a lot more information. "has not been achieved", "struggling for weeks" get the point across that you're encountering difficulty, but without more info on what exactly you have done, used, what failed, what you observed, etc, it's ..

gvdhoorn gravatar image gvdhoorn  ( 2018-01-16 02:28:40 -0600 )edit
1

.. really hard to help you.

At the moment your post is equivalent to: "my car doesn't work, please help me".

gvdhoorn gravatar image gvdhoorn  ( 2018-01-16 02:29:21 -0600 )edit

And a related github issue over at ros-sharp: siemens/ros-sharp#33.

gvdhoorn gravatar image gvdhoorn  ( 2018-01-17 02:04:54 -0600 )edit

The reason for posting this question is to ask the community if there is any other alternative apart from the ones i have been using. If you see the linked ros answer question, one of the contributor suggested me to use the ros-sharp, so been working on that, however no success with that yet.

arunavanag gravatar image arunavanag  ( 2018-01-17 02:08:09 -0600 )edit

It's related not duplicate. If I can solve the issue https://github.com/siemens/ros-sharp/... I will add that as a solution here. For the time being, I am looking into alternatives if any/

arunavanag gravatar image arunavanag  ( 2018-01-17 02:08:49 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-02-25 00:15:43 -0600

I have used Unity ROS finally to have this solved which supports Universal Platform Support; which implies it can be used for VR devices, and similar application.

I had to make some changes to the data model that is sent over the rosbridge. Kindly follow Issue #11 for further details.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-01-15 21:32:42 -0600

Seen: 4,113 times

Last updated: Feb 25 '18