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

How do I fix my broken tab completion?

asked 2018-05-22 04:43:43 -0600

DmasterD gravatar image

updated 2018-05-22 05:06:16 -0600

Something went terribly wrong with my ROS Kinetic. I think it went wrong after trying to solve vtk warnings described here (a compiling warning from the Point Cloud Library that I wanted to be gone). I installed python-vtk (a terrible decision, don't do it if you're using ros-pcl) which removed conflicting packages or something, because some other packages weren't working anymore. To solve that I removed python-vtk again and reinstalled all the broken packages for my project with rosdep install <my_package>. To my surprise, a lot of packages were "not installed" anymore. My project worked again, but tab completion was broken somehow.

The way tab completion behaves now is that the first tab completion works fine, like tabbing rosd shows me rosdep, rosdep-source, etc... But with tabbing for the the next argument, it just shows me the contents of the current folder. I've sourced the setup.bash and all the environment variables seem fine:

ROS_ROOT=/opt/ros/kinetic/share/ros ROS_PACKAGE_PATH=/opt/ros/kinetic/share ROS_MASTER_URI=http://localhost:11311 ROS_VERSION=1 ROS_DISTRO=kinetic ROS_ETC_DIR=/opt/ros/kinetic/etc/ros

Then I thought maybe something is wrong with ROS too, not only the packages. So first I tried installing ROS Kinetic like described on the tutorial page, but without removing my old ROS first. To my surprise it actually installed, not saying that it already is installed? So my ROS Kinetic was working without my Ubuntu (16.04 64-bit, kernel 4.4.0-127-generic) knowing that it was installed. What is going here??? Something happened that made my system think that nothing from ROS is installed anymore, but it still works. Also this installation did solve tab completion for roslaunch, but it did not for rosdep (e.g. rosdep install, it doesn't tab complete install). (This also raises the question if I can even remove ROS things if the system thinks it's not installed? Not tested yet though.)

So to sum it up, everything works fine except for certain tab completions and my system thinks some ROS components are not installed even though they are. My next try to solve this is removing everything from ROS first and then reinstalling everything again. But I'd like to delay this step first, since I can just work with ROS for now. If anyone here doesn't know any other solution I will proceed with reinstalling everything from ROS.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
7

answered 2018-05-22 09:21:32 -0600

updated 2018-05-22 10:05:19 -0600

First off, not all ROS packages have great tab autocomplete support. For example rosrun, roslaunch, rospack, and rosmsg all have good support while tools like rosdep and rosinstall do not. So the fact that your rosdep tab autocomplete is not working is not actually a problem.

Likely the original issue that you faced was that some package you installed with apt-get conflicted with some subset of ROS packages. You didn't read the command line output when installing the conflicting package, and you gave the okay to uninstall the conflicting packages. The ros-kinetic-desktop-full package is really just a metapackage that depends on a bundled set of ROS packages. If you uninstall any of these dependencies, then the desktop-full package is also automatically removed. However, other dependencies of desktop-full are not automatically removed (this is what apt-get autoremove is for). Thus, this could explain how you ended up with a partially-installed ROS Kinetic distribution. This would also explain why running sudo apt-get install ros-kinetic-desktop-full would actually end up installing a bunch of packages (but perhaps not all of the dependent packages if you already had some of them installed). Note that if you really want to get to the bottom of what happened /var/log/apt contains a history.log and many older history.log.XX.gz files. These files include all apt-get commands that were run and summaries of which packages were modified as a result. Looking through these files could tell you exactly what originally conflicted, what ROS packages were uninstalled, and show how installing desktop full re-installed the removed packages.

If you were able to run sudo apt-get install ros-kinetic-desktop-full with no issues, then I'd say your ROS system is installed correctly.

edit flag offensive delete link more

Comments

1

Thank you for the big explanation. I think I understand now what happened. Although I did run apt autoremove, and ROS still worked (except for the tab completion). Anyways, I installed ros-kinetic-desktop-full again and so far it's all working like it should. :) Thanks for your time.

DmasterD gravatar image DmasterD  ( 2018-05-22 13:17:18 -0600 )edit

Makes perfect sense. I had the same issue with ROS noetic. It works now

hunterlineage1 gravatar image hunterlineage1  ( 2023-01-19 12:10:05 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-05-22 04:43:43 -0600

Seen: 2,505 times

Last updated: May 22 '18