Ask Your Question

rosrun autocomplete show all src files.

asked 2018-07-17 01:55:14 -0500

saga702 gravatar image

when i try autocomplete at rosrun with tab key,

uesr@pc:~$ rosrun name-of-pkg [tab]
CMakeLists.txt             [executable_name]
main.cpp                      package.xml

what i expect is to see only the executable_name on autocomplete, but what i see is whole files in package folder in src

another happening :

i created 2 catkin workspace with a pkg

  1. create ws1/src/ws1_pkg, do $ catkin_make

  2. then create ws2/src/ws2_pkg, do $ catkin_make

  3. $ source ws1/devel/setup.bash -> can't autocomplete ws2_pkg

  4. new terminal $ source ws2/devel/setup.bash -> rosrun ws1_pkg shows up.

ws1_pkg shows up even if i sourced ws2 setup.bash

What's happening to me?

ubuntu 16.04, kinetic, reinstalled today

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2018-07-17 06:54:49 -0500

saga702 gravatar image

updated 2018-07-17 06:56:10 -0500

self answer --

during backup and restore the workspaces, every files in workspaces turned into executable files.

So, changing the file's with chmod makes all problem solved.

with $ sudo chmod -R -x+X ./

edit flag offensive delete link more

answered 2018-07-17 02:38:13 -0500

Delb gravatar image

updated 2018-07-17 02:38:58 -0500

I don't see why the autocompletion is an issue you do have your exectutable found.

For your workspaces issue it's totally normal you should read the environment variables wiki. I'm pretty sure if you run echo $ROS_PACKAGE_PATH you will have the ws1 path inside.

It's also mentionned (section 2.1) that :

These ordered paths tell the ROS system where to search for more ROS packages. If there are multiple packages of the same name, ROS will choose the one that appears on ROS_PACKAGE_PATH first.

So i'm pretty sure your ROS_PACKAGE_PATH looks like /homepath/ws1/src:/homepath/ws2/src:/opt/ros/kinetic/share

You sould get the paths in the right order and only the required ones.

edit flag offensive delete link more


What i want to see is just executable one. not cpp and txt files. This is not big problem, but it keeps annoying me

saga702 gravatar image saga702  ( 2018-07-17 02:51:14 -0500 )edit

Well after some research the autocompletion is related to devel/setup.bash so if your env variables are not correctly set (as you said with your workspaces issue) then both issue have the same resolution (ie properly set your ROS env variables)

Delb gravatar image Delb  ( 2018-07-17 03:54:43 -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

1 follower


Asked: 2018-07-17 01:55:14 -0500

Seen: 172 times

Last updated: Jul 17 '18