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

compile twice to see custom message

asked 2014-06-11 03:03:02 -0600

Maya gravatar image

Hello all !

I have a package with a server that use a custom message for a service. The thing is that I need to compile twice for it to see the message for the server.

Lets say I suppress my build and devel in my catkin. Then I use catkin_make The first time I have this error :

fatal error: open_tld_3d/model.h: No such file or directory

Then catkin_make again and everything is fine this time.

I was wondering what could cause this behavior since everything seem to be ok the second time. I guess it's just that it is not able to see the message created at first and then on the second run it is able to finally find it but I don't know what to change to make it find the message on the firs run.

I don't want to put all my CMakeList.txt here (because they're big) so if you could please tell me what could be relevant to find the reason and I'll put it on this post.

Thanks a lot

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-06-11 03:13:04 -0600

ahendrix gravatar image

Your executable target needs to depend on the message generation target for your message package.

You can do this in the CMakeLists.txt for your executable with:

add_dependencies(executable open_tld_3d_generate_messages_cpp)
edit flag offensive delete link more

Comments

joq gravatar image joq  ( 2014-06-11 09:56:31 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-06-11 03:03:02 -0600

Seen: 700 times

Last updated: Jun 11 '14