mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
Make mavsdk test runner handle generated sdf files (#15797)
Update sitl_gazebo Fix indent errors Fix syntax error Fix indentation errors Fix syntax errors use autopep8
This commit is contained in:
Submodule Tools/sitl_gazebo updated: 9d2b19784c...31445dee74
@@ -224,9 +224,23 @@ class GzmodelspawnRunner(Runner):
|
|||||||
self.env["GAZEBO_MODEL_PATH"] = \
|
self.env["GAZEBO_MODEL_PATH"] = \
|
||||||
workspace_dir + "/Tools/sitl_gazebo/models"
|
workspace_dir + "/Tools/sitl_gazebo/models"
|
||||||
self.cmd = "gz"
|
self.cmd = "gz"
|
||||||
self.args = ["model", "--spawn-file", workspace_dir +
|
|
||||||
|
if os.path.isfile(workspace_dir +
|
||||||
"/Tools/sitl_gazebo/models/" +
|
"/Tools/sitl_gazebo/models/" +
|
||||||
self.model + "/" + self.model + ".sdf",
|
self.model + "/" + self.model + ".sdf"):
|
||||||
|
model_path = workspace_dir + \
|
||||||
|
"/Tools/sitl_gazebo/models/" + \
|
||||||
|
self.model + "/" + self.model + ".sdf"
|
||||||
|
elif os.path.isfile(workspace_dir +
|
||||||
|
"/Tools/sitl_gazebo/models/" +
|
||||||
|
self.model + "/" + self.model + "-gen.sdf"):
|
||||||
|
model_path = workspace_dir + \
|
||||||
|
"/Tools/sitl_gazebo/models/" + \
|
||||||
|
self.model + "/" + self.model + "-gen.sdf"
|
||||||
|
else:
|
||||||
|
raise Exception("Model not found")
|
||||||
|
|
||||||
|
self.args = ["model", "--spawn-file", model_path,
|
||||||
"--model-name", self.model,
|
"--model-name", self.model,
|
||||||
"-x", "1.01", "-y", "0.98", "-z", "0.83"]
|
"-x", "1.01", "-y", "0.98", "-z", "0.83"]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user