diff --git a/.docker/Dockerfile b/.docker/Dockerfile index d0fc17c0..85540dee 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -230,7 +230,27 @@ RUN . "/opt/ros/${ROS_DISTRO}/setup.sh" \ && colcon build # Setup the simulation environment variables -RUN echo "source ${USER_WORKSPACE}/src/blue/.docker/entrypoints/sim.sh" >> /home/$USERNAME/.bashrc +RUN <> /home/$USERNAME/.bashrc + +# Add results of ArduSub build +export PATH=\$HOME/ardupilot/build/sitl/bin:\$PATH + +# Optional: add autotest to the PATH, helpful for running sim_vehicle.py +export PATH=\$HOME/ardupilot/Tools/autotest:\$PATH + +# Add ardupilot_gazebo plugin +export GZ_SIM_SYSTEM_PLUGIN_PATH=\$HOME/ardupilot_gazebo/build:\$GZ_SIM_SYSTEM_PLUGIN_PATH + +# Add ardupilot_gazebo models and worlds +export GZ_SIM_RESOURCE_PATH=\$HOME/ardupilot_gazebo/models:\$HOME/ardupilot_gazebo/worlds:\$GZ_SIM_RESOURCE_PATH + +# Add blue models and worlds +BLUE_DESCRIPTION=\$USER_WORKSPACE/src/blue/blue_description +export GZ_SIM_RESOURCE_PATH=\$BLUE_DESCRIPTION/gazebo/models:\$BLUE_DESCRIPTION/gazebo/worlds:\$GZ_SIM_RESOURCE_PATH + +# Add blue meshes +export GZ_SIM_RESOURCE_PATH=\$BLUE_DESCRIPTION/meshes:\$GZ_SIM_RESOURCE_PATH +EOT FROM desktop AS desktop-nvidia diff --git a/.docker/entrypoints/sim.sh b/.docker/entrypoints/sim.sh deleted file mode 100644 index 85b3946b..00000000 --- a/.docker/entrypoints/sim.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -# Add results of ArduSub build -export PATH=$HOME/ardupilot/build/sitl/bin:$PATH - -# Optional: add autotest to the PATH, helpful for running sim_vehicle.py -export PATH=$HOME/ardupilot/Tools/autotest:$PATH - -# Add ardupilot_gazebo plugin -export GZ_SIM_SYSTEM_PLUGIN_PATH=$HOME/ardupilot_gazebo/build:$GZ_SIM_SYSTEM_PLUGIN_PATH - -# Add ardupilot_gazebo models and worlds -export GZ_SIM_RESOURCE_PATH=$HOME/ardupilot_gazebo/models:$HOME/ardupilot_gazebo/worlds:$GZ_SIM_RESOURCE_PATH - -# Add blue models and worlds -export GZ_SIM_RESOURCE_PATH=$HOME/ws_blue/src/blue/blue_description/gazebo/models:$HOME/ws_blue/src/blue/blue_description/gazebo/worlds:$GZ_SIM_RESOURCE_PATH - -# Add blue meshes -export GZ_SIM_RESOURCE_PATH=$HOME/ws_blue/src/blue/blue_description/meshes:$GZ_SIM_RESOURCE_PATH - -# Build ros_gz for Gazebo Garden -export GZ_VERSION=garden