Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/separate model download #183

Merged
merged 3 commits into from
Jul 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions test_maps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,22 @@ foreach(path ${traffic_editor_paths})
set(output_model_dir ${output_dir}/models)

# first, generate the world
set(no_download_flag "")
message("BUILDING WORLDFILE WITH COMMAND: ros2 run building_map_tools building_map_generator gazebo ${map_path} ${output_world_path} ${output_model_dir}")
if (NO_DOWNLOAD_MODELS)
set(no_download_flag "--no_download")
add_custom_command(
DEPENDS ${map_path}
COMMAND ros2 run building_map_tools building_map_generator gazebo ${map_path} ${output_world_path} ${output_model_dir}
OUTPUT ${output_world_path}
)
else()
add_custom_command(
DEPENDS ${map_path}
COMMAND ros2 run building_map_tools building_map_generator gazebo ${map_path} ${output_world_path} ${output_model_dir}
message("DOWNLOADING MODELS WITH COMMAND: ros2 run building_map_tools building_map_model_downloader ${map_path}")
COMMAND ros2 run building_map_tools building_map_model_downloader ${map_path}
OUTPUT ${output_world_path}
)
endif()
message("BUILDING WORLDFILE WITH COMMAND: ros2 run building_map_tools building_map_generator gazebo ${map_path} ${output_world_path} ${output_model_dir}")
add_custom_command(
OUTPUT ${output_world_path}
COMMAND ros2 run building_map_tools building_map_generator gazebo ${map_path} ${output_world_path} ${output_model_dir} ${no_download_flag}
DEPENDS ${map_path}
)

add_custom_target(generate_${output_world_name} ALL
DEPENDS ${output_world_path}
Expand Down