clearpathrobotics / robot_upstart

ROS package of helper functions related to bringing up roslaunch on system startup.
BSD 3-Clause "New" or "Revised" License
192 stars 94 forks source link

Add an option to wait forever for ROS_IP #74

Closed msadowski closed 7 months ago

msadowski commented 5 years ago

Another thing that I've come across that I would find particularly useful.

  1. Behaviour before this pull request If an interface name is manually specified then in the created job a call to getifip is made, if the result is an empty string then the job fails.

  2. Observations In two setups with different machines but the same components (main computer running Ubuntu 16.04, the other armbian on a single board computer), where the main computer is sharing the internet connection with the slave (IP is assigned dynamically by main computer). In about 80-90% of the cases the jobs were failing on both machines. I believe it was due to jobs starting when interface has became available but before the IP was assigned.

  3. Solution As a solution I propose an additional loop that will be constantly checking the ROS_IP of the specified interface that runs if --interface_loop is called when running an install scripts.

I'm not sure that is the cleanest approach, I'd love to hear from people that run into similar issues and how they solved them.

mikepurvis commented 4 years ago

Can I get more details about IP is assigned dynamically in your setup? Is this DHCP but between computers on an onboard LAN as opposed to DHCP over wifi? I've only ever used static IPs in these situations.

msadowski commented 4 years ago

@mikepurvis it's been quite a while and I'm not even sure if this problem is still relevant for us, will ask someone from the team to chip in here if they can remember the details.

From what I remember the DHCP was indeed running locally on the onboard LAN but I will try to verify it.

msadowski commented 4 years ago

Verified the setup! Yes, the DHCP is running locally on the robot and I think the problem we had was that our embedded computers were coming up much faster then the rest of the system.