Ask Your Question
2

Rosrun tab autocompletion crashes terminal

asked 2018-10-08 07:11:27 -0600

pavel92 gravatar image

updated 2018-10-08 08:16:08 -0600

I have been using ROS Kinetic on Ubuntu 16.04 for some time now. After doing some kernel upgrades I run into a problem when running the rosrun command. When I hit the tab after writing rosrun the terminal freezes and crashes after few seconds. This does not happen for roslaunch or other ros commands. If I type the whole rosrun command with the node that I want to run it works as expected. Has anyone encountered this problem? There was a question regarding this that proposed some fixes that unfortunately did not work for me (deleting the contents of /var/crash and doing a clean build).

Edit:
The output of env |grep -i ros |sort is:

CMAKE_PREFIX_PATH=/home/pavel/catkin_ws/devel:/opt/ros/kinetic
LD_LIBRARY_PATH=/home/pavel/catkin_ws/devel/lib:/opt/ros/kinetic/lib:/opt/ros/kinetic/lib/x86_64-linux-gnu
PATH=/opt/ros/kinetic/bin:/home/pavel/bin:/home/pavel/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
PKG_CONFIG_PATH=/home/pavel/catkin_ws/devel/lib/pkgconfig:/opt/ros/kinetic/lib/pkgconfig:/opt/ros/kinetic/lib/x86_64-linux-gnu/pkgconfig
PYTHONPATH=/home/pavel/catkin_ws/devel/lib/python2.7/dist-packages:/opt/ros/kinetic/lib/python2.7/dist-packages
ROS_DISTRO=kinetic
ROS_ETC_DIR=/opt/ros/kinetic/etc/ros
ROS_MASTER_URI=http://localhost:11311
ROS_PACKAGE_PATH=/home/pavel/catkin_ws/src/pkg1:/home/pavel/catkin_ws/src/pkg2:......../opt/ros/kinetic/share
ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_VERSION=1

where the ROS_PACKAGE_PATH contains a lot of packages, but to make it short I just put pkg1, pkg2.... in the output above.

edit retag flag offensive close merge delete

Comments

What is the output of env |grep -i ros |sort ?

Delb gravatar imageDelb ( 2018-10-08 07:55:58 -0600 )edit

I edited the question with the output

pavel92 gravatar imagepavel92 ( 2018-10-08 08:16:28 -0600 )edit

Have you sourced your workspace ? The variable ROS_PACKAGE_PATH should be /home/pavel/catkin_ws/src:/opt/ros/kinetic/share

Delb gravatar imageDelb ( 2018-10-08 08:34:37 -0600 )edit

Try unset ROS_PACKAGE_PATH, and then source devel/setup.bash. Is the output the same ? (only for ROS_PACKAGE_PATH )

Delb gravatar imageDelb ( 2018-10-08 08:36:01 -0600 )edit

When I do a clean build ROS_PACKAGE_PATH gives only /opt/ros/kinetic/share . After I source the workspace I get the same package path that was shown in the question. When i unset the ROS_PACKAGE_PATH and source the workspace the package path is the same and the crash still occurs

pavel92 gravatar imagepavel92 ( 2018-10-08 08:49:18 -0600 )edit

Have you modified your .bashrc ? Moreover have you run sudo apt-get update, then sudo apt-get upgrade and finally sudo apt-get autoremove ?

Delb gravatar imageDelb ( 2018-10-08 09:47:44 -0600 )edit

Did that but it did not help. I had this added in my .bashrc:

source /opt/ros/kinetic/setup.bash
source /home/pavel/catkin_ws/devel/setup.bash
pavel92 gravatar imagepavel92 ( 2018-10-10 02:17:16 -0600 )edit

Can you just try to unset ROS_PACKAGE_PATH and then export ROS_PACKAGE_PATH=/home/pavel/catkin_ws/src:/opt/ros/kinetic/share (don't source your workspace after that and try the autocompletion) just to make sure the problem isn't with this variable not correctly set.

Delb gravatar imageDelb ( 2018-10-10 02:33:07 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2019-09-04 04:23:58 -0600

Anchellon gravatar image

Reinstalling ROS bash worked for me

sudo apt-get install --reinstall ros-kinetic-rosbash
edit flag offensive delete link more

Comments

I tried that but no luck so far

pavel92 gravatar imagepavel92 ( 2019-09-18 03:35:39 -0600 )edit
0

answered 2019-06-22 10:25:47 -0600

Maybe a stupid solution but in my case uninstalling and reinstalling Ros helped.

sudo apt-get purge ros-kinetic-*

and then following the tutorial for installing again

edit flag offensive delete link more

Comments

I am aware that this is one of the solution but I am trying to pinpoint the source of the problem and avoid reinstalling ROS

pavel92 gravatar imagepavel92 ( 2019-09-18 02:44:22 -0600 )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

2 followers

Stats

Asked: 2018-10-08 07:11:27 -0600

Seen: 632 times

Last updated: Sep 04