Ask Your Question

Problem with Action msg

asked 2020-02-11 07:21:28 -0600

MichaelDUEE gravatar image

updated 2020-02-11 07:22:05 -0600

Hello, I wrote my own Action msg for ROS. This is the msg :

string start_phrase
point coordinates
duration time_elapsed

This is my changes in Cmake :

 find_package(catkin REQUIRED
 COMPONENTS   actionlib_msgs  
 geometry_msgs   rospy   std_msgs  
 message_generation ) add_action_files(


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

 #  INCLUDE_DIRS include
 #  LIBRARIES camera_action   CATKIN_DEPENDS geometry_msgs rospy
 #  DEPENDS system_lib )

This is my Package :


When I try to catkin_make my src i get this error :

Could not find messages which
'/home/michael/catkin_ws/devel/share/camera_action/msg/cameraAction.msg' depends on. Did you forget to specify generate_messages(DEPENDENCIES ...)?

Cannot locate message [point] in package [camera_action] with paths
[['/home/michael/catkin_ws/devel/share/camera_action/msg']] Call Stack (most recent call first):
/opt/ros/kinetic/share/genmsg/cmake/genmsg-extras.cmake:307 (include)
camera_action/CMakeLists.txt:73 (generate_messages)

I see that there is a problem with point. Does someone have any idea ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-02-11 08:07:30 -0600

mgruhler gravatar image

Well, point is no built-in data type (and not a relative one, apparently).

Thus need to specify it in the message description as package/Message. You are most probably referring to geometry_msgs/Point.

In fact, even though you can have relative names (see citation below), I'd recommend to always use the full package/Message format...

When embedding other Message descriptions, the type name may be relative (e.g. "Point32") if it is in the same package; otherwise it must be the full Message type (e.g. "std_msgs/String")

edit flag offensive delete link more


If I specify it like geometry_msgs/Point how should I write this in the Cmake file. geometry_msgs or geometry_msgs/Point and where ?

MichaelDUEE gravatar image MichaelDUEE  ( 2020-02-11 16:28:38 -0600 )edit

In the CMakeLists.txt and the package.xml, you only depend on the package. I.e. on geometry_msgs. In the code where you use it, you need to specify the exact type (i.e. geometry_msgs/Point).

mgruhler gravatar image mgruhler  ( 2020-02-12 01:38:20 -0600 )edit

Thank you, that worked!

MichaelDUEE gravatar image MichaelDUEE  ( 2020-02-12 07:21:43 -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



Asked: 2020-02-11 07:21:28 -0600

Seen: 360 times

Last updated: Feb 11 '20