ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Rviz and other packages unexpectedly removed

asked 2020-11-27 12:27:38 -0500

sisko gravatar image

updated 2022-03-04 06:31:45 -0500

lucasw gravatar image

I had my ROS Melodic environment perfectly setup. I was able to launch my package and see my robot model in Rviz.

I tried finding and installing the URDF package as an Ubuntu linux package by the following command:

sudo apt-get install liburdfdom-tools -y

It seemed to be the wrong package so I uninstalled it using:

sudo apt-get remove --purge ros-melodic-urdf -y

The output shocked me. It reported that a lot of packages had been uninstalled including Ros-Melodic-Desktop-Ful, robot_state_publisher etc.

I restarted my computer and tried running my package and confirmed my suspision - Rviz was no longer on my system.

What I would like to understand is why as my uninstall command did not specify Rviz ?

edit retag flag offensive close merge delete

Comments

1

What I would like to understand is why as my uninstall command did not specify Rviz ?

note: this is not a "ROS thing", but the way dependency resolution works in apt and many other package managers.

If A depends on B, and you remove B, the package manager will have to remove A as well.

gvdhoorn gravatar image gvdhoorn  ( 2020-11-28 07:49:24 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-11-27 17:21:25 -0500

updated 2020-11-27 17:22:13 -0500

Installing ros packages should be done using apt install ros-<distro>-<package>. I think what you want is the ros-melodic-urdf package.

Removing system packages can uninstall related packages since they are technically no longer required by the package being removed. When you use the -y flag, it will just go ahead and remove all those packages it feels are no longer needed. In the future, try remove without the -y flag. This will display a list of the packages it feels are unnecessary and you can choose not to remove then.

In this case, you can now install the ros-desktop for core packages or ros-desktop-full for rviz and gazebo and other supporting packages. apt install ros-melodic-desktop-full

edit flag offensive delete link more

Comments

Removing system packages can uninstall related packages since they are technically no longer required by the package being removed.

Actually, in this case, it's most likely the other way around: ros-melodic-urdf is a dependency of many other packages. So if you ask apt to remove ros-melodic-urdf, it will do so, but it will also remove all the packages which depend onros-melodic-urdf.

gvdhoorn gravatar image gvdhoorn  ( 2020-11-28 07:08:53 -0500 )edit

Yes, you're right. In this case, the user installed a package outside of ros (using apt) and I am not sure why ros packages would be removed when that is uninstalled. In any case lets see if the ros-melodic-desktop-full installs rviz again

Akhil Kurup gravatar image Akhil Kurup  ( 2020-11-28 11:48:32 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-11-27 12:27:38 -0500

Seen: 384 times

Last updated: Dec 01 '20