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

Revision history [back]

click to hide/show revision 1
initial version

I suspect you're using your computer's IP address instead of the loopback address in your ROS_MASTER_URI and ROS_IP, and that your computer gets assigned a different IP address when it renews its DHCP lease.

Since all of the running nodes are connected locally, they won't have any trouble when your IP address changes.

If you have nodes that advertise their topics on your machine's IP address, and the IP address changes, those nodes won't be updated. Since they're still using the old IP address, other nodes won't be able to connect.

There are a few ways to fix this, depending on your requirements:

  • Use localhost in your ROS_MASTER_URI and ROS_IP/ROS_HOSTNAME
  • If you have a hostname and it doesn't change when your IP changes, use that in your ROS_IP and ROS_HOSTNAME
  • Write a script which detects when your hostname changes, and restarts all of your nodes
  • Fix ROS so that it deals with IP address changes (this will probably be quite a bit of work)

I suspect you're using your computer's IP address instead of the loopback address in your ROS_MASTER_URI and ROS_IP, and that your computer gets assigned a different IP address when it renews its DHCP lease.

Since all of the running nodes are connected locally, they won't have any trouble when your IP address changes.

If you have nodes that advertise their topics on your machine's IP address, and the IP address changes, those nodes won't be updated. Since they're still using the old IP address, other nodes won't be able to connect.

There are a few ways to fix this, depending on your requirements:

  • Use localhost in your ROS_MASTER_URI and ROS_IP/ROS_HOSTNAME
  • If you have a hostname and it doesn't change when your IP changes, use that in your ROS_IP and ROS_HOSTNAME
  • Write a script which detects when your hostname changes, and restarts all of your nodes
  • Fix ROS so that it deals with IP address changes (this will probably be quite a bit of work)

EDIT

Give your log files, it looks like your system isn't having hostname problems.

The real problem here is that the publisher is rejecting new connections. The relevant error message from your log file is:

error: [Errno 104] Connection reset by peer

You should go look at the logs for your publisher node to see if it's getting any new connection requests, and hopefully you'll find a reason there about why it's rejecting them.