Problem with roslaunch on rc.local startup
Hello,
I tried launching some nodes on startup via rc.local, but I have the following errors on some of the startups:
[ 45.809342] rc.local[661]: RLException: ERROR: could not contact master [http://localhost:11311]
[ 45.821666] rc.local[661]: The traceback for the exception was written to the log file
[ 45.844191] rc.local[661]: ... logging to /root/.ros/log/3b1cabe6-64e9-11e9-8f36-74e1828a3ed5/roslaunch-arm-945.log
[ 45.845040] rc.local[661]: Checking log directory for disk usage. This may take awhile.
[ 45.845630] rc.local[661]: Press Ctrl-C to interrupt
[ 45.846329] rc.local[661]: Done checking log file disk usage. Usage is <1GB.
[ 45.846840] rc.local[661]: 2;/home/tucer/catkin_ws/src/electronicload/launch/launcher.launch
[ 45.847310] rc.local[661]: started roslaunch server http://arm:45779/
[ 45.847892] rc.local[661]: SUMMARY
[ 45.860883] rc.local[661]: ========
[ 45.864314] rc.local[661]: PARAMETERS
[ 45.865892] rc.local[661]: * /rosdistro: melodic
[ 45.868293] rc.local[661]: * /rosversion: 1.14.3
[ 45.876385] rc.local[661]: NODES
[ 45.877925] rc.local[661]: /
[ 45.880247] rc.local[661]: LCD (electronicload/LCD.py)
[ 45.882944] rc.local[661]: controller (electronicload/controller.py)
[ 45.888258] rc.local[661]: logger_to_file (electronicload/logger_to_file.py)
[ 45.892181] rc.local[661]: sensors (electronicload/sensors.py)
[ 45.893536] rc.local[661]: shutdown (electronicload/shutdown.py)
[ 45.894667] rc.local[661]: auto-starting new master
[ 45.900240] rc.local[661]: process[master]: started with pid [1175]
[ 46.031643] rc.local[661]: Traceback (most recent call last):
[ 46.036751] rc.local[661]: File "/opt/ros/melodic/bin/rosmaster", line 35, in <module>
[ 46.039083] rc.local[661]: rosmaster.rosmaster_main()
[ 46.040722] rc.local[661]: File "/opt/ros/melodic/lib/python2.7/dist-packages/rosmaster/main.py", line 84, in rosmaster_main
[ 46.045008] rc.local[661]: configure_logging()
[ 46.048811] rc.local[661]: File "/opt/ros/melodic/lib/python2.7/dist-packages/rosmaster/main.py", line 58, in configure_logging
[ 46.051817] rc.local[661]: _log_filename = rosgraph.roslogging.configure_logging('rosmaster', logging.DEBUG, filename=filename)
[ 46.057809] rc.local[661]: File "/opt/ros/melodic/lib/python2.7/dist-packages/rosgraph/roslogging.py", line 185, in configure_logging
[ 46.063184] rc.local[661]: logging.config.fileConfig(config_file, disable_existing_loggers=False)
[ 46.070380] rc.local[661]: File "/usr/lib/python2.7/logging/config.py", line 85, in fileConfig
[ 46.074387] rc.local[661]: handlers = _install_handlers(cp, formatters)
[ 46.075661] rc.local[661]: File "/usr/lib/python2.7/logging/config.py", line 163, in _install_handlers
[ 46.081225] rc.local[661]: h = klass(*args)
[ 46.082611] rc.local[661]: File "/opt/ros/melodic/lib/python2.7/dist-packages/rosgraph/roslogging.py", line 230, in __init__
[ 46.083944] rc.local[661]: from rospy.rostime import get_time, is_wallclock
[ 46.085346] rc.local[661]: File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/__init__.py", line 49, in <module>
[ 46.088288] rc.local[661]: from .client import spin, myargv, init_node, \
[ 46.089780] rc.local[661]: File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/client.py", line 60, in <module>
[ 46.092281] rc.local[661]: import rospy.impl ...
Do you have other options than using
rclocal
? If so #q290599 might help you launch nodes on startup (but not usingrclocal
).@Delb I tried systemd service but had the same results. I found a way around, if you are interested you can check the answers!