ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
As you haven't posted your CMakeLists.txt
, we can only guess.
But what you describe sounds like a race condition. The effect being that sometimes the dynamic reconfigure headers are created before, and sometimes after your node is being built. Thus, the build fails or succeeds on some platforms. Actually, both could happen in the same Workspace.
You need to tell cmake that your executable requires the headers. This can be done easily with the following line
add_dependencies(path_handler_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
(the ${catkin_EXPORTED_TARGETS}
is actually not for your specific problem, but it is something that could help in resolving some other sporadic build issues).
This obviously fits what you found out, i.e. if you generate the headers before (by uncommenting the executable), the build after that works.
2 | No.2 Revision |
As you haven't posted your CMakeLists.txt
, we can only guess.
But what you describe sounds like a race condition. The effect being that sometimes the dynamic reconfigure headers are created before, and sometimes after your node is being built. Thus, the build fails or succeeds on some platforms. Actually, both could happen in the same Workspace.
You need to tell cmake that your executable requires the headers. This can be done easily with the following line
add_dependencies(path_handler_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
(the ${catkin_EXPORTED_TARGETS}
is actually not for your specific problem, but it is something that could help in resolving some other sporadic build issues).
This obviously fits what you found out, i.e. if you generate the headers before (by uncommenting the executable), the build after that works.
See also the catkin documentation on dynamic_reconfigure
.