Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gazebo not downloading models #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -36,10 +36,12 @@ ENV NVIDIA_VISIBLE_DEVICES \
${NVIDIA_VISIBLE_DEVICES:-all}
ENV NVIDIA_DRIVER_CAPABILITIES \
${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics


#USER original_user
# install bootstrap tools
RUN apt-get update && apt-get install --no-install-recommends -y \
ros-kinetic-gazebo-* \
&& rm -rf /var/lib/apt/lists/*

# HACK to fix bug in gazebo when using database url
RUN sed -i 's#export GAZEBO_MODEL_DATABASE_URI=http://gazebosim.org/models#export GAZEBO_MODEL_DATABASE_URI=http://models.gazebosim.org/#' /usr/share/gazebo/setup.sh
RUN echo 'source /usr/share/gazebo/setup.sh' >> /root/.bashrc

2 changes: 2 additions & 0 deletions launch_docker.sh
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
xhost +local:root

nvidia-docker run -it --rm \
--network host \
--env="DISPLAY" \
--env="QT_X11_NO_MITSHM=1" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
@@ -12,6 +13,7 @@ nvidia-docker run -it --rm \
--volume="/etc/shadow:/etc/shadow:ro" \
--volume="/etc/sudoers.d:/etc/sudoers.d:ro" \
--volume="$HOME/host_docker:/home/user/host_docker" \
--mount type=bind,src=$(pwd)/models,dst=/root/.gazebo/models \
-e LOCAL_USER_ID=`id -u $USER` \
-e LOCAL_GROUP_ID=`id -g $USER` \
-e LOCAL_GROUP_NAME=`id -gn $USER` \
2 changes: 2 additions & 0 deletions models/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore