code-iai / ROSIntegration

Unreal Engine Plugin to enable ROS Support
MIT License
411 stars 133 forks source link

Connection is established but pub/sub are not working #135

Closed arsh09 closed 4 years ago

arsh09 commented 4 years ago

Hello,

Thank you for this plugin. I am trying to make a simple String Publisher (or Subscriber) work using the basic examples from README document.

After all the setting up and building, I was able to make a connection to TCP server (as evident from the image below):

Connection to Rosbridge TCP Server - ROS side log

Connection to Rosbridge TCP Server - UE side log

However, I am not able to send or receive data over topics. I tired Blueprint publisher and subscriber as follow (images)

ROS Side Topic Publisher with 200 Hz

UE4 side topic subscriber

Any advise would be greatly appreciated.

Also, I want to point out that I read almost all the issues on the git repo. There was one similar to mine where the guy solved it by removing 'Anaconda' path removed from the environment variable. But I tried to remove Python27 path from environment and I have tested this on UE4.24 with Ubuntu 16.04 and ROS Kinetic.

P.S: Also, why the client (UE4) subscribed to two random topics (Marker and MarkerArray type)? Is it something that I have to published my message to?

Thank you

arsh09 commented 4 years ago

After digging into the plugin code, I found out that OnConstruct event is never fired in my case.

As I am a fairly new user on UE4, I was not sure how to debug it. What I ended up doing is that I saw there are two topics that are being subscribed from the UE ROSIntegrationCore.cpp file. These are Marker and MarkerArray type. I added another subscriber and log the message that I recived and it works.

I am still not sure why any of my Cpp or Blueprint class does not publish or subscribe to a topic. Am I suppose to add this to any entity in UE world (like it happens in Unity?)