build: add directory-oriented make workflows
Host SITL smoke / Deterministic Gazebo command path (push) Has been cancelled
Host SITL smoke / Deterministic Gazebo command path (push) Has been cancelled
This commit is contained in:
1 parent
4bc98adbc6
commit
7dc3ccb619
40 files changed
+1367
-278
No files matched your search
@@ -67,7 +67,9 @@ def check_world() -> None:
|
||||
world = root.find("./world")
|
||||
if world is None:
|
||||
fail("missing world")
|
||||
model_names = {model_element.get("name") for model_element in world.findall("model")}
|
||||
model_names = {
|
||||
model_element.get("name") for model_element in world.findall("model")
|
||||
}
|
||||
if model_names != {"ground", "sitl_reference_map", "kaptan_sitl_quad"}:
|
||||
fail(
|
||||
"the declared flat-world model may contain only ground, the visual reference map, "
|
||||
@@ -76,7 +78,9 @@ def check_world() -> None:
|
||||
|
||||
ground = model(root, "ground")
|
||||
ground_collisions = ground.findall(".//collision")
|
||||
if [collision.get("name") for collision in ground_collisions] != ["ground_collision"]:
|
||||
if [collision.get("name") for collision in ground_collisions] != [
|
||||
"ground_collision"
|
||||
]:
|
||||
fail("ground must retain exactly one flat collision plane")
|
||||
if ground_collisions[0].find("geometry/plane") is None:
|
||||
fail("ground collision must remain a flat plane")
|
||||
@@ -89,11 +93,15 @@ def check_world() -> None:
|
||||
if reference_map.findall(".//collision"):
|
||||
fail("reference map must remain visual-only and cannot add obstacle physics")
|
||||
if reference_map.findall(".//transparency"):
|
||||
fail("reference map must not use unsupported SDF transparency material children")
|
||||
fail(
|
||||
"reference map must not use unsupported SDF transparency material children"
|
||||
)
|
||||
reference_link = named(reference_map, "link", "reference_link")
|
||||
actual_marks = {visual.get("name") for visual in reference_link.findall("visual")}
|
||||
if actual_marks != {"landing_pad"}:
|
||||
fail(f"reference map may contain only the landing pad; found {sorted(actual_marks)!r}")
|
||||
fail(
|
||||
f"reference map may contain only the landing pad; found {sorted(actual_marks)!r}"
|
||||
)
|
||||
|
||||
quad = model(root, "kaptan_sitl_quad")
|
||||
if pose(quad)[:3] != (0.0, 0.0, 0.14):
|
||||
@@ -122,7 +130,9 @@ def check_world() -> None:
|
||||
"body_collision",
|
||||
*(f"landing_foot_{foot}_collision" for foot in foot_positions),
|
||||
}
|
||||
actual_quad_collisions = {collision.get("name") for collision in base_link.findall("collision")}
|
||||
actual_quad_collisions = {
|
||||
collision.get("name") for collision in base_link.findall("collision")
|
||||
}
|
||||
if actual_quad_collisions != expected_quad_collisions:
|
||||
fail(
|
||||
"quad collision geometry must remain its body and four declared landing feet; "
|
||||
@@ -130,8 +140,12 @@ def check_world() -> None:
|
||||
)
|
||||
|
||||
sensors = quad.findall(".//sensor")
|
||||
if [(sensor.get("name"), sensor.get("type")) for sensor in sensors] != [("imu", "imu")]:
|
||||
fail("this local-state SITL world must not imply unmodeled visual/range/flow sensors")
|
||||
if [(sensor.get("name"), sensor.get("type")) for sensor in sensors] != [
|
||||
("imu", "imu")
|
||||
]:
|
||||
fail(
|
||||
"this local-state SITL world must not imply unmodeled visual/range/flow sensors"
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in new issue
Block a user