Ask Your Question

Custom message

asked 2014-06-09 05:14:54 -0600

Maya gravatar image

Hellow all !

I'm trying to create a custom message using Geomety messages and std msgs. But I can't seem to link it correctly. I've been following this tutorial but so far I'm having this error :

CMake Error at /home/malcolm/ros_ws/hydro_ws/catkin_ws/build/Tobot/open_tld_3d/cmake/open_tld_3d-genmsg.cmake:3 (message):
  Could not find messages which
  depends on.  Did you forget to specify generate_messages(DEPENDENCIES ...)?

  Cannot locate message [point] in package [open_tld_3d] with paths

Indeed you can find point in geometry_msgs and in my CMakeList.txt I added that:


So for my understanding, it should be able to find Point...

This is my square.msg in case :

point x
point y
float64 width
float64 height

Nothing really complexe and I'm pretty sure I'm missing something trivial but still...

Thanks a lot !

edit retag flag offensive close merge delete


Indeed that was it ! I didn't think you'll need it because yu don't have std_psgs in front of the float64

Maya gravatar image Maya  ( 2014-06-10 00:59:04 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2014-06-09 10:38:12 -0600

dornhege gravatar image

Should this be geometry_msgs/Point instead of point?

edit flag offensive delete link more



Just wanted to say thanks for this, fixed my issue. I was thinking the same thing as Maya, i.e. std.msgs wasnt necessary for string or float or int so why would geometry_msgs be necessary for Point. Im wondering where you found this information or maybe you just 'knew' it.

LockBall gravatar image LockBall  ( 2019-09-25 16:36:13 -0600 )edit

In my case I need a msg that have list of Point. Your comment work like a charm.

geometry_msgs/Point[] points

gachiemchiep gravatar image gachiemchiep  ( 2020-10-28 05:00:41 -0600 )edit

answered 2014-06-09 07:31:25 -0600

Just a suggestion but did your CMakeLists.txt have a requirement for message_generation and a dependency for message_runtime? As in:

find_package(catkin REQUIRED COMPONENTS message_generation std_msgs geometry_msgs)


CATKIN_DEPENDS message_runtime std_msgs geometry_msgs

and your package will need to depend on message_generation in package.xml


See the Tutorial on creating messages and services

edit flag offensive delete link more


It does have all that. I've actually been following that tutorial :).

Maya gravatar image Maya  ( 2014-06-09 09:15:03 -0600 )edit

I'm just working through a catkin package that I had custom messages working, do you have in CMakeLists.txt: 'add_dependencies(${PROJECT_NAME}_generate_messages_cpp ${PROJECT_NAME}_generate_messages_cpp)'

PeterMilani gravatar image PeterMilani  ( 2014-06-09 09:34:04 -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

1 follower


Asked: 2014-06-09 05:14:54 -0600

Seen: 2,504 times

Last updated: Jun 09 '14