uml-robotics / ROS.NET_Unity

A wrapper around ROS.NET to create precompiled Unity plugin DLLs for use in Unity scripts
BSD 2-Clause "Simplified" License
26 stars 10 forks source link

Can't launch the demo #2

Closed HachemLamti closed 7 years ago

HachemLamti commented 7 years ago

Hi Eric

Nice work.

I tried to follow your instructions in order to communicate with a remote ROS machine on Ubuntu and it works. I can publish topics and check them on the master machine. However, I couldn't display any data because it seems that the robot isn't sending anything.

I wanted to know what am I supposed to get in Unity side ??? is it a robot ? a map ? a camera ? because right now the only thing I get when I play the scene is the tri-axes. I don't understand if I did something wrong.

Besides, your blog www.word.emccann.net/2016/03/ros-netunity-helloworld/ is unreachable

Thanks

allspawj commented 7 years ago

If you are able to publish but not subscribe from ROS.NET the first thing I would check is your windows firewall. It must be disabled to receive messages. Also make sure that you are setting your ROS_HOSTNAME to something the other computer can resolve.

HachemLamti commented 7 years ago

logfile.pdf

Hi Jordan Thank you for your Email. I deactivated my firewall but it seems that the same issue persists. I think that my robot is not sending anything.

What I want to do is just to execute the default scene included with the Unity package.

Attached you can find a screenshot of my Unity scene. Please le me know if you need other resources.

Bests rosissues

allspawj commented 7 years ago

Sorry took so long to respond to this.

Do you have something publishing a robot state outside of Unity? I believe this sample only subscribes to the transforms of an existing robot, it doesn't simulate one on it's own. You will need to startup a stage or gazebo sim if you want to visualize something meaningful.

HachemLamti commented 7 years ago

Hi Jordan

Wonderfull !!!! I tried to launch a gazebo on uwsim environment and I was able to vizualize the same model on Unity (although the orientation is inversed).

My question is : is it possible to use this wonderful plugin to publish topics from my Unity simulated scene to the remote server or should I code it from scratch ?

Thank you very much for your help it works perfectly

allspawj commented 7 years ago

Absolutely. It looks like there isn't an example of publishing a message here so I will probably add something.

If you look at one of the subscribers (like https://github.com/uml-robotics/ROS.NET_Unity/blob/master/Assets/Scripts/CompressedImageDisplay.cs) you can see an example of how to setup a node. Just create a publisher, a message and publish it. If you are familiar with the ROS c++ or python syntax it should be very intuitive.