Rosanswers logo

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 ?

Originally posted by MichaelDUEE on ROS Answers with karma: 15 on 2020-02-11

Post score: 0


1 Answer 1


Rosanswers logo

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")

Originally posted by mgruhler with karma: 12390 on 2020-02-11

This answer was ACCEPTED on the original site

Post score: 1

Original comments

Comment by MichaelDUEE on 2020-02-11:
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 ?

Comment by mgruhler on 2020-02-12:
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).

Comment by MichaelDUEE on 2020-02-12:
Thank you, that worked!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.