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

actionlib wiki tutorial does not generate messages

asked 2022-03-11 23:44:22 -0500

shiraz_baig gravatar image

updated 2022-03-13 04:05:39 -0500

I am using ROS melodic and ubuntu 18.04. I am trying to execute action server according to wiki tutorials http://wiki.ros.org/actionlib_tutoria.... My pkg directory contains src,scripts and action subdirectories. I have also created *.action file. But my pkg does not build (using catkin build <mypkg>). I am getting following error. </mypkg>
----------- error message -------
Could not find messages which '/home/shiraz/catkin_ws/devel/.private/actionlib_tutorials/share/actionlib_tutorials/msg/FibonacciAction.msg' depends on. Did you forget to specify generate_messages(DEPENDENCIES ...)?

Cannot locate message [Header] in package [std_msgs] with paths [['/home/shiraz/catkin_ws/devel/share/std_msgs/cmake/../msg']] Call Stack (most recent call first): /opt/ros/melodic/share/genmsg/cmake/genmsg-extras.cmake:307 (include) CMakeLists.txt:76 (generate_messages)

------------- My CMakeLists.txt --------------
................................

find_package(catkin REQUIRED COMPONENTS<BR>
  actionlib   actionlib_msgs   message_generation <BR>
  message_runtime  roscpp  rospy  std_msgs )<BR>

 add_action_files(<BR>
  DIRECTORY action<BR>
  FILES Fibonacci.action
 )<BR>

catkin_package(<BR>
  INCLUDE_DIRS include<BR>
  LIBRARIES actionlib_tutorials<BR>
  CATKIN_DEPENDS actionlib actionlib_msgs message_generation message_runtime roscpp rospy std_msgs
  DEPENDS system_lib
)<BR>

include_directories(<BR>
  ${catkin_INCLUDE_DIRS}
)<BR>

............... My package.xml...........<BR>
  .....................................<BR>
  &lt;buildtool_depend&gt;catkin &lt;/buildtool_depend&gt;<BR>
  &lt;build_depend>actionlib&lt;/build_depend&gt;<BR>
  &lt;build_depend&gt;actionlib_msgs&lt;/build_depend&gt;<BR>
  &lt;build_depend&gt;message_generation&lt;/build_depend&gt;<BR>
  &lt;build_depend&gt;roscpp&lt;/build_depend&gt;<BR>
  &lt;build_depend&gt;rospy&lt;/build_depend&gt;<BR>
  &lt;build_depend&gt;std_msgs&lt;/build_depend&gt;<BR>
  &lt;build_export_depend&gt;actionlib&lt;/build_export_depend&gt;<BR>
  &lt;build_export_depend&gt;actionlib_msgs&lt;/build_export_depend&gt;<BR>
  &lt;build_export_depend&gt;roscpp&lt;/build_export_depend&gt;<BR>
  &lt;build_export_depend&gt;rospy&lt;/build_export_depend&gt;<BR>
  &lt;build_export_depend&gt;std_msgs&lt;/build_export_depend&gt;<BR>
  &lt;exec_depend&gt;actionlib&lt;/exec_depend&gt;<BR>
  &lt;exec_depend&gt;actionlib_msgs&lt;/exec_depend&gt;<BR>
  &lt;exec_depend&gt;message_runtime&lt;/exec_depend&gt;<BR>
  &lt;exec_depend&gt;roscpp&lt;/exec_depend&gt;<BR>
  &lt;exec_depend&gt;rospy&lt;/exec_depend&gt;<BR>
  &lt;exec_depend&gt;std_msgs&lt;/exec_depend&gt;<BR>
&lt;exec_depend&gt;message_generation&lt;/exec_depend&gt;<BR>

...............................................

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-03-13 04:08:38 -0500

You are missing

# Generate added messages and services with any dependencies listed here
 generate_messages(
   DEPENDENCIES
   actionlib_msgs
   geometry_msgs 
   std_msgs
 )

call generate_messages, right after you add the action, srv, or msg files.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-03-11 23:44:22 -0500

Seen: 67 times

Last updated: Mar 13 '22