Skip to content

Commit 2904656

Browse files
authored
Remove sim.sh, insert contents into .bashrc in Dockerfile (Robotic-Decision-Making-Lab#227)
* 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 <amarburg@uw.edu>
1 parent 96852e3 commit 2904656

File tree

2 files changed

+21
-23
lines changed

2 files changed

+21
-23
lines changed

.docker/Dockerfile

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,27 @@ RUN . "/opt/ros/${ROS_DISTRO}/setup.sh" \
230230
&& colcon build
231231

232232
# Setup the simulation environment variables
233-
RUN echo "source ${USER_WORKSPACE}/src/blue/.docker/entrypoints/sim.sh" >> /home/$USERNAME/.bashrc
233+
RUN <<EOT cat >> /home/$USERNAME/.bashrc
234+
235+
# Add results of ArduSub build
236+
export PATH=\$HOME/ardupilot/build/sitl/bin:\$PATH
237+
238+
# Optional: add autotest to the PATH, helpful for running sim_vehicle.py
239+
export PATH=\$HOME/ardupilot/Tools/autotest:\$PATH
240+
241+
# Add ardupilot_gazebo plugin
242+
export GZ_SIM_SYSTEM_PLUGIN_PATH=\$HOME/ardupilot_gazebo/build:\$GZ_SIM_SYSTEM_PLUGIN_PATH
243+
244+
# Add ardupilot_gazebo models and worlds
245+
export GZ_SIM_RESOURCE_PATH=\$HOME/ardupilot_gazebo/models:\$HOME/ardupilot_gazebo/worlds:\$GZ_SIM_RESOURCE_PATH
246+
247+
# Add blue models and worlds
248+
BLUE_DESCRIPTION=\$USER_WORKSPACE/src/blue/blue_description
249+
export GZ_SIM_RESOURCE_PATH=\$BLUE_DESCRIPTION/gazebo/models:\$BLUE_DESCRIPTION/gazebo/worlds:\$GZ_SIM_RESOURCE_PATH
250+
251+
# Add blue meshes
252+
export GZ_SIM_RESOURCE_PATH=\$BLUE_DESCRIPTION/meshes:\$GZ_SIM_RESOURCE_PATH
253+
EOT
234254

235255
FROM desktop AS desktop-nvidia
236256

.docker/entrypoints/sim.sh

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)