Roscore fails after restart
I am running ROS Noetic on Ubuntu 20.04.1 LTS
Yesterday I re-installed ROS (it was corrupt) and successfully ran roscore. I left my computer on overnight and this morning it was locked up. I had to do a hard reboot.
Afterwords, when I tried to run roscore, I got the following:
... logging to /home/dtaylor/.ros/log/085907a0-d1ac-11ea-bddb-a1e701cf9cfb/roslaunch-Delta-3256.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
Resource not found: roslaunch
ROS path [0]=/opt/ros/noetic/share/ros
ROS path [1]=/home/dtaylor/catkin_ws/src
ROS path [2]=/opt/ros/noetic/share
The traceback for the exception was written to the log file
The last time this happened, I had to re-install ROS. Is this the only solution?
Asked by dogulas_T on 2020-07-29 10:19:24 UTC
Answers
Did you try source /opt/ros/noetic/setup.bash
?
Asked by praskot on 2020-07-29 15:48:45 UTC
Comments
Thanks praskot, I had the following in my .bachrc file so I wouldn't have to
source /opt/ros/noetic/setup.bash
source ~/catkin_ws/devel/setup.bash
but, just in case that wasn't working I just tried it and got the same results What can I try next?
Asked by dogulas_T on 2020-07-30 14:08:14 UTC
I'm not really sure, from the error, its not able to find the roslaunch right. Check if you have the roslaunch
binary in /opt/ros/noetic/bin
. If you do, add it to the path?
Asked by praskot on 2020-07-30 14:37:09 UTC
It looks like it should be in /opt/ros/noetic/share but it's not. It's also not in /opt/ros/noetic/bin. I did, however, find it in /usr/share and /usr/bin. In /usr/share it is colored blue and in /usr/bin it is colored green. What does that mean?
I added both to my .bachrc file and restarted my terminal but no effect.
Asked by dogulas_T on 2020-07-31 09:49:06 UTC
More information... I had the following line in my .bashrc file: export ROS_PACKAGE_PATH=/home/dtaylor/catkin_ws/src:/opt/ros/noetic/share:/usr/share:/usr/bin This doesn't seem to work. When I put it directly in at the command prompt it did find one of the roslaunch things. Still don't know which is the executable. questions:
- Why does the line not work in my .bashrc file?
- Why does roslauch keep disappearing from where it is supposed to be?
- What is the color scheme in ls -a?
Asked by dogulas_T on 2020-07-31 09:58:21 UTC
Try adding
export ROS_PACKAGE_PATH=/home/dtaylor/catkin_ws/src:/opt/ros/noetic/share:/usr/share:/usr/bin
in the bashrc instead?Unfortunately, I have no clue why this is happening
As mentioned here https://askubuntu.com/questions/17299/what-do-the-different-colors-mean-in-ls blue implies it is a symbolic link to an executable.
Asked by praskot on 2020-07-31 16:57:44 UTC
It looks like it should be in /opt/ros/noetic/share but it's not. It's also not in /opt/ros/noetic/bin. I did, however, find it in /usr/share and /usr/bin. In /usr/share it is colored blue and in /usr/bin it is colored green. What does that mean?
From what you describe, just as in your previous question (ie: #q356392), you appear to be mixing Noetic packages with wiki/UpstreamPackages.
That will not work, as you've found out.
You'll have to fix this before roscore
(and probably other parts of ROS) will start working again.
I added both to my .bachrc file and restarted my terminal but no effect.
This will not affect anything.
Please undo this change.
Asked by gvdhoorn on 2020-08-01 02:34:30 UTC
Comments
gvdhoorn, "you appear to be mixing Noetic packages with wiki/UpstreamPackages". I honestly don't remember doing that. I strictly followed the install instructions at http://wiki.ros.org/ROS/Installation. I didn't even know about the upstream packages. Be that as it may, If I do have a mixed environment, how do I fix it? Can I uninstall everything ROS? Would I have to reformat my hard drive and re-install Ubuntu?
Asked by dogulas_T on 2020-08-13 13:11:21 UTC
If you have a roslaunch
binary/script in /usr/bin
, then you must likely have the python3-roslaunch
package installed.
That's not the same package as ros-noetic-roslaunch
, which would place roslaunch
in /opt/ros/noetic/bin
.
Does dpkg -l | grep roslaunch
return both python3-roslaunch
and ros-noetic-roslaunch
for you, or just python3-roslaunch
? If the latter, that's why you don't have roslaunch
.
As to how you ended up in this situation, I don't know.
Can I uninstall everything ROS?
Yes, you'd essentially remove all ros-noetic-*
packages, and afterwards probably all packages which are then no longer needed (apt
should tell you).
For the upstream packages, you'd have to figure out which packages you have installed. I don't have any specific advice on how to do that.
Would I have to reformat my hard drive and re-install Ubuntu?
That would be the nuclear option, and technically not necessary. As long as you have the right pkgs installed, it should work.
Asked by gvdhoorn on 2020-08-14 06:08:18 UTC
Comments