ros2 / ros1_bridge

ROS 2 package that provides bidirectional communication between ROS 1 and ROS 2
Apache License 2.0
452 stars 288 forks source link

Failed to connect to user:35249 #270

Closed Michael-Equi closed 4 years ago

Michael-Equi commented 4 years ago

Immediately after starting up the ros1_bridge dynamic_bridge node and after sourcing all the appropriate setup scripts the node begins printing Failed to connect to user:35249. The port number references at the end seems to change between machines using the same environment. Everything else about the node seems to be working fine as data is still transmitted to and from the ROS2 and ROS1 nodes I am working with.

dirk-thomas commented 4 years ago

The descriptions doesn't contain enough information to either investigate anything nor giving you any suggestions. Please include additional information, e.g. how to reproduce your issue.

Michael-Equi commented 4 years ago

@dirk-thomas Steps to reproduce are building the version I mentioned above from source and running the dynamic bridge (after starting a ROS1 core). I have been working with it on both ARM and X86 architectures on Ubuntu 18.04 and it seems to be an issue with the version. I am not sure if any newer versions, if they exist, have the same issue. It also does not happen ever time it runs but when it does I can not find any correlation to anything going on with the rest of the system.

dirk-thomas commented 4 years ago

This is still not sufficient to reproduce the problem. I don't ever see that message when running the dynamic_bridge: https://github.com/ros2/ros1_bridge/blob/60f903cb159ad4ef59b9b09badf71caa601cba04/src/dynamic_bridge.cpp#L399

For some reason the bridge is unable to connect to the node to retrieve information about its services. Maybe you are stopping nodes while the bridge is running? Anyway without extra context I can only speculate. Therefore you need to provide reproducible steps, step by step instructions what you run on the ROS 1 and ROS 2 side or even better a Dockerfile to just run the instructions.

ScottMcMichael commented 4 years ago

I reproduced this problem with just a rostopic pub/ros2 topic echo pair and was able to fix it by setting these in each of the console instances: export ROS_HOSTNAME=localhost export IGN_IP=127.0.0.1 export ROS_MASTER_URI=http://localhost:11311

dirk-thomas commented 4 years ago

Assuming this is just an environment setup problem I will go ahead and close this ticket for now. Please feel free to comment with more information if this is still a reproducible issue and the ticket can be reopened.

berndpfrommer commented 3 years ago

I had the same issue and it went away by simply restarting the roscore.