From 0dd14bd2fdf9911bfc2398af2a26152705d4b4ff Mon Sep 17 00:00:00 2001 From: Alex Davies Date: Wed, 10 Jul 2024 15:51:40 -0300 Subject: [PATCH] Fix path to mu model --- .gitmodules | 3 +++ Dockerfile | 6 +++--- PX4-Autopilot | 1 + skel/Desktop/simulated-drone/sim_drone.py | 4 ++-- 4 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 .gitmodules create mode 160000 PX4-Autopilot diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..dfa1abd --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "PX4-Autopilot"] + path = PX4-Autopilot + url = https://git.spirirobotics.com/Spiri/PX4-Autopilot.git diff --git a/Dockerfile b/Dockerfile index af761fa..ded1564 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM px4io/px4-dev-simulation-focal -COPY --link --from=git.spirirobotics.com/spiri/gazebo-resources:latest /models /usr/share/gazebo-11/models/ +COPY --link --from=git.spirirobotics.com/spiri/gazebo-resources:latest /models /opt/spiri-sdk/PX4-Autopilot/Tools/simulation/gazebo-classic/sitl_gazebo-classic/models/ COPY --link --from=git.spirirobotics.com/spiri/gazebo-resources:latest /worlds /usr/share/gazebo-11/worlds/ COPY --link --from=git.spirirobotics.com/spiri/gazebo-resources:latest /plugins /usr/lib/x86_64-linux-gnu/gazebo-11/plugins @@ -21,11 +21,11 @@ RUN apt-get install --yes ros-noetic-desktop gazebo11 libgazebo11 libgazebo11-de WORKDIR /opt/spiri-sdk -RUN git clone --depth 1 -b v1.15.0-beta1 https://github.com/PX4/PX4-Autopilot.git --recursive +COPY ./ /opt/spiri-sdk/ WORKDIR /opt/spiri-sdk/PX4-Autopilot/ #Precompile px4 #RUN make px4_sitl_default -RUN DONT_RUN=1 make px4_sitl gazebo-classic +RUN DONT_RUN=1 make px4_sitl gazebo-classic_mu RUN pip3 install typer-slim loguru sh diff --git a/PX4-Autopilot b/PX4-Autopilot new file mode 160000 index 0000000..dd0fb2e --- /dev/null +++ b/PX4-Autopilot @@ -0,0 +1 @@ +Subproject commit dd0fb2ef11fc6882c005b16801b1ef47b5d8683b diff --git a/skel/Desktop/simulated-drone/sim_drone.py b/skel/Desktop/simulated-drone/sim_drone.py index 61c7ec9..1968f72 100755 --- a/skel/Desktop/simulated-drone/sim_drone.py +++ b/skel/Desktop/simulated-drone/sim_drone.py @@ -114,7 +114,7 @@ def start(sys_id: int = 1, extra_apps: List[pathlib.Path] = []): """ with logger.contextualize(syd_id=sys_id): 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_INSTANCE="intance_id", @@ -126,7 +126,7 @@ def start(sys_id: int = 1, extra_apps: List[pathlib.Path] = []): # Run the make px4_sitl gazebo-classic command px4_command = sh.make( "px4_sitl", - "gazebo-classic", + "gazebo-classic_mu", _bg=True, _out=outputLogger("px4", sys_id), _cwd=px4Path,