Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,8 @@
*.out
*.app

subt_ign/worlds/cave_circuit_practice_02.dat
# Other
cave_circuit_practice_02.dat
cave_circuit_03.dat
cave_circuit_07.dat
cave_circuit_08.dat
4 changes: 2 additions & 2 deletions docker/cloudsim_sim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ WORKDIR /home/$USERNAME
RUN rosdep update

# Download the public models
RUN ign fuel download -v 4 -j 8 -u "https://fuel.ignitionrobotics.org/OpenRobotics/collections/SubT Tech Repo"
RUN ign fuel download -v 4 -j 8 --type model -u "https://fuel.ignitionrobotics.org/OpenRobotics/collections/SubT Tech Repo"

# Download niosh models, set 1.
COPY download_niosh_1.sh ./
Expand All @@ -126,7 +126,7 @@ RUN ./download_niosh_3.sh
# docker is run
RUN mkdir -p subt_ws/src \
&& cd subt_ws/src \
&& git clone https://github.com/osrf/subt -b distance_segfault
&& git clone https://github.com/osrf/subt -b cave_circuit_compeition_worlds

WORKDIR /home/$USERNAME/subt_ws

Expand Down
35 changes: 34 additions & 1 deletion subt_ign/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ target_link_libraries(
add_executable(validate_visibility_table
src/validate_visibility_table.cc)
target_link_libraries(validate_visibility_table
PRIVATE
PRIVATE
Visibility
)
install(TARGETS validate_visibility_table
Expand Down Expand Up @@ -446,6 +446,39 @@ add_custom_command(TARGET unzip_dat PRE_BUILD
COMMENT "Unpacking cave_circuit_practice_02.dat.zip"
VERBATIM)

# Unzip the cave_circuit_03.dat.zip file
add_custom_command(TARGET unzip_dat PRE_BUILD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/worlds/cave_circuit/03
COMMAND ${CMAKE_COMMAND} -E tar xvf cave_circuit_03.dat.zip
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/worlds/cave_circuit/03/cave_circuit_03.dat.zip
COMMENT "Unpacking cave_circuit_03.dat.zip"
VERBATIM)

# Unzip the cave_circuit_04.dat.zip file
add_custom_command(TARGET unzip_dat PRE_BUILD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/worlds/cave_circuit/04
COMMAND ${CMAKE_COMMAND} -E tar xvf cave_circuit_04.dat.zip
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/worlds/cave_circuit/04/cave_circuit_04.dat.zip
COMMENT "Unpacking cave_circuit_04.dat.zip"
VERBATIM)

# Unzip the cave_circuit_07.dat.zip file
add_custom_command(TARGET unzip_dat PRE_BUILD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/worlds/cave_circuit/07/
COMMAND ${CMAKE_COMMAND} -E tar xvf cave_circuit_07.dat.zip
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/worlds/cave_circuit/07/cave_circuit_07.dat.zip
BYPRODUCTS ${CMAKE_CURRENT_SOURCE_DIR}/worlds/cave_circuit/07/cave_circuit_07.dat
COMMENT "Unpacking cave_circuit_07.dat.zip"
VERBATIM)

# Unzip the cave_circuit_08.dat.zip file
add_custom_command(TARGET unzip_dat PRE_BUILD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/worlds/cave_circuit/08
COMMAND ${CMAKE_COMMAND} -E tar xvf cave_circuit_08.dat.zip
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/worlds/cave_circuit/08/cave_circuit_08.dat.zip
COMMENT "Unpacking cave_circuit_08.dat.zip"
VERBATIM)

install(PROGRAMS
scripts/subt_docker.bash
scripts/subt_docker_list.bash
Expand Down
28 changes: 26 additions & 2 deletions subt_ign/src/ConnectionHelper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,19 @@ std::map<std::string, std::vector<ignition::math::Vector3d>>
{"Cave U Turn Elevation Lights Type A", {{-50.0, -25.0, 0.0}, {0.0, -25.0, 25.0}}},
{"Cave Vertical Shaft Straight Bottom Lights Type A", {{0.0, 0.0, 10.0}, {0.0, 25.0, 0.0}, {0.0, -25.0, 0.0}}},
{"Cave Transition Type A to and from Type B", {{0.0, 25.0, 0.0}, {0.0, -25.0, 0.0}}},
{"Cave Transition Type A to and from Type B Lights", {{0.0, 25.0, 0.0}, {0.0, -25.0, 0.0}}}
{"Cave Transition Type A to and from Type B Lights", {{0.0, 25.0, 0.0}, {0.0, -25.0, 0.0}}},

{"Jenolan Section 01", {{401.144, 13.2017, 63.5658}}},
{"Jenolan Section 02", {{401.144, 13.2017, 63.5658}, {231.676, 5.12208, 83.5523}}},
{"Jenolan Section 03", {{231.676, 5.12208, 83.5523}, {193.48, 39.2667, 62.0974}, {173.354, 3.1715, 83.8528}, {175.939, 15.8454, 74.7845}}},
{"Jenolan Section 04", {{193.48, 39.2667, 62.0974}, {173.354, 3.1715, 83.8528}, {175.939, 15.8454, 74.7845}, {108.945, -.808552, 117.401}, {102.694, -4.59171, 47.6574}}},
{"Jenolan Section 05", {{43.2806, -4.87545, 130.876}, {108.945, -.808552, 117.401}, {102.694, -4.59171, 47.6574}, {0, 0, 12.5}}},
{"Jenolan Section 06", {{95.93, 26.3732, 146.106}, {90.7982, -7.84003, 167.789}, {-16.465, 17.3448, 159.529}, {43.2806, -4.87545, 130.876}}},
{"Jenolan Section 07", {{95.93, 26.3732, 146.106}, {90.7982, -7.84003, 167.789}}},
{"Jenolan Section 08", {{-82.6196, 39.5982, 140.961}, {-76.3975, 30.5907, 134.982}, {-71.9846, 10.5912, 139.379}, {-16.465, 17.3448, 159.529}}},
{"Jenolan Section 09", {{-194.72, -9.770950, 132.04}, {-82.6196, 39.5982, 140.961}, {-76.3975, 30.5907, 134.982}, {-71.9846, 10.5912, 139.379}}},
{"Jenolan Section 10", {{-264.458, 25.7639, 43.2923}, {-241.489, -6.8719, 112.301}, {-194.72, -9.770950, 132.04}}},
{"Jenolan Section 11", {{-264.458, 25.7639, 43.2923}, {-241.489, -6.8719, 112.301}}}
};

std::map<std::string, subt::ConnectionHelper::ConnectionType>
Expand Down Expand Up @@ -248,7 +260,19 @@ std::map<std::string, subt::ConnectionHelper::ConnectionType>
{"Cave U Turn Elevation Lights Type A", subt::ConnectionHelper::TURN},
{"Cave Vertical Shaft Straight Bottom Lights Type A", subt::ConnectionHelper::TURN},
{"Cave Transition Type A to and from Type B", subt::ConnectionHelper::STRAIGHT},
{"Cave Transition Type A to and from Type B Lights", subt::ConnectionHelper::STRAIGHT}
{"Cave Transition Type A to and from Type B Lights", subt::ConnectionHelper::STRAIGHT},

{"Jenolan Section 01", subt::ConnectionHelper::TURN},
{"Jenolan Section 02", subt::ConnectionHelper::TURN},
{"Jenolan Section 03", subt::ConnectionHelper::TURN},
{"Jenolan Section 04", subt::ConnectionHelper::TURN},
{"Jenolan Section 05", subt::ConnectionHelper::TURN},
{"Jenolan Section 06", subt::ConnectionHelper::TURN},
{"Jenolan Section 07", subt::ConnectionHelper::TURN},
{"Jenolan Section 08", subt::ConnectionHelper::TURN},
{"Jenolan Section 09", subt::ConnectionHelper::TURN},
{"Jenolan Section 10", subt::ConnectionHelper::TURN},
{"Jenolan Section 11", subt::ConnectionHelper::TURN}
};

using namespace ignition;
Expand Down
4 changes: 0 additions & 4 deletions subt_ign/src/ConnectionValidatorPrivate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,6 @@ bool ConnectionValidatorPrivate::LoadSdf(const std::string &_fpath)
fuel_tools::ClientConfig config;
fuel_tools::FuelClient fuelClient(config);

sdf::setFindCallback([&](const std::string &_uri) {
return fuel_tools::fetchResourceWithClient(_uri, fuelClient);
});

igndbg << "Parsing [" << _fpath << "]" << std::endl;

auto errors = sdfRoot.Load(_fpath);
Expand Down
2 changes: 1 addition & 1 deletion subt_ign/src/world_generator_cave.cc
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ void WorldGenerator::LoadTiles()
fuel_tools::ClientConfig config;
auto fuelClient = std::make_unique<fuel_tools::FuelClient>(config);

std::string baseUri = "https://fuel.ignitionrobotics.org/openrobotics/models";
std::string baseUri = "https://fuel.ignitionrobotics.org/OpenRobotics/models";

for (const auto &t : tileConnectionPoints)
{
Expand Down
Binary file not shown.
Loading