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

Cave Qual release #405

Merged
merged 1 commit into from Apr 22, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion subt_ign/include/subt_ign/CommonTypes.hh
Expand Up @@ -76,7 +76,9 @@ namespace subt
TYPE_TOOLBOX,
TYPE_VALVE,
TYPE_VENT,
TYPE_GAS
TYPE_GAS,
TYPE_HELMET,
TYPE_ROPE
};

/// \def TeamMemberPtr
Expand Down
35 changes: 35 additions & 0 deletions subt_ign/launch/cave_circuit.ign
Expand Up @@ -287,6 +287,41 @@
<name>gas_4</name>
<type>TYPE_GAS</type>
</artifact>

<artifact>
<name>helmet_1</name>
<type>TYPE_HELMET</type>
</artifact>
<artifact>
<name>helmet_2</name>
<type>TYPE_HELMET</type>
</artifact>
<artifact>
<name>helmet_3</name>
<type>TYPE_HELMET</type>
</artifact>
<artifact>
<name>helmet_4</name>
<type>TYPE_HELMET</type>
</artifact>

<artifact>
<name>rope_1</name>
<type>TYPE_ROPE</type>
</artifact>
<artifact>
<name>rope_2</name>
<type>TYPE_ROPE</type>
</artifact>
<artifact>
<name>rope_3</name>
<type>TYPE_ROPE</type>
</artifact>
<artifact>
<name>rope_4</name>
<type>TYPE_ROPE</type>
</artifact>

</plugin>
</plugin>

Expand Down
35 changes: 35 additions & 0 deletions subt_ign/launch/cloudsim_sim.ign
Expand Up @@ -362,6 +362,41 @@
<name>gas_5</name>
<type>TYPE_GAS</type>
</artifact>

<artifact>
<name>helmet_1</name>
<type>TYPE_HELMET</type>
</artifact>
<artifact>
<name>helmet_2</name>
<type>TYPE_HELMET</type>
</artifact>
<artifact>
<name>helmet_3</name>
<type>TYPE_HELMET</type>
</artifact>
<artifact>
<name>helmet_4</name>
<type>TYPE_HELMET</type>
</artifact>

<artifact>
<name>rope_1</name>
<type>TYPE_ROPE</type>
</artifact>
<artifact>
<name>rope_2</name>
<type>TYPE_ROPE</type>
</artifact>
<artifact>
<name>rope_3</name>
<type>TYPE_ROPE</type>
</artifact>
<artifact>
<name>rope_4</name>
<type>TYPE_ROPE</type>
</artifact>

</plugin>
</plugin>

Expand Down
10 changes: 7 additions & 3 deletions subt_ign/src/ArtifactValidator.cc
Expand Up @@ -110,7 +110,7 @@ class subt::ArtifactValidatorPrivate
{
/// \brief Map of artifact types to string representations.
public: const std::array<
const std::pair<subt::ArtifactType, std::string>, 12> kArtifactTypes
const std::pair<subt::ArtifactType, std::string>, 14> kArtifactTypes
{
{
{subt::ArtifactType::TYPE_BACKPACK , "TYPE_BACKPACK"},
Expand All @@ -124,7 +124,9 @@ class subt::ArtifactValidatorPrivate
{subt::ArtifactType::TYPE_TOOLBOX , "TYPE_TOOLBOX"},
{subt::ArtifactType::TYPE_VALVE , "TYPE_VALVE"},
{subt::ArtifactType::TYPE_VENT , "TYPE_VENT"},
{subt::ArtifactType::TYPE_GAS , "TYPE_GAS"}
{subt::ArtifactType::TYPE_GAS , "TYPE_GAS"},
{subt::ArtifactType::TYPE_HELMET , "TYPE_HELMET"},
{subt::ArtifactType::TYPE_ROPE , "TYPE_ROPE"}
}
};

Expand Down Expand Up @@ -304,7 +306,9 @@ void ArtifactValidatorPrivate::ParseArtifacts()
{ "toolbox", subt::ArtifactType::TYPE_TOOLBOX },
{ "valve", subt::ArtifactType::TYPE_VALVE},
{ "vent", subt::ArtifactType::TYPE_VENT},
{ "gas", subt::ArtifactType::TYPE_GAS}
{ "gas", subt::ArtifactType::TYPE_GAS},
{ "helmet", subt::ArtifactType::TYPE_HELMET},
{ "rope", subt::ArtifactType::TYPE_ROPE}
};

// Assuming 1 world per SDF, which is true for SubT.
Expand Down
3 changes: 2 additions & 1 deletion subt_ign/src/ConnectionValidatorPrivate.cc
Expand Up @@ -72,7 +72,8 @@ bool ConnectionValidatorPrivate::Load(const std::string &_worldName)
"cave_circuit", suffix);
}
}
else if (_worldName.find("simple") == std::string::npos)
else if (_worldName.find("simple") == std::string::npos &&
_worldName.find("_qual") == std::string::npos)
{
ignwarn << "Unable to determine circuit number from["
<< _worldName << "].\n";
Expand Down
10 changes: 8 additions & 2 deletions subt_ign/src/GameLogicPlugin.cc
Expand Up @@ -65,7 +65,7 @@ class subt::GameLogicPluginPrivate
{
/// \brief Mapping between enum types and strings.
public: const std::array<
const std::pair<subt::ArtifactType, std::string>, 12> kArtifactTypes
const std::pair<subt::ArtifactType, std::string>, 14> kArtifactTypes
{
{
{subt::ArtifactType::TYPE_BACKPACK , "TYPE_BACKPACK"},
Expand All @@ -79,7 +79,9 @@ class subt::GameLogicPluginPrivate
{subt::ArtifactType::TYPE_TOOLBOX , "TYPE_TOOLBOX"},
{subt::ArtifactType::TYPE_VALVE , "TYPE_VALVE"},
{subt::ArtifactType::TYPE_VENT , "TYPE_VENT"},
{subt::ArtifactType::TYPE_GAS , "TYPE_GAS"}
{subt::ArtifactType::TYPE_GAS , "TYPE_GAS"},
{subt::ArtifactType::TYPE_HELMET , "TYPE_HELMET"},
{subt::ArtifactType::TYPE_ROPE , "TYPE_ROPE"}
}
};

Expand Down Expand Up @@ -279,10 +281,14 @@ class subt::GameLogicPluginPrivate
ignition::math::Vector3d(-0.03557, -0.03509, 0.3479)},
{subt::ArtifactType::TYPE_GAS,
ignition::math::Vector3d(0, 0, 0)},
{subt::ArtifactType::TYPE_HELMET,
ignition::math::Vector3d(0, 0, 0.165)},
{subt::ArtifactType::TYPE_PHONE,
ignition::math::Vector3d(0, -0.004, 0.08)},
{subt::ArtifactType::TYPE_RESCUE_RANDY,
ignition::math::Vector3d(-0.071305, 0.021966, 0.39217)},
{subt::ArtifactType::TYPE_ROPE,
ignition::math::Vector3d(0.004, -0.03, 0.095)},
{subt::ArtifactType::TYPE_VENT,
ignition::math::Vector3d(0, 0, 0.138369)}
};
Expand Down
3 changes: 2 additions & 1 deletion subt_ign/src/VisibilityTable.cc
Expand Up @@ -78,7 +78,8 @@ bool VisibilityTable::Load(const std::string &_worldName, bool _loadLUT)
"cave_circuit", suffix);
}
}
else if (this->worldName.find("simple") == std::string::npos)
else if (this->worldName.find("simple") == std::string::npos &&
this->worldName.find("_qual") == std::string::npos)
{
ignerr << "Unable to determine circuit number from["
<< this->worldName << "].\n";
Expand Down
Binary file added subt_ign/worlds/cave_qual.dat
Binary file not shown.
165 changes: 165 additions & 0 deletions subt_ign/worlds/cave_qual.dot
@@ -0,0 +1,165 @@
/* Visibility graph generated by dot_generator */

graph {
/* ==== Vertices ==== */

/* Base station / Staging area */
0 [label="0::base_station::BaseStation"];

1 [label="1::Cave 3 Way 01 Lights::tile_1"];
2 [label="2::Cave Corner 01::tile_2"];
3 [label="3::Cave Corner 02::tile_3"];
4 [label="4::Cave Elevation::tile_4"];
5 [label="5::Cave Straight 01::tile_5"];
6 [label="6::Cave Straight 02 Lights::tile_6"];
7 [label="7::Cave Straight 05 Lights::tile_7"];
8 [label="8::Cave Vertical Shaft Lights::tile_8"];
9 [label="9::Cave Cavern Split 01::tile_9"];
10 [label="10::Cave Cavern Split 02::tile_10"];
11 [label="11::Cave 3 Way 01::tile_11"];
12 [label="12::Cave Straight 03::tile_12"];
13 [label="13::Cave 3 Way 01 Lights::tile_13"];
14 [label="14::Cave Corner 02::tile_14"];
15 [label="15::Cave Elevation::tile_15"];
16 [label="16::Cave 3 Way 01 Lights::tile_16"];
17 [label="17::Cave Corner 30F D Lights::tile_17"];
18 [label="18::Cave Corner 30F D Lights::tile_18"];
19 [label="19::Cave Corner 30F D Lights::tile_19"];
20 [label="20::Cave Corner 30F D Lights::tile_20"];
21 [label="21::Cave 3 Way 01 Lights::tile_21"];
22 [label="22::Cave Corner 30F D Lights::tile_22"];
23 [label="23::Cave Elevation Lights::tile_23"];
24 [label="24::Cave Vertical Shaft Lights::tile_24"];
25 [label="25::Cave Corner 01 Lights::tile_25"];
26 [label="26::Cave Straight 01 Lights::tile_26"];
27 [label="27::Cave Corner 02 Lights::tile_27"];
28 [label="28::Cave Elevation::tile_28"];
29 [label="29::Cave Straight 03::tile_29"];
30 [label="30::Cave 3 Way 01::tile_30"];
31 [label="31::Cave Corner 01::tile_31"];
32 [label="32::Cave 3 Way 01::tile_32"];
33 [label="33::Cave Elevation::tile_33"];
34 [label="34::Cave Straight 01::tile_34"];
35 [label="35::Cave Straight 02::tile_35"];
36 [label="36::Cave Straight 03::tile_36"];
37 [label="37::Cave Corner 01::tile_37"];
38 [label="38::Cave Corner 30 D::tile_38"];
39 [label="39::Cave Elevation::tile_39"];
40 [label="40::Cave Straight 03::tile_40"];
41 [label="41::Cave Straight 02::tile_41"];
42 [label="42::Cave Corner 01::tile_42"];
43 [label="43::Cave Corner 02::tile_43"];
44 [label="44::Cave Straight 01::tile_44"];
45 [label="45::Cave Straight 04::tile_45"];
46 [label="46::Cave Straight 04::tile_46"];
47 [label="47::Cave Straight 02::tile_47"];
48 [label="48::Cave Straight 04::tile_48"];
49 [label="49::Cave Straight 01::tile_49"];
50 [label="50::Cave Straight 03::tile_50"];
51 [label="51::Cave Elevation::tile_51"];
52 [label="52::Cave 3 Way 01 Lights::tile_52"];
53 [label="53::Cave Straight 03::tile_53"];
54 [label="54::Cave Corner 02::tile_54"];
55 [label="55::Cave Corner 02::tile_55"];
56 [label="56::Cave Elevation::tile_56"];
57 [label="57::Cave 3 Way 01::tile_57"];
58 [label="58::Cave Corner 30 D::tile_58"];
59 [label="59::Cave Straight 03::tile_59"];
60 [label="60::Cave Corner 30 D::tile_60"];
61 [label="61::Cave Elevation::tile_61"];
62 [label="62::Cave Corner 30 D::tile_62"];
63 [label="63::Cave Corner 01::tile_63"];
64 [label="64::Cave Corner 02::tile_64"];
65 [label="65::Cave Elevation::tile_65"];
66 [label="66::Cave Straight 03::tile_66"];
67 [label="67::Cave Straight 04::tile_67"];
68 [label="68::Cave Corner 01::tile_68"];
69 [label="69::Cave Cavern Split 01::tile_69"];
70 [label="70::Cave Cavern Split 02::tile_70"];
71 [label="71::Cave Straight 01 Lights::tile_71"];
72 [label="72::Cave Straight 04 Lights::tile_72"];
73 [label="73::Cave 3 Way 01 Lights::tile_73"];
74 [label="74::Cave Corner 30F D Lights::tile_74"];
75 [label="75::Cave Corner 30 D Lights::tile_75"];

/* ==== Edges ==== */

/* Base station */
0 -- 71 [label=1];
1 -- 6 [label=3];
1 -- 8 [label=3];
1 -- 73 [label=6];
2 -- 3 [label=6];
2 -- 6 [label=3];
3 -- 11 [label=6];
4 -- 11 [label=3];
4 -- 12 [label=1];
5 -- 52 [label=3];
5 -- 53 [label=1];
7 -- 13 [label=3];
7 -- 16 [label=3];
8 -- 13 [label=3];
9 -- 10 [label=3];
9 -- 31 [label=6];
9 -- 36 [label=3];
10 -- 46 [label=1];
12 -- 55 [label=3];
13 -- 52 [label=6];
14 -- 53 [label=3];
14 -- 56 [label=3];
15 -- 52 [label=3];
15 -- 55 [label=3];
16 -- 17 [label=6];
16 -- 18 [label=6];
17 -- 19 [label=6];
18 -- 20 [label=6];
19 -- 27 [label=6];
20 -- 21 [label=6];
21 -- 22 [label=6];
21 -- 35 [label=3];
22 -- 23 [label=3];
23 -- 25 [label=3];
24 -- 25 [label=3];
24 -- 26 [label=1];
27 -- 28 [label=3];
28 -- 29 [label=1];
29 -- 30 [label=3];
30 -- 31 [label=6];
30 -- 33 [label=3];
32 -- 34 [label=3];
32 -- 35 [label=3];
32 -- 38 [label=6];
33 -- 34 [label=1];
36 -- 37 [label=3];
38 -- 39 [label=3];
39 -- 40 [label=1];
40 -- 41 [label=1];
41 -- 42 [label=3];
42 -- 44 [label=3];
43 -- 44 [label=3];
43 -- 45 [label=3];
46 -- 47 [label=1];
47 -- 50 [label=1];
48 -- 51 [label=1];
49 -- 50 [label=1];
49 -- 51 [label=1];
54 -- 56 [label=3];
54 -- 57 [label=6];
57 -- 58 [label=6];
57 -- 62 [label=6];
58 -- 59 [label=3];
59 -- 60 [label=3];
60 -- 61 [label=3];
62 -- 64 [label=6];
63 -- 64 [label=6];
63 -- 65 [label=3];
65 -- 67 [label=1];
66 -- 67 [label=1];
66 -- 68 [label=3];
68 -- 70 [label=3];
69 -- 70 [label=3];
71 -- 73 [label=3];
72 -- 73 [label=3];
72 -- 74 [label=3];
74 -- 75 [label=6];
}