Ask Your Question
2

Custom message

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

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
  '/home/malcolm/ros_ws/hydro_ws/catkin_ws/src/Tobot/open_tld_3d/msg/square.msg'
  depends on.  Did you forget to specify generate_messages(DEPENDENCIES ...)?

  Cannot locate message [point] in package [open_tld_3d] with paths
  [['/home/malcolm/ros_ws/hydro_ws/catkin_ws/src/Tobot/open_tld_3d/msg']]

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

generate_messages(
   DEPENDENCIES
   geometry_msgs
   std_msgs
 )

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

Comments

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 imageMaya ( 2014-06-10 00:59:04 -0500 )edit

2 Answers

Sort by » oldest newest most voted
2

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

dornhege gravatar image

Should this be geometry_msgs/Point instead of point?

edit flag offensive delete link more
0

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

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)

and

catkin_package(
INCLUDE_DIRS include
CATKIN_DEPENDS message_runtime std_msgs geometry_msgs
LIBRARIES pid 
)

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

  <build_depend>message_generation</build_depend>
  <run_depend>message_runtime</run_depend>

See the Tutorial on creating messages and services

edit flag offensive delete link more

Comments

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

Maya gravatar imageMaya ( 2014-06-09 09:15:03 -0500 )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 imagePeterMilani ( 2014-06-09 09:34:04 -0500 )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

Stats

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

Seen: 2,074 times

Last updated: Jun 09 '14