0
$\begingroup$

Rosanswers logo

Running roscore gives this error:

... logging to /home/atul/.ros/log/1bd30c60-bb61-11ea-8a96-39cbecce8d08/roslaunch-atul-18118.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]=/opt/ros/noetic/share
The traceback for the exception was written to the log file

I was following the beginners tutorials from http://wiki.ros.org/ROS/Tutorials. Initially, roscore was working and I was able to go through all the tutorials. When I tried to run roswtf from http://wiki.ros.org/ROS/Tutorials/Getting%20started%20with%20roswtf tutorial, it said that roswtf not found and can be installed by sudo apt install python3-roswtf. I did that and while executing

$ roscd rosmaster
$ roswtf

from the tutorial, I got a warning and it suggested me to run sudo rosdep init and then rosdep update. After doing both, there were no warnings and roswtf gave the output as shown in the tutorial. But for the next part of the tutorial, it said to run roscore, but since that time, I'm getting this error and roscore is not starting. Even roscd was not working, so I ran sudo apt install ros-noetic-rosbash which fixed the roscd problem.

This is what I get after running env | grep ROS

ROS_VERSION=1
ROS_PYTHON_VERSION=3
ROS_PACKAGE_PATH=/opt/ros/noetic/share
ROS_ETC_DIR=/opt/ros/noetic/etc/ros
ROS_ROOT=/opt/ros/noetic/share/ros
ROS_DISTRO=noetic

Please help me

I looked up in /var/log/apt/history.log and found out that running sudo apt install python3-rosdep2 removed 49 packages, which seems to have caused all the problems:

Start-Date: 2020-07-01  10:14:06
Commandline: apt install python3-rosdep2
Requested-By: atul (1000)
Install: python3-rosdep2:amd64 (0.18.0-1)
Remove: ros-noetic-rospy:amd64 (1.15.7-1focal.20200529.061557), ros-noetic-nodelet:amd64 (1.10.0-1focal.20200529.061908), ros-noetic-rqt-common-plugins:amd64 (0.4.9-1focal.20200615.143035), ros-noetic-qt-gui-cpp:amd64 (0.4.1-1focal.20200612.013014), ros-noetic-rqt-bag:amd64 (0.4.13-1focal.20200613.043147), ros-noetic-rqt-shell:amd64 (0.4.10-1focal.20200613.043315), ros-noetic-rqt-dep:amd64 (0.4.10-1focal.20200613.043407), ros-noetic-rosbag:amd64 (1.15.7-1focal.20200529.063008), ros-noetic-rqt-launch:amd64 (0.4.8-1focal.20200613.043540), ros-noetic-rqt-gui:amd64 (0.5.2-1focal.20200613.042207), ros-noetic-rqt-reconfigure:amd64 (0.5.3-1focal.20200615.142604), ros-noetic-rqt-publisher:amd64 (0.4.9-1focal.20200613.042853), ros-noetic-rosunit:amd64 (1.15.4-1focal.20200529.055729), ros-noetic-rqt-action:amd64 (0.4.9-1focal.20200613.043629), ros-noetic-rosnode:amd64 (1.15.7-1focal.20200529.063935), ros-noetic-rqt-gui-py:amd64 (0.5.2-1focal.20200613.042533), ros-noetic-rqt-msg:amd64 (0.4.9-1focal.20200613.043546), python3-rosdep-modules:amd64 (0.19.0-1), ros-noetic-rqt-graph:amd64 (0.4.14-1focal.20200613.043132), ros-noetic-rostest:amd64 (1.15.7-1focal.20200529.062051), ros-noetic-rostopic:amd64 (1.15.7-1focal.20200529.063544), ros-noetic-roslib:amd64 (1.15.4-1focal.20200529.055538), ros-noetic-rosbag-storage:amd64 (1.15.7-1focal.20200529.062400), ros-noetic-rqt-bag-plugins:amd64 (0.4.13-1focal.20200613.043434), ros-noetic-rosmsg:amd64 (1.15.7-1focal.20200529.063551), ros-noetic-rospack:amd64 (2.6.2-1focal.20200529.055340), ros-noetic-rqt-srv:amd64 (0.4.8-1focal.20200613.043637), ros-noetic-rqt-py-common:amd64 (0.5.2-1focal.20200613.042121), ros-noetic-rosservice:amd64 (1.15.7-1focal.20200529.063848), ros-noetic-rosbash:amd64 (1.15.4-1focal.20200529.055532), ros-noetic-rqt-top:amd64 (0.4.9-1focal.20200613.043325), ros-noetic-roslaunch:amd64 (1.15.7-1focal.20200529.061835), ros-noetic-rqt-web:amd64 (0.4.9-1focal.20200613.043402), ros-noetic-actionlib:amd64 (1.13.1-1focal.20200529.064105), ros-noetic-rqt-logger-level:amd64 (0.4.11-1focal.20200613.043252), ros-noetic-image-transport:amd64 (1.12.0-1focal.20200529.064210), ros-noetic-ros-tutorials:amd64 (0.10.1-1focal.20200529.062752), ros-noetic-rqt:amd64 (0.5.2-1focal.20200613.042744), ros-noetic-rqt-gui-cpp:amd64 (0.5.2-1focal.20200613.042207), ros-noetic-rqt-image-view:amd64 (0.4.15-1focal.20200613.043008), ros-noetic-rqt-topic:amd64 (0.4.12-1focal.20200613.043300), ros-noetic-rqt-py-console:amd64 (0.4.9-1focal.20200613.043249), ros-noetic-rospy-tutorials:amd64 (0.10.1-1focal.20200529.062434), ros-noetic-rqt-console:amd64 (0.4.11-1focal.20200613.043501), ros-noetic-rqt-service-caller:amd64 (0.4.9-1focal.20200613.042931), ros-noetic-rqt-plot:amd64 (0.4.12-1focal.20200613.043159), ros-noetic-turtlesim:amd64 (0.10.1-1focal.20200529.061639), ros-noetic-pluginlib:amd64 (1.13.0-1focal.20200529.060526), ros-noetic-dynamic-reconfigure:amd64 (1.7.0-1focal.20200529.064038)
End-Date: 2020-07-01  10:14:45

As for sudo apt install python3-roswtf, it did the following:

Start-Date: 2020-07-01  10:12:40
Commandline: apt install python3-roswtf
Requested-By: atul (1000)
Install: python3-rosservice:amd64 (1.14.3+ds1-11ubuntu5, automatic), python3-rostopic:amd64 (1.14.3+ds1-11ubuntu5, automatic), python3-rosmsg:amd64 (1.14.3+ds1-11ubuntu5, automatic), python3-roswtf:amd64 (1.14.3+ds1-11ubuntu5), python3-rosnode:amd64 (1.14.3+ds1-11ubuntu5, automatic)
End-Date: 2020-07-01  10:12:49

Originally posted by AtulKarn on ROS Answers with karma: 3 on 2020-07-01

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

it said that roswtf not found and can be installed by sudo apt install python3-roswtf

It's unfortunate, but following that advice -- which comes from Ubuntu itself btw -- you've most likely broken your ROS install.

The package you've installed is an UpstreamPackage, not the version which is part of ROS Noetic.

Note the name of the package you installed: python3-roswtf.

The regular package is called ros-noetic-roswtf.

As the upstream version depends on other upstream packages and conflicts with the regular ROS packages, the regular ROS packages get uninstalled. This is most likely the cause of roslaunch no longer working.

You'll want to reinstall the regular ROS packages.

I expect things to start working again after that.


Edit:

I had also run sudo apt install puthon3-rosdep2 which seems to have removed all the packages. It removed 49 packages.

then it might be prudent to just try a reinstall. Unless you can figure out from the apt log which packages specifically were removed.


Edit 2:

I looked up in /var/log/apt/history.log and found out that running sudo apt install python3-rosdep2 removed 49 packages, which seems to have caused all the problems:

you should be able to restore your ROS install to a working state by reinstalling those packages.

apt will likely complain about those packages conflicting with the upstream packages, but you should just let it remove those.


Originally posted by gvdhoorn with karma: 86574 on 2020-07-01

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by gvdhoorn on 2020-07-01:
For a related discussion, see “upstream packages” becoming increasingly a problem on ROS Discourse.

Comment by AtulKarn on 2020-07-01:
Do I need to reinstall the whole ROS distro or only specific packages?

Comment by gvdhoorn on 2020-07-01:
That will depend on how much was uninstalled when you installed python3-roswtf. I don't know. Only you can find out.

You could take a look at /var/log/apt/history.log and see what was installed and uninstalled. Note: log entries are appended to that file, so recent operations will be at the end of the file.

Comment by AtulKarn on 2020-07-01:
I did sudo apt install ros-noetic-roslaunch and now roscore is working. Thanks for the advice. I also checked the log files. lnstalling python3-roswtf installed :

Start-Date: 2020-07-01  10:12:40
Commandline: apt install python3-roswtf
Requested-By: atul (1000)
Install: python3-rosservice:amd64 (1.14.3+ds1-11ubuntu5, automatic), python3-rostopic:amd64 (1.14.3+ds1-11ubuntu5, automatic), python3-rosmsg:amd64 (1.14.3+ds1-11ubuntu5, automatic), python3-roswtf:amd64 (1.14.3+ds1-11ubuntu5), python3-rosnode:amd64 (1.14.3+ds1-11ubuntu5, automatic)
End-Date: 2020-07-01  10:12:49

Comment by AtulKarn on 2020-07-01:
I had also run sudo apt install puthon3-rosdep2 which seems to have removed all the packages. It removed 49 packages.

Comment by gvdhoorn on 2020-07-01:
Please add this to your original question text, not here in comments.

Use the edit button/link to edit your original question.

Comment by AtulKarn on 2020-07-01:
Thanks a lot for your help. I reinstalled all the packages and everything looks good now.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.