Proper px4 path

This commit is contained in:
Alex Davies 2024-07-05 14:12:37 -03:00
parent 5445f21de1
commit 38fd97bc7a
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,6 @@ logger.add(
px4Path = os.environ.get("SPIRI_SIM_PX4_PATH", "/opt/spiri-sdk/PX4-Autopilot/") px4Path = os.environ.get("SPIRI_SIM_PX4_PATH", "/opt/spiri-sdk/PX4-Autopilot/")
logger.info(f"SPIRI_SIM_PX4_PATH={px4Path}") logger.info(f"SPIRI_SIM_PX4_PATH={px4Path}")
px4 = sh.Command(px4Path)
app = typer.Typer() app = typer.Typer()
@ -116,6 +115,7 @@ def start(sys_id: int = 1, extra_apps: List[pathlib.Path] = []):
with logger.contextualize(syd_id=sys_id): with logger.contextualize(syd_id=sys_id):
with modified_environ( with modified_environ(
PX4_SIM_MODEL=os.environ.get("PX4_SIM_MODEL") or "gz_x500", PX4_SIM_MODEL=os.environ.get("PX4_SIM_MODEL") or "gz_x500",
# ToDo: pose is not passed to gazebo classic
PX4_GZ_MODEL_POSE=os.environ.get("PX4_GZ_MODEL_POSE") or f"0,{(sys_id-1)}", PX4_GZ_MODEL_POSE=os.environ.get("PX4_GZ_MODEL_POSE") or f"0,{(sys_id-1)}",
PX4_INSTANCE="intance_id", PX4_INSTANCE="intance_id",
ROS_MASTER_PORT=str(11310 + sys_id), ROS_MASTER_PORT=str(11310 + sys_id),