It can be unclear from the output of the driver whether it has actually started. I've added a few more messages which should make it obvious that everything has started successfully.
I've also added some loops which wait for the boot process to finish. At the moment an rpc error will exit the startup process even if the robot is actually on. The startup time from power switch to being able to start the driver is approximately 2.5 minutes. The fans becoming quieter is an indicator that boot is almost done, but still can fail to create some of the clients.
I added an except for the login error that happens when the user/password is wrong, which would just crash the driver. Now it prints the error message and exits startup.
This makes it possible to start the driver whenever you want, and even if the robot isn't fully booted, by the time you start everything else, the driver should be up and running.
A startup with the robot fully booted looks like
[INFO] [1654087985.268975] [/spot/spot_ros]: Starting ROS driver for Spot
[INFO] [1654087985.271119] [/spot/spot_ros]: Initialising robot at 192.168.50.3
[INFO] [1654087985.272404] [/spot/spot_ros]: Trying to authenticate with robot...
[INFO] [1654087985.494946] [/spot/spot_ros]: Successfully authenticated.
[INFO] [1654087985.531523] [/spot/spot_ros]: Creating clients...
[INFO] [1654087986.527329] [/spot/spot_ros]: Driver started
Here's what startup looks like when running the driver a few seconds after powering the robot on.
[INFO] [1654087616.110676] [/spot/spot_ros]: Starting ROS driver for Spot
[INFO] [1654087616.116868] [/spot/spot_ros]: Initialising robot at 192.168.50.3
[INFO] [1654087616.123330] [/spot/spot_ros]: Trying to authenticate with robot...
[WARN] [1654087634.494173] [/spot/spot_ros]: Failed to communicate with robot: _InactiveRpcError: The robot may be offline or otherwise unreachable.
Ensure the robot is powered on and you can ping 192.168.50.3. Robot may still be booting. Will retry in 15 seconds
[INFO] [1654087649.505766] [/spot/spot_ros]: Trying to authenticate with robot...
[WARN] [1654087649.513274] [/spot/spot_ros]: Failed to communicate with robot: _InactiveRpcError: The robot may be offline or otherwise unreachable.
Ensure the robot is powered on and you can ping 192.168.50.3. Robot may still be booting. Will retry in 15 seconds
[INFO] [1654087664.519517] [/spot/spot_ros]: Trying to authenticate with robot...
[WARN] [1654087664.524917] [/spot/spot_ros]: Failed to communicate with robot: _InactiveRpcError: The robot may be offline or otherwise unreachable.
Ensure the robot is powered on and you can ping 192.168.50.3. Robot may still be booting. Will retry in 15 seconds
[INFO] [1654087679.543177] [/spot/spot_ros]: Trying to authenticate with robot...
E0601 13:47:59.551512229 1364669 hpack_parser.cc:1216] Error parsing metadata: error=invalid value key=content-type value=text/html
[WARN] [1654087679.553023] [/spot/spot_ros]: Failed to communicate with robot: _InactiveRpcError: An error occurred trying to reach a service on the robot.
Ensure the robot is powered on and you can ping 192.168.50.3. Robot may still be booting. Will retry in 15 seconds
[INFO] [1654087694.571444] [/spot/spot_ros]: Trying to authenticate with robot...
E0601 13:48:14.580671714 1364669 hpack_parser.cc:1216] Error parsing metadata: error=invalid value key=content-type value=text/html
[WARN] [1654087694.582581] [/spot/spot_ros]: Failed to communicate with robot: _InactiveRpcError: An error occurred trying to reach a service on the robot.
Ensure the robot is powered on and you can ping 192.168.50.3. Robot may still be booting. Will retry in 15 seconds
[INFO] [1654087709.588143] [/spot/spot_ros]: Trying to authenticate with robot...
E0601 13:48:29.597074138 1364669 hpack_parser.cc:1216] Error parsing metadata: error=invalid value key=content-type value=text/html
[WARN] [1654087709.597806] [/spot/spot_ros]: Failed to communicate with robot: _InactiveRpcError: An error occurred trying to reach a service on the robot.
Ensure the robot is powered on and you can ping 192.168.50.3. Robot may still be booting. Will retry in 15 seconds
[INFO] [1654087724.615830] [/spot/spot_ros]: Trying to authenticate with robot...
E0601 13:48:44.624074540 1364669 hpack_parser.cc:1216] Error parsing metadata: error=invalid value key=content-type value=text/html
[WARN] [1654087724.626066] [/spot/spot_ros]: Failed to communicate with robot: _InactiveRpcError: An error occurred trying to reach a service on the robot.
Ensure the robot is powered on and you can ping 192.168.50.3. Robot may still be booting. Will retry in 15 seconds
[INFO] [1654087739.644673] [/spot/spot_ros]: Trying to authenticate with robot...
[INFO] [1654087739.884266] [/spot/spot_ros]: Successfully authenticated.
[INFO] [1654087739.925653] [/spot/spot_ros]: Creating clients...
[WARN] [1654087740.008580] [/spot/spot_ros]: Unable to create client service: Service name "graph-nav-service" has not been registered. This usually means the robot hasn't finished booting yet. Will wait 15 seconds and try again.
[WARN] [1654087755.085078] [/spot/spot_ros]: Unable to create client service: Service name "estop" has not been registered. This usually means the robot hasn't finished booting yet. Will wait 15 seconds and try again.
[INFO] [1654087770.304157] [/spot/spot_ros]: Driver started
It can be unclear from the output of the driver whether it has actually started. I've added a few more messages which should make it obvious that everything has started successfully.
I've also added some loops which wait for the boot process to finish. At the moment an rpc error will exit the startup process even if the robot is actually on. The startup time from power switch to being able to start the driver is approximately 2.5 minutes. The fans becoming quieter is an indicator that boot is almost done, but still can fail to create some of the clients.
I added an except for the login error that happens when the user/password is wrong, which would just crash the driver. Now it prints the error message and exits startup.
This makes it possible to start the driver whenever you want, and even if the robot isn't fully booted, by the time you start everything else, the driver should be up and running.
A startup with the robot fully booted looks like
Here's what startup looks like when running the driver a few seconds after powering the robot on.