Ask Your Question
0

roscore not working (upstream packages)

asked 2020-07-01 01:08:20 -0500

AtulKarn gravatar image

updated 2020-07-01 04:25:10 -0500

gvdhoorn gravatar image

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/Get... 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 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2020-07-01 03:02:34 -0500

gvdhoorn gravatar image

updated 2020-07-01 03:45:03 -0500

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.

edit flag offensive delete link more

Comments

For a related discussion, see “upstream packages” becoming increasingly a problem on ROS Discourse.

gvdhoorn gravatar image gvdhoorn  ( 2020-07-01 03:03:28 -0500 )edit

Do I need to reinstall the whole ROS distro or only specific packages?

AtulKarn gravatar image AtulKarn  ( 2020-07-01 03:15:15 -0500 )edit

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.

gvdhoorn gravatar image gvdhoorn  ( 2020-07-01 03:19:46 -0500 )edit

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
AtulKarn gravatar image AtulKarn  ( 2020-07-01 03:29:27 -0500 )edit

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

AtulKarn gravatar image AtulKarn  ( 2020-07-01 03:31:18 -0500 )edit

Please add this to your original question text, not here in comments.

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

gvdhoorn gravatar image gvdhoorn  ( 2020-07-01 03:37:48 -0500 )edit

Thanks a lot for your help. I reinstalled all the packages and everything looks good now.

AtulKarn gravatar image AtulKarn  ( 2020-07-01 04:17:04 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2020-07-01 00:51:27 -0500

Seen: 35 times

Last updated: Jul 01