Skip to content

Commit 1f04191

Browse files
nkoenigNate Koenigacschang
authored
Final event worlds 1-8 (#1009) (#1015)
* Add mapping server relays to models and teambase (#996) * Add mapping server relays to models and teambase Signed-off-by: Nate Koenig <[email protected]> * Added ns to teambase mapping server relays. * The mapping server relays are included through the base bosdyn_spot model. * Accidental commit of script to check for mapping server relays. * Fixed whitespace commit for marble spot cfg 1. Co-authored-by: Nate Koenig <[email protected]> Co-authored-by: Arthur Schang <[email protected]> * Final event worlds 1,2, and 3 Signed-off-by: Nate Koenig <[email protected]> * Remove old code Signed-off-by: Nate Koenig <[email protected]> * revert Signed-off-by: Nate Koenig <[email protected]> * Remove path tracer updates Signed-off-by: Nate Koenig <[email protected]> * Additional reverts Signed-off-by: Nate Koenig <[email protected]> * Final worlds 4,5,6,7 (#1010) * Final worlds 4,5,6,7 Signed-off-by: Nate Koenig <[email protected]> * Finals prize round world 8 (#1011) Signed-off-by: Nate Koenig <[email protected]> Co-authored-by: Nate Koenig <[email protected]> Co-authored-by: Nate Koenig <[email protected]> Co-authored-by: Nate Koenig <[email protected]> Co-authored-by: Arthur Schang <[email protected]> Co-authored-by: Nate Koenig <[email protected]> Co-authored-by: Arthur Schang <[email protected]>
1 parent afef837 commit 1f04191

File tree

306 files changed

+42333
-12
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

306 files changed

+42333
-12
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,6 @@ cave_circuit_04.dat
4040
cave_circuit_07.dat
4141
cave_circuit_08.dat
4242
finals_practice_03.dat
43+
final_event_03.dat
44+
final_event_07.dat
45+
final_event_06.dat

docker/cloudsim_bridge/Dockerfile

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ FROM nvidia/opengl:1.0-glvnd-devel-ubuntu18.04
55
RUN export DEBIAN_FRONTEND=noninteractive \
66
&& apt-get update \
77
&& apt-get install --no-install-recommends -y \
8+
curl \
89
tzdata \
910
sudo \
1011
wget \
@@ -64,6 +65,8 @@ RUN sudo apt-get update -qq \
6465
wget \
6566
net-tools \
6667
iputils-ping \
68+
libyaml-cpp-dev \
69+
xvfb \
6770
g++-8 \
6871
&& sudo apt-get clean -qq
6972

@@ -95,6 +98,7 @@ RUN sudo /bin/sh -c 'echo "deb [trusted=yes] http://packages.ros.org/ros/ubuntu
9598
ros-melodic-rviz-imu-plugin \
9699
ros-melodic-rotors-control \
97100
ros-melodic-theora-image-transport \
101+
ros-melodic-control-toolbox \
98102
&& sudo rosdep init \
99103
&& sudo apt-get clean
100104

@@ -105,7 +109,7 @@ RUN sudo /bin/sh -c 'echo "deb [trusted=yes] http://packages.osrfoundation.org/g
105109
&& sudo /bin/sh -c 'wget http://packages.osrfoundation.org/gazebo.key -O - | apt-key add -' \
106110
&& sudo /bin/sh -c 'apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654'
107111

108-
# install ign-dome and the ign-bridge
112+
# install ign-dome
109113
RUN sudo apt-get update \
110114
&& sudo apt-get install -y \
111115
ignition-dome \

subt_ign/CMakeLists.txt

+24
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,30 @@ add_custom_command(TARGET unzip_dat PRE_BUILD
274274
COMMENT "Unpacking finals_practice_03.dat.zip"
275275
VERBATIM)
276276

277+
# Unzip the final_event_03.dat.zip file
278+
add_custom_command(TARGET unzip_dat PRE_BUILD
279+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/worlds/final_event/03
280+
COMMAND ${CMAKE_COMMAND} -E tar xvf final_event_03.dat.zip
281+
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/worlds/final_event/03/final_event_03.dat.zip
282+
COMMENT "Unpacking final_event_03.dat.zip"
283+
VERBATIM)
284+
285+
# Unzip the final_event/06/final_event_06.dat.zip file
286+
add_custom_command(TARGET unzip_dat PRE_BUILD
287+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/worlds/final_event/06
288+
COMMAND ${CMAKE_COMMAND} -E tar xvf final_event_06.dat.zip
289+
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/worlds/final_event/06/final_event_06.dat.zip
290+
COMMENT "Unpacking final_event_06.dat.zip"
291+
VERBATIM)
292+
293+
# Unzip the final_event_07.dat.zip file
294+
add_custom_command(TARGET unzip_dat PRE_BUILD
295+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/worlds/final_event/07
296+
COMMAND ${CMAKE_COMMAND} -E tar xvf final_event_07.dat.zip
297+
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/worlds/final_event/07/final_event_07.dat.zip
298+
COMMENT "Unpacking final_event_07.dat.zip"
299+
VERBATIM)
300+
277301
install(PROGRAMS
278302
scripts/subt_docker.bash
279303
scripts/subt_docker_list.bash

subt_ign/src/ConnectionHelper.cc

+6
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ std::map<std::string, std::vector<ignition::math::Vector3d>>
211211
{"Cave Tunnel Transition", {{0, 25, 0}, {0, -25, 0}, {-25, 0, 0}}},
212212
{"Cave Tunnel Transition Lights", {{0, 25, 0}, {0, -25, 0}, {-25, 0, 0}}},
213213
{"Urban Cave Transition", {{0, -12, 0}, {0, 12, 0}, {-25, 0, 0}}},
214+
{"Urban Cave Transition Lights", {{0, -12, 0}, {0, 12, 0}, {-25, 0, 0}}},
214215
{"Urban Cave Transition 2", {{0, -12, 0}, {0, 12, 0}, {-25, 0, 0}}},
215216
{"Urban Cave Transition Straight", {{0, -5, 0}, {0, 5, 0}}},
216217
{"Urban Cave Transition Straight Large", {{0, -5, 0}, {0, 5, 0}}},
@@ -222,6 +223,7 @@ std::map<std::string, std::vector<ignition::math::Vector3d>>
222223
{"4-Way Finals Transition 2", {{8, 0, 0}, {-8, 0, 0}, {0, 8, 0}, {0, -8, 0}}},
223224
{"4-Way Finals Transition 2 Lights", {{8, 0, 0}, {-8, 0, 0}, {0, 8, 0}, {0, -8, 0}}},
224225
{"Finals Staging Area", {{0, 5, 0}}},
226+
{"NIOSH Staging Connector Finals", {{0, 0, 0}, {-1, 6.5, 0}}},
225227
};
226228

227229
std::map<std::string, subt::ConnectionHelper::ConnectionType>
@@ -404,6 +406,7 @@ std::map<std::string, subt::ConnectionHelper::ConnectionType>
404406
{"Cave Tunnel Transition", subt::ConnectionHelper::STRAIGHT},
405407
{"Cave Tunnel Transition Lights", subt::ConnectionHelper::STRAIGHT},
406408
{"Urban Cave Transition", subt::ConnectionHelper::STRAIGHT},
409+
{"Urban Cave Transition Lights", subt::ConnectionHelper::STRAIGHT},
407410
{"Urban Cave Transition 2", subt::ConnectionHelper::STRAIGHT},
408411
{"Urban Cave Transition Straight", subt::ConnectionHelper::STRAIGHT},
409412
{"Urban Cave Transition Straight Large", subt::ConnectionHelper::STRAIGHT},
@@ -414,6 +417,7 @@ std::map<std::string, subt::ConnectionHelper::ConnectionType>
414417
{"4-Way Finals Transition", subt::ConnectionHelper::TURN},
415418
{"4-Way Finals Transition 2", subt::ConnectionHelper::TURN},
416419
{"4-Way Finals Transition 2 Lights", subt::ConnectionHelper::TURN},
420+
{"NIOSH Staging Connector Finals", subt::ConnectionHelper::STRAIGHT},
417421
};
418422

419423
std::map<std::string, subt::ConnectionHelper::CircuitType>
@@ -596,6 +600,7 @@ std::map<std::string, subt::ConnectionHelper::ConnectionType>
596600
{"Cave Tunnel Transition", subt::ConnectionHelper::TRANSITION},
597601
{"Cave Tunnel Transition Lights", subt::ConnectionHelper::TRANSITION},
598602
{"Urban Cave Transition", subt::ConnectionHelper::TRANSITION},
603+
{"Urban Cave Transition Lights", subt::ConnectionHelper::TRANSITION},
599604
{"Urban Cave Transition Straight", subt::ConnectionHelper::TRANSITION},
600605
{"Urban Tunnel Transition", subt::ConnectionHelper::TRANSITION},
601606
{"Urban Tunnel Transition 2", subt::ConnectionHelper::TRANSITION},
@@ -604,6 +609,7 @@ std::map<std::string, subt::ConnectionHelper::ConnectionType>
604609
{"4-Way Finals Transition", subt::ConnectionHelper::TRANSITION},
605610
{"4-Way Finals Transition 2", subt::ConnectionHelper::TRANSITION},
606611
{"4-Way Finals Transition 2 Lights", subt::ConnectionHelper::TRANSITION},
612+
{"NIOSH Staging Connector Finals", subt::ConnectionHelper::TRANSITION},
607613
};
608614

609615
using namespace ignition;

subt_ign/src/GameLogicPlugin.cc

+4-1
Original file line numberDiff line numberDiff line change
@@ -1247,7 +1247,10 @@ void GameLogicPlugin::PreUpdate(const UpdateInfo &_info,
12471247
for (auto &ke : this->dataPtr->keInfo)
12481248
{
12491249
ignition::gazebo::Link link(ke.second.link);
1250-
if (std::nullopt != link.WorldKineticEnergy(_ecm))
1250+
if (std::nullopt != link.WorldKineticEnergy(_ecm) &&
1251+
robotPlatformTypes.find(
1252+
this->dataPtr->robotFullTypes[ke.second.robotName].first) !=
1253+
robotPlatformTypes.end())
12511254
{
12521255
double currKineticEnergy = *link.WorldKineticEnergy(_ecm);
12531256

subt_ign/src/VisibilityRfModel.cc

+13-9
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,13 @@ bool VisibilityModel::VisualizeVisibility(const ignition::msgs::StringMsg &_req,
198198
indexToColor[4] = ignition::math::Color(1, 0, 0);
199199
indexToColor[5] = ignition::math::Color(1, 1, 1);
200200

201-
for (int i = 0; i < 6; ++i)
201+
// there are six colors but white is currently not used
202+
for (int i = 0; i < 5; ++i)
202203
{
203-
markerMsg.set_id(i);
204+
// marker id 0 is reserved in ign-gazebo
205+
// so start with 1
206+
int id = i+1;
207+
markerMsg.set_id(id);
204208

205209
ignition::msgs::Material *matMsg = markerMsg.mutable_material();
206210
ignition::msgs::Set(matMsg->mutable_ambient(), indexToColor[i]);
@@ -209,7 +213,7 @@ bool VisibilityModel::VisualizeVisibility(const ignition::msgs::StringMsg &_req,
209213
ignition::msgs::Set(markerMsg.mutable_scale(),
210214
ignition::math::Vector3d(1.0, 1.0, 1.0));
211215

212-
perCostMarkers.insert(std::make_pair(i, markerMsg));
216+
perCostMarkers.insert(std::make_pair(id, markerMsg));
213217
}
214218

215219
std::string modelName = _req.data();
@@ -247,7 +251,7 @@ bool VisibilityModel::VisualizeVisibility(const ignition::msgs::StringMsg &_req,
247251
// Scale packet drop probability to align with the color scheme
248252
int pdp = floor(packet_drop_prob*5.00001);
249253

250-
auto m = perCostMarkers.find(static_cast<int>(pdp));
254+
auto m = perCostMarkers.find(static_cast<int>(pdp)+1);
251255

252256
if (m == perCostMarkers.end())
253257
{
@@ -261,11 +265,11 @@ bool VisibilityModel::VisualizeVisibility(const ignition::msgs::StringMsg &_req,
261265
}
262266
}
263267

264-
this->node.Request("/marker", perCostMarkers[0]);
265-
this->node.Request("/marker", perCostMarkers[1]);
266-
this->node.Request("/marker", perCostMarkers[2]);
267-
this->node.Request("/marker", perCostMarkers[3]);
268-
this->node.Request("/marker", perCostMarkers[4]);
268+
for (int i = 0; i < 5; i++)
269+
{
270+
int id = i+1;
271+
this->node.Request("/marker", perCostMarkers[id]);
272+
}
269273

270274
_rep.set_data(true);
271275
return true;

subt_ign/src/apps/level_generator.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,9 @@ void generateLevel(const std::string &_sdfFile, const math::Vector3d &_size,
252252
filter = [](const std::string &_name,
253253
const std::string &/*_type*/)
254254
{
255-
return modelsToIgnore.count(_name) > 0;
255+
return modelsToIgnore.count(_name) > 0 ||
256+
_name.find("fog") != std::string::npos ||
257+
_name.find("dynamic_rocks") != std::string::npos;
256258
};
257259

258260
std::vector<VertexData> vertexData;
Binary file not shown.

0 commit comments

Comments
 (0)