I’m doing the course ROS Basics in 5 days (C++), in this course i have to use [TAB]+[TAB] to autocomplete ROS command, however, this operation does not work in my environment. I did catkin_make, had sourced the environment (by typing source devel/setup.bash) and had pressed TAB key twice in quick succesion but still not working.
I was supposed to type TAB TAB to autocomplete rostopic pub /fibonacci/goal actionlib_tutorials/FibonacciActionGoal.
From my understanding, your command did not work since the Server probably was not online / running. That would be the only cause on autocomplete not working.
Try these in order:
catkin_make your project
Source devel/setup.bash and Start the /fibonacci action server in one web shell.
Source devel/setup.bash in another web shell (while the action server is up and running in the other web shell), and then type in rostopic list | grep fibonacci and check if /fibonacci/goal node(topic) exists.
If /fibonacci/goal exists along with /fibonacci/result, /fibonacci/feedback and along with (/cancel and /status), then you can issue the rostopic pub ... command.
So here are the steps to check if [TAB]+[TAB] works:
Type in rostopic pub /fib and hit [TAB] here. It should auto complete to give you rostopic pub /fibonacci/.
Now press [TAB] two times with delay of 1 second (not in succession) - this will show you options like /goal, /cancel, /result, /feebdack, /status - type in goal .
Now hit [TAB]+[TAB] in succession - this time the command should autocomplete itself.
Just be sure the server is running on one web shell, or else auto complete will not work for action client.
It’s should be mentioned that from previous units I couldn’t use [TAB][TAB] either, and what I did was introducing the corresponding arguments by hand, but those cases were easy to type, however, in this case the type of message is actionlib_tutorials/FibonacciActionGoal and has the following structure but I don’t know how to type this by hand.
std_msgs/Header header
uint32 seq
time stamp
string frame_id
actionlib_msgs/GoalID goal_id
time stamp
string id
actionlib_tutorials/FibonacciGoal goal
int32 order
It is working! Goal message is sent just once, so you will not see any continuous messages show up.
To see the feedback and the result, open up two other new webshells, source devel/setup.bash on both and in one webshell use rostopic echo /fibonacci/feedback and on the other use rostopic echo /fibonacci/result.
Here are the steps to follow.
You need to use four (4) webshells.
1st webshell:
cd ~/catkin_ws
catkin_make
source devel/setup.bash
# launch fibonacci action server with roslaunch or rosrun
You will see continuous feedback on 2nd webshell and the final result on the 3rd webshell.
You will see nothing in the 4th webshell. It will just show “publishing and latching mesage…”
The above instructions are clearly written in the course tutorial notes.
Thank you @girishkumar.kannan for your help! Now, it is working! What I didn’t do was not sourcing all terminals.
And any idea why not working [TAB] key in my environment?
Are you sure it is not working? For me [TAB] key works but very slow. So when pressing [TAB]+[TAB] it takes several seconds till the auto completion fills in the remaining part.