Skip to content

Commit

Permalink
Remove sim.sh, insert contents into .bashrc in Dockerfile (#227)
Browse files Browse the repository at this point in the history
* GZ_VERSION is set in the Dockerfile, don't override in sim.sh

* Remove sim.sh, insert into .bashrc in Dockerfile

* Remove dead code in Dockerfile

* Use intermediate variable for location of BLUE_DESCRIPTION files.

---------

Co-authored-by: Aaron Marburg <[email protected]>
  • Loading branch information
amarburg and amarburg authored Aug 19, 2024
1 parent 96852e3 commit 2904656
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 23 deletions.
22 changes: 21 additions & 1 deletion .docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOT cat >> /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

Expand Down
22 changes: 0 additions & 22 deletions .docker/entrypoints/sim.sh

This file was deleted.

0 comments on commit 2904656

Please sign in to comment.