<div dir="ltr"><br clear="all"><div style>Hi all,</div><div style><br></div><div style>Can't work out if this is a problem on our end, or something in catkin. Especially since I can't track down a similar example. I didn't notice us having problems building until releasing. And then noticed people were building it twice to get it to work.</div>
<div style><br></div><div style>Problem: package <i>kobuki_auto_docking</i> depends on actions in <i>kobuki_msgs </i>but when catkin building them together, the actions aren't getting built in time.</div><div style><br>
</div><div style><div><font color="#ff0000">Scanning dependencies of target kobuki_auto_docking_ros</font></div><div>[ 70%] Generating Python msg __init__.py for kobuki_msgs</div><div>[ 71%] Generating C++ code from kobuki_msgs/WheelDropEvent.msg</div>
<div>make[3]: Leaving directory `/opt/kobuki/debug/build'</div><div>make[3]: Leaving directory `/opt/kobuki/debug/build'</div><div>[ 71%] Built target kobuki_msgs_genpy</div><div>[ 72%] make[3]: Entering directory `/opt/kobuki/debug/build'</div>
<div>Generating C++ code from kobuki_msgs/AutoDockingAction.msg</div><div><font color="#0000ff">[ 73%] Building CXX object kobuki/kobuki_auto_docking/CMakeFiles/kobuki_auto_docking_ros.dir/src/auto_docking_ros.cpp.o</font></div>
<div>make[3]: Entering directory `/opt/kobuki/debug/build'</div><div>Scanning dependencies of target kobuki_bumper2pc_nodelet</div><div>make[3]: Leaving directory `/opt/kobuki/debug/build'</div><div>[ 74%] make[3]: Entering directory `/opt/kobuki/debug/build'</div>
<div>Generating C++ code from kobuki_msgs/AutoDockingActionFeedback.msg</div><div>[ 75%] Building CXX object kobuki/kobuki_bumper2pc/CMakeFiles/kobuki_bumper2pc_nodelet.dir/src/kobuki_bumper2pc.cpp.o</div><div>[ 76%] Generating C++ code from kobuki_msgs/AutoDockingActionGoal.msg</div>
<div>[ 76%] Generating C++ code from kobuki_msgs/AutoDockingActionResult.msg</div><div>In file included from /opt/kobuki/debug/devel/include/kobuki_msgs/AutoDockingAction.h:51:0,</div><div>                 from /opt/kobuki/src/kobuki/kobuki_auto_docking/include/kobuki_auto_docking/auto_docking_ros.hpp:22,</div>
<div>                 from /opt/kobuki/src/kobuki/kobuki_auto_docking/src/auto_docking_ros.cpp:13:</div><div><font color="#ff0000">/opt/kobuki/debug/devel/include/kobuki_msgs/AutoDockingActionGoal.h:53:41: fatal error: kobuki_msgs/AutoDockingGoal.h: No such file or directory</font></div>
<div>compilation terminated.</div><div>[ 77%] Generating C++ code from kobuki_msgs/AutoDockingFeedback.msg</div><div>[ 78%] Generating C++ code from kobuki_msgs/AutoDockingGoal.msg</div><div>[ 80%] Building CXX object kobuki/kobuki_driver/src/driver/CMakeFiles/kobuki.dir/core_sensors.cpp.o</div>
<div>[ 81%] Generating C++ code from kobuki_msgs/AutoDockingResult.msg</div><div>make[3]: Leaving directory `/opt/kobuki/debug/build'</div><div><font color="#0000ff">[ 81%] Built target kobuki_msgs_gencpp</font></div>
<div><br></div></div><div style>Now, the package.xml and CMakeLists.txt make all the appropriate dependencies on kobuki_msgs, but the kobuki_msgs_gencpp target is simply not getting added as a dependency to kobuki_auto_docking_ros. Now, this fixes itself if you add the following line in CMakeLists.txt:</div>
<div style><br></div><div style>add_dependencies(kobuki_auto_docking_ros kobuki_msgs_gencpp)<br></div><div style><br></div><div style>Is this supposed to work like this? I don't know if it's possible or 'correct' to get the catkin model to do this anywhere automatically, but I have to admit, it feels awkward having to handle dependencies now. You have to remember to track them in several places - i.e. in package.xml, in find_package, in CATKIN_DEPENDS and now here also.</div>
<div style><br></div><div style>Daniel.<br></div><div style><br></div><div style><div>PS I have a simple std_msgs/talker example of the above if necessary.</div><div><br></div></div>
</div>