Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

roslaunch tries to start the roscore nodes by loading the roscore launch file from your ROS distribution, for instance /opt/ros/melodic/etc/ros/roscore.xml. This launch file instructs roslaunch to execute rosversion roslaunch.

If rosversion roslaunch fails for some reason, this error will occur. You should try to run this command separately to see what error is displayed.

A reason why it might fail is if your ROS environment variables are not correct. You should be using source /opt/ros/melodic/setup.bash or similar (see this tutorial), plus a separate Catkin workspace file, to populate variables.

I encountered this issue myself because I was overriding ROS_PACKAGE_PATH incorrectly. Once I fixed it, the error went away.