question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ROS Unity unable to connect with no connection information

See original GitHub issue

I am trying to run the unity-ros-integration tutorials following every step. Was able to build the catkin project, set environment, and get the robo_demo.launch file to run. However, Ping from both devices, which are connected to same wifi, and the pings were successful. But if I run the pos publisher rostopic echo pos_rot from windows unity and then a subscriber from Linux ROS, the terminal hangs with the following message:

WARNING: topic [/pos_rot] does not appear to be published yet

ROS Master is running, and no message about connection is available when I start or stop Unity editor play.

setting /run_id to 5c1a867c-f87d-11eb-b01b-336712ef486f
process[rosout-1]: started with pid [174801]
started core service [/rosout]
process[position_service_and_endpoint/position_service-2]: started with pid [174808]
process[position_service_and_endpoint/server_endpoint-3]: started with pid [174809]

Just each time when I stop Unity editor play, on Linux ROS master output the following exception:

[ERROR] [1628450321.770259]: Exception: No more data available
[ERROR] [1628450346.369471]: Exception: No more data available
[ERROR] [1628450567.044703]: Exception: No more data available

No errors given from the player log,

It seems that there is some connection between ROS and Unity judging from the screenshot. As you can see from the blue error on the upper left corner: Unity

Environment (please complete the following information, where applicable):

  • Unity Version: [e.g. Unity 2020.3.13f1]
  • Unity machine OS + version: [Windows 10]
  • ROS machine OS + version: [Ubuntu 20.04LTS, ROS Noetic]
  • ROS–Unity communication: [Wifi]
  • Branch or version: [master]

Please, can anyone help.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
at669commented, Aug 10, 2021

Glad to hear the other demos worked! After further investigation, you’re absolutely correct, the robo_demo.launch file is outdated. The paths in the launchfile point to the wrong locations–I’ve created an internal ticket for investigation.

Until the tutorial is fully updated, as a workaround, you should be able to replace your launch file with something like this:

<launch>
    <param name="ROS_IP" value="192.168.44.73" />
    <node name="position_service" pkg="unity_robotics_demo" type="position_service.py" args="--wait" output="screen" respawn="true" />
    <node name="server_endpoint" pkg="ros_tcp_endpoint" type="default_server_endpoint.py" args="--wait" output="screen" respawn="true" />
</launch>

Ticket#: AIRO-1118

0reactions
at669commented, Aug 13, 2021

Hi @keli95566, the fix has been merged to the dev branch and will eventually make its way to main in the next release. Feel free to try out the changes on your end! I’ll close this issue for now, but go ahead and reopen it if the problem persists, or open a new issue if a new problem crops up. Thanks for your contribution!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't estabilish connection between ROS and Unity
Hi everyone, I'm trying to estabilish a connection between ROS and unity using https://github.com/Unity-Technologies/ROS-TCP-Connector .
Read more >
ROS Connection Problem · Issue #201 · Unity ...
Try changing the ROS Machine's IP Address to something else. Set your IP using a static IP to a different value, then set...
Read more >
Help! Meet problems about connecting the ros with unity ...
I tried ROS# in this tutorial but found that the response is incorrect. I cannot run the unity sample correctly.
Read more >
Unable to publish message to ROS Bridge from Unity [closed]
Unable to publish message to ROS Bridge from Unity [closed] - ROS Answers: Open Source Q&A Forum.
Read more >
Pick-and-Place Workflow in Unity 3D Using ROS
From the Unity menu bar, select Robotics > ROS Settings, to open the tool to specify the IP address of the machine running...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found