mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-30 04:06:33 +08:00
microRTPS: generate_microRTPS_bridge: only run the generator for the topics that are actually marked to be used
This commit is contained in:
@@ -358,11 +358,14 @@ def generate_agent(out_dir):
|
|||||||
gen_ros2_typename = "-typeros2 "
|
gen_ros2_typename = "-typeros2 "
|
||||||
|
|
||||||
for idl_file in glob.glob(os.path.join(idl_dir, "*.idl")):
|
for idl_file in glob.glob(os.path.join(idl_dir, "*.idl")):
|
||||||
try:
|
# Only run the generator for the topics that are actually marked to be
|
||||||
ret = subprocess.check_call(fastrtpsgen_path + " -d " + out_dir +
|
# used by the bridge
|
||||||
"/fastrtpsgen -example x64Linux2.6gcc " + gen_ros2_typename + fastrtpsgen_include + idl_file, shell=True)
|
if os.path.splitext(os.path.basename(idl_file))[0] in classifier.msg_id_map:
|
||||||
except OSError:
|
try:
|
||||||
raise
|
ret = subprocess.check_call(fastrtpsgen_path + " -d " + out_dir +
|
||||||
|
"/fastrtpsgen -example x64Linux2.6gcc " + gen_ros2_typename + fastrtpsgen_include + idl_file, shell=True)
|
||||||
|
except OSError:
|
||||||
|
raise
|
||||||
|
|
||||||
rm_wildcard(os.path.join(out_dir, "fastrtpsgen/*PubSubMain*"))
|
rm_wildcard(os.path.join(out_dir, "fastrtpsgen/*PubSubMain*"))
|
||||||
rm_wildcard(os.path.join(out_dir, "fastrtpsgen/makefile*"))
|
rm_wildcard(os.path.join(out_dir, "fastrtpsgen/makefile*"))
|
||||||
|
|||||||
Reference in New Issue
Block a user