Hi,
I create a custom message for an action in a package named: my_action_act
I built and used a custom message well
I also see the message in: rosmsg list | grep my_action_act
But when I use: rosmsg show my_act… Then I use tab to complete the message. It does not work.
I see in “rosmsg show” does not list my package as action_lib, move_base_msgs.
Why? And how can I fix it. Thanks
If you want to use auto-complete, you must press tab twice in quick succession (TAB-TAB).
Also, before doing that, ensure that you have run source ~/catkin_ws/devel/setup.bash
on that terminal.
I press Tab several times but it does not work
I have already run source ~/catkin_ws/devel/setup.bash on that terminal
I can list all messages of an action but can not auto-complete when using rosmsg show
I use rosmsg package <my_msg_action_pkg>, it also can not list my message. But move_base_msgs works
In rqt, other action, topic can see the message but my_action. @@
As you can see, I type:
rosmsg show [tab] [tab] …
it will list all packages and it does not have my_action_package
But I type rosmsg list | grep <my_action>, it still lists my messages normally
NguyenDuyDuc:
I use rosmsg package <my_msg_action_pkg>, it also can not list my message. But move_base_msgs works
In rqt, other action, topic can see the message but my_action. @@
I do not understand this part. Could you please elaborate?
You need to press TAB twice very fast (quick succession). Is that what you did? If you just press it the usual way, it might not work.
Also, it helps to start typing one of two characters of your action message before pressing TAB-TAB.
Okay, if the only problem is with auto-completion, it is not a big deal. Are you able to use the message successfully:
in the terminal (by manually completing the structure)?
in a Python program (node)?
If you need further help, please show the output of:
rosmsg list | grep <your_action>
rosmsg show <your_action>
I will explain again, please help.
I build my action message (CountAction) in a package (my_action_act) → catkin_make → source … : Done
I type: rosmsg list | grep Count
Terminal shows all my action messages
I type: rosmsg show my_act [tab] [tab]… but it does not suggest or complete my message
I try: rosmsg show move_base [tab] [tab] … it works very well. It can suggest and complete the messages. It means I know how to use [tab] [tab] to complete message
=> My question is why ROS does not suggest and complete my action message. But It can suggest and complete move_base action message
I try to another way: rosmsg show [tab] [tab] → It will suggest all packages that contain messages. I see it has move_base_msgs package but it does not have my_action_act
=> Why is it? ^^
I try to complete my action message manually. It works well.
=> So I think after I build my_action_act package to build message, it does not add my package into result of (rosmsg show [tab] [tab]) so it can not suggest and complete my command. But why?
Could you check them for me? Thanks
Code block example; place between two triple backticks
# This is an example of a code block
It looks like the ROS system has not fully recognised your package. Perhaps something is missing. Try the following:
# recompile the workspace
cd ~/catkin_ws
rm -rf build/ devel/
catkin_make
source devel/setup.bash
rospack profile
Then, in the same terminal, try to auto-complete your message.
Please paste all output from the commands above here, in a code block (not as screenshot). I made an example of a code block in your last post.
I followed your guide and it does not work. Please check
user:~/catkin_ws$ rm -r build/ devel/
user:~/catkin_ws$ catkin_make
Base path: /home/user/catkin_ws
Source space: /home/user/catkin_ws/src
Build space: /home/user/catkin_ws/build
Devel space: /home/user/catkin_ws/devel
Install space: /home/user/catkin_ws/install
####
#### Running command: "cmake /home/user/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/user/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/user/catkin_ws/install -G Unix Makefiles" in "/home/user/catkin_ws/build"
####
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CATKIN_DEVEL_PREFIX: /home/user/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/user/catkin_ws/devel;/home/simulations/public_sim_ws/devel;/opt/ros/noetic
-- This workspace overlays: /home/user/catkin_ws/devel;/home/simulations/public_sim_ws/devel;/opt/ros/noetic
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.5", minimum required is "3")
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Using Debian Python package layout
-- Found PY_em: /usr/lib/python3/dist-packages/em.py
-- Using empy: /usr/lib/python3/dist-packages/em.py
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/user/catkin_ws/build/test_results
-- Forcing gtest/gmock from source, though one was otherwise available.
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /usr/bin/python3 (found version "3.8.5")
-- Found Threads: TRUE
-- Using Python nosetests: /usr/bin/nosetests3
-- catkin 0.8.9
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 1 packages in topological order:
-- ~~ - my_action_act
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'my_action_act'
-- ==> add_subdirectory(my_action_act)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- Generating .msg files for action my_action_act/Count /home/user/catkin_ws/src/my_action_act/action/Count.action
Generating for action Count
-- my_action_act: 7 messages, 0 services
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/catkin_ws/build
####
#### Running command: "make -j8 -l8" in "/home/user/catkin_ws/build"
####
Scanning dependencies of target _my_action_act_generate_messages_check_deps_CountActionGoal
Scanning dependencies of target _my_action_act_generate_messages_check_deps_CountFeedback
Scanning dependencies of target _my_action_act_generate_messages_check_deps_CountActionResult
Scanning dependencies of target _my_action_act_generate_messages_check_deps_CountGoal
Scanning dependencies of target _my_action_act_generate_messages_check_deps_CountResult
[ 0%] Built target _my_action_act_generate_messages_check_deps_CountResult
[ 0%] Built target _my_action_act_generate_messages_check_deps_CountActionGoal
[ 0%] Built target _my_action_act_generate_messages_check_deps_CountActionResult
[ 0%] Built target _my_action_act_generate_messages_check_deps_CountFeedback
Scanning dependencies of target _my_action_act_generate_messages_check_deps_CountActionFeedback
Scanning dependencies of target std_msgs_generate_messages_eus
Scanning dependencies of target _my_action_act_generate_messages_check_deps_CountAction
[ 0%] Built target _my_action_act_generate_messages_check_deps_CountGoal
Scanning dependencies of target actionlib_msgs_generate_messages_eus
[ 0%] Built target std_msgs_generate_messages_eus
[ 0%] Built target actionlib_msgs_generate_messages_eus
Scanning dependencies of target actionlib_msgs_generate_messages_cpp
Scanning dependencies of target std_msgs_generate_messages_cpp
Scanning dependencies of target std_msgs_generate_messages_lisp
[ 0%] Built target actionlib_msgs_generate_messages_cpp
[ 0%] Built target std_msgs_generate_messages_cpp
[ 0%] Built target _my_action_act_generate_messages_check_deps_CountActionFeedback
[ 0%] Built target std_msgs_generate_messages_lisp
[ 0%] Built target _my_action_act_generate_messages_check_deps_CountAction
Scanning dependencies of target std_msgs_generate_messages_nodejs
Scanning dependencies of target actionlib_msgs_generate_messages_py
Scanning dependencies of target std_msgs_generate_messages_py
Scanning dependencies of target actionlib_msgs_generate_messages_nodejs
[ 0%] Built target std_msgs_generate_messages_nodejs
Scanning dependencies of target actionlib_msgs_generate_messages_lisp
[ 0%] Built target actionlib_msgs_generate_messages_py
[ 0%] Built target std_msgs_generate_messages_py
Scanning dependencies of target my_action_act_generate_messages_cpp
[ 0%] Built target actionlib_msgs_generate_messages_nodejs
Scanning dependencies of target my_action_act_generate_messages_eus
Scanning dependencies of target my_action_act_generate_messages_py
[ 0%] Built target actionlib_msgs_generate_messages_lisp
[ 2%] Generating C++ code from my_action_act/CountActionResult.msg
[ 5%] Generating C++ code from my_action_act/CountAction.msg
[ 8%] Generating C++ code from my_action_act/CountActionFeedback.msg
[ 10%] Generating C++ code from my_action_act/CountActionGoal.msg
Scanning dependencies of target my_action_act_generate_messages_nodejs
[ 13%] Generating C++ code from my_action_act/CountGoal.msg
[ 16%] Generating EusLisp code from my_action_act/CountAction.msg
[ 18%] Generating Javascript code from my_action_act/CountAction.msg
[ 21%] Generating Python from MSG my_action_act/CountAction
[ 24%] Generating Javascript code from my_action_act/CountActionGoal.msg
[ 27%] Generating EusLisp code from my_action_act/CountActionGoal.msg
[ 29%] Generating C++ code from my_action_act/CountResult.msg
[ 32%] Generating C++ code from my_action_act/CountFeedback.msg
[ 35%] Generating Javascript code from my_action_act/CountActionResult.msg
[ 37%] Generating Python from MSG my_action_act/CountActionGoal
[ 43%] Generating Python from MSG my_action_act/CountActionResult
[ 43%] Generating Javascript code from my_action_act/CountActionFeedback.msg
[ 45%] Generating Javascript code from my_action_act/CountGoal.msg
[ 48%] Generating Javascript code from my_action_act/CountResult.msg
[ 51%] Generating Javascript code from my_action_act/CountFeedback.msg
[ 54%] Generating EusLisp code from my_action_act/CountActionResult.msg
[ 56%] Generating EusLisp code from my_action_act/CountActionFeedback.msg
Scanning dependencies of target my_action_act_generate_messages_lisp
[ 59%] Generating Lisp code from my_action_act/CountAction.msg
[ 62%] Generating Python from MSG my_action_act/CountActionFeedback
[ 64%] Generating Python from MSG my_action_act/CountGoal
[ 64%] Built target my_action_act_generate_messages_nodejs
[ 67%] Generating EusLisp code from my_action_act/CountGoal.msg
[ 70%] Generating Python from MSG my_action_act/CountResult
[ 70%] Built target my_action_act_generate_messages_cpp
[ 72%] Generating Python from MSG my_action_act/CountFeedback
[ 75%] Generating EusLisp code from my_action_act/CountResult.msg
[ 78%] Generating Lisp code from my_action_act/CountActionGoal.msg
[ 81%] Generating EusLisp code from my_action_act/CountFeedback.msg
[ 83%] Generating EusLisp manifest code for my_action_act
[ 86%] Generating Lisp code from my_action_act/CountActionResult.msg
[ 89%] Generating Python msg __init__.py for my_action_act
[ 91%] Generating Lisp code from my_action_act/CountActionFeedback.msg
[ 94%] Generating Lisp code from my_action_act/CountGoal.msg
[ 97%] Generating Lisp code from my_action_act/CountResult.msg
[100%] Generating Lisp code from my_action_act/CountFeedback.msg
[100%] Built target my_action_act_generate_messages_py
[100%] Built target my_action_act_generate_messages_lisp
[100%] Built target my_action_act_generate_messages_eus
Scanning dependencies of target my_action_act_generate_messages
[100%] Built target my_action_act_generate_messages
user:~/catkin_ws$ source devel/setup.bash
user:~/catkin_ws$ rospack profile
Full tree crawl took 0.036312 seconds.
Directories marked with (*) contain no manifest. You may
want to delete these directories.
To get just of list of directories without manifests,
re-run the profile with --zombie-only
-------------------------------------------------------------
0.031494 /opt/ros/noetic/share
0.003149 /home/simulations/public_sim_ws/src
0.002935 /home/simulations/public_sim_ws/src/all
0.001661 * /opt/ros/noetic/share/doc
0.001620 * /opt/ros/noetic/share/doc/eigenpy
0.001066 * /opt/ros/noetic/share/doc/eigenpy/doxygen-html
0.000353 /home/simulations/public_sim_ws/src/all/hector_gazebo
0.000323 /home/simulations/public_sim_ws/src/all/parrot_ardrone
0.000240 /home/simulations/public_sim_ws/src/all/variant
0.000212 /home/simulations/public_sim_ws/src/all/robot_controllers
0.000189 * /opt/ros/noetic/share/doc/eigenpy/doxygen-html/search
0.000138 /home/simulations/public_sim_ws/src/all/actionlib
0.000120 /home/simulations/public_sim_ws/src/all/turtle_3d
0.000118 /home/user/catkin_ws/src
0.000113 /home/simulations/public_sim_ws/src/all/worlds_tc
0.000110 /home/simulations/public_sim_ws/src/all/simulation_gazebo
0.000108 /home/simulations/public_sim_ws/src/all/spawn_robot_tools
0.000092 * /opt/ros/noetic/share/ament_index
0.000087 /home/simulations/public_sim_ws/src/all/person_sim
0.000081 /home/simulations/public_sim_ws/src/all/openai_ros
user:~/catkin_ws$ rosmsg list | grep Count
my_action_act/CountAction
my_action_act/CountActionFeedback
my_action_act/CountActionGoal
my_action_act/CountActionResult
my_action_act/CountFeedback
my_action_act/CountGoal
my_action_act/CountResult
user:~/catkin_ws$ rosmsg show
actionlib_msgs/ four_wheel_steering_msgs/ jsk_rviz_plugins/ pcl_msgs/ smach_msgs/ twist_mux_msgs/
actionlib_tutorials/ gazebo_msgs/ jsk_topic_tools/ people_msgs/ sound_play/ uuid_msgs/
audio_common_msgs/ gazebo_video_monitor_msgs/ map_msgs/ posedetection_msgs/ std_msgs/ variant_msgs/
base_local_planner/ geographic_msgs/ mavros_msgs/ robot_controllers_msgs/ stereo_msgs/ velodyne_msgs/
bond/ geometry_msgs/ mbf_msgs/ rosapi/ teb_local_planner/ view_controller_msgs/
control_msgs/ graph_msgs/ move_base_msgs/ rosbridge_msgs/ teleop_tools_msgs/ visualization_msgs/
controller_manager_msgs/ image_view2/ moveit_msgs/ roscpp/ tf/ wiimote/
costmap_2d/ jsk_footstep_msgs/ nav_msgs/ rosgraph_msgs/ tf2_msgs/
costmap_converter/ jsk_gui_msgs/ object_recognition_msgs/ rospy_tutorials/ theora_image_transport/
diagnostic_msgs/ jsk_hark_msgs/ octomap_msgs/ rtabmap_ros/ trajectory_msgs/
dynamic_reconfigure/ jsk_interactive_marker/ openai_ros/ sensor_msgs/ turtle_actionlib/
find_object_2d/ jsk_recognition_msgs/ opencv_apps/ shape_msgs/ turtlesim/
Thank you for providing the detailed output.
Checking further, it seems this is a general problem affecting custom action messages, specifically for rosmsg show
; it works when the action server is running and you do rostopic pub /action_topic
. It also works for inbuilt action messages.
Perhaps something is missing in the instructions for creating custom action messages, or this is an internal bug in ROS. We’ll find out and let you know.
In the meantime, please continue with other things.
1 Like
Yes NguyenDuyDuc, you are right.
We are looking into this issue because it is something that happens to some people and some other’s not. I’ll keep you updated
system
Closed
July 31, 2024, 8:06am
12
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.