ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Hi,
I'm experiencing the same issue. I solved it by adding a guard to the beginning of the .cfg file, which checks whether the *Config.h file was generated after the last modification of the .cfg file. If this is the case the script is terminated without generating any files.
It looks like:
import os
me = os.path.realpath(__file__)
cpp_header = os.path.realpath(os.path.join(os.path.dirname(me), "cpp", "dynamic_tutorials", "TutorialsConfig.h"))
if os.path.exists(cpp_header) and os.path.getmtime(me) < os.path.getmtime(cpp_header):
exit(0)