Splits project into a docker environment folder and source code folder (for development). This change is mostly just renaming and moving files, but there are some changes to the gazebo Dockerfile to include all dependencies required for final development.

This commit is contained in:
Derek Witcpalek
2020-04-03 16:50:47 -04:00
parent 13d2ea9883
commit bf55093420
28 changed files with 87 additions and 33 deletions

26
.gitignore vendored Normal file
View File

@@ -0,0 +1,26 @@
# Don't track the content of these folders #
############################################
rrrobot_src/lib/
rrrobot_src/src/simulation_drivers/build
rrrobot_src/src/simulation_drivers/devel
rrrobot_src/src/simulation_drivers/install
.*
!.gitignore
# Compiled source #
###################
*.o
*.so
# Packages #
############
*.tar
*.gz
*.zip
# Other #
#########
*.backup
*.old
*.custom
*.run

View File

@@ -0,0 +1,43 @@
# Gazebo Dockerfile
# Use official image for Gazebo 9.x
FROM gazebo:gzserver9
# COPY $PWD/gazebo_models /root/.gazebo/models
RUN apt-get update
RUN apt-get install -y libgazebo9-dev
RUN sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
RUN apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
RUN apt-get install -y curl
RUN curl -sSL 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xC1CF6E31E6BADE8868B172B4F42ED6FBAB17C654' | apt-key add -
RUN apt-get update
RUN apt-get install -y ros-melodic-desktop-full
RUN echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
RUN apt install -y python-rosdep
RUN rosdep init
RUN rosdep update
# user id 1000 should be the same as the host user, so that you can access files
# from inside the docker container and also on the host
RUN useradd -u 1000 rrrobot
# set to no password
RUN passwd --delete rrrobot
# add to sudo users
RUN usermod -aG sudo rrrobot
# set the entry point
WORKDIR /home/rrrobot
RUN chown -R rrrobot:rrrobot /home/rrrobot
#COPY $RRROBOT_HOME/src /home/rrrobot/src
#COPY /home/dwitcpa/eecs467/rrrobot/src /home/rrrobot
RUN echo "source /opt/ros/melodic/setup.bash" >> /home/rrrobot/.bashrc
RUN echo "source /usr/share/gazebo/setup.sh" >> /home/rrrobot/.bashrc
RUN echo "export GAZEBO_MODEL_PATH=/home/rrrobot/rrrobot_src/src/gazebo_models:\$GAZEBO_MODEL_PATH" >> /home/rrrobot/.bashrc
RUN echo "export GAZEBO_PLUGIN_PATH=/home/rrrobot/rrrobot_src/lib:\$GAZEBO_PLUGIN_PATH" >> /home/rrrobot/.bashrc
#RUN chown -R rrrobot:rrrobot /home/rrrobot/.gazebo
USER rrrobot
CMD ["/bin/bash"]

View File

@@ -0,0 +1 @@
../../run_rrrobot_image.sh

View File

@@ -22,7 +22,7 @@
<pose frame=''>0 0 0 0 -0 0</pose> <pose frame=''>0 0 0 0 -0 0</pose>
<geometry> <geometry>
<mesh> <mesh>
<uri>/root/.gazebo/models/fanuc_robotic_arm/meshes/base_link.STL</uri> <uri>/home/rrrobot/rrrobot_src/src/gazebo_models/fanuc_robotic_arm/meshes/base_link.STL</uri>
<scale>1 1 1</scale> <scale>1 1 1</scale>
</mesh> </mesh>
</geometry> </geometry>
@@ -49,7 +49,7 @@
<pose frame=''>0 0 0 0 -0 0</pose> <pose frame=''>0 0 0 0 -0 0</pose>
<geometry> <geometry>
<mesh> <mesh>
<uri>/root/.gazebo/models/fanuc_robotic_arm/meshes/base_link.STL</uri> <uri>/home/rrrobot/rrrobot_src/src/gazebo_models/fanuc_robotic_arm/meshes/base_link.STL</uri>
<scale>1 1 1</scale> <scale>1 1 1</scale>
</mesh> </mesh>
</geometry> </geometry>
@@ -121,7 +121,7 @@
<pose frame=''>0 0 0 0 -0 0</pose> <pose frame=''>0 0 0 0 -0 0</pose>
<geometry> <geometry>
<mesh> <mesh>
<uri>/root/.gazebo/models/fanuc_robotic_arm/meshes/arm_link_1.STL</uri> <uri>/home/rrrobot/rrrobot_src/src/gazebo_models/fanuc_robotic_arm/meshes/arm_link_1.STL</uri>
<scale>1 1 1</scale> <scale>1 1 1</scale>
</mesh> </mesh>
</geometry> </geometry>
@@ -148,7 +148,7 @@
<pose frame=''>0 0 0 0 -0 0</pose> <pose frame=''>0 0 0 0 -0 0</pose>
<geometry> <geometry>
<mesh> <mesh>
<uri>/root/.gazebo/models/fanuc_robotic_arm/meshes/arm_link_1.STL</uri> <uri>/home/rrrobot/rrrobot_src/src/gazebo_models/fanuc_robotic_arm/meshes/arm_link_1.STL</uri>
<scale>1 1 1</scale> <scale>1 1 1</scale>
</mesh> </mesh>
</geometry> </geometry>
@@ -220,7 +220,7 @@
<pose frame=''>0 0 0 0 -0 0</pose> <pose frame=''>0 0 0 0 -0 0</pose>
<geometry> <geometry>
<mesh> <mesh>
<uri>/root/.gazebo/models/fanuc_robotic_arm/meshes/arm_link_3.STL</uri> <uri>/home/rrrobot/rrrobot_src/src/gazebo_models/fanuc_robotic_arm/meshes/arm_link_3.STL</uri>
<scale>1 1 1</scale> <scale>1 1 1</scale>
</mesh> </mesh>
</geometry> </geometry>
@@ -247,7 +247,7 @@
<pose frame=''>0 0 0 0 -0 0</pose> <pose frame=''>0 0 0 0 -0 0</pose>
<geometry> <geometry>
<mesh> <mesh>
<uri>/root/.gazebo/models/fanuc_robotic_arm/meshes/arm_link_3.STL</uri> <uri>/home/rrrobot/rrrobot_src/src/gazebo_models/fanuc_robotic_arm/meshes/arm_link_3.STL</uri>
<scale>1 1 1</scale> <scale>1 1 1</scale>
</mesh> </mesh>
</geometry> </geometry>
@@ -319,7 +319,7 @@
<pose frame=''>0 0 0 0 -0 0</pose> <pose frame=''>0 0 0 0 -0 0</pose>
<geometry> <geometry>
<mesh> <mesh>
<uri>/root/.gazebo/models/fanuc_robotic_arm/meshes/arm_link_2.STL</uri> <uri>/home/rrrobot/rrrobot_src/src/gazebo_models/fanuc_robotic_arm/meshes/arm_link_2.STL</uri>
<scale>1 1 1</scale> <scale>1 1 1</scale>
</mesh> </mesh>
</geometry> </geometry>
@@ -346,7 +346,7 @@
<pose frame=''>0 0 0 0 -0 0</pose> <pose frame=''>0 0 0 0 -0 0</pose>
<geometry> <geometry>
<mesh> <mesh>
<uri>/root/.gazebo/models/fanuc_robotic_arm/meshes/arm_link_2.STL</uri> <uri>/home/rrrobot/rrrobot_src/src/gazebo_models/fanuc_robotic_arm/meshes/arm_link_2.STL</uri>
<scale>1 1 1</scale> <scale>1 1 1</scale>
</mesh> </mesh>
</geometry> </geometry>
@@ -418,7 +418,7 @@
<pose frame=''>0 0 0 0 -0 0</pose> <pose frame=''>0 0 0 0 -0 0</pose>
<geometry> <geometry>
<mesh> <mesh>
<uri>/root/.gazebo/models/fanuc_robotic_arm/meshes/arm_link_4.STL</uri> <uri>/home/rrrobot/rrrobot_src/src/gazebo_models/fanuc_robotic_arm/meshes/arm_link_4.STL</uri>
<scale>1 1 1</scale> <scale>1 1 1</scale>
</mesh> </mesh>
</geometry> </geometry>
@@ -445,7 +445,7 @@
<pose frame=''>0 0 0 0 -0 0</pose> <pose frame=''>0 0 0 0 -0 0</pose>
<geometry> <geometry>
<mesh> <mesh>
<uri>/root/.gazebo/models/fanuc_robotic_arm/meshes/arm_link_4.STL</uri> <uri>/home/rrrobot/rrrobot_src/src/gazebo_models/fanuc_robotic_arm/meshes/arm_link_4.STL</uri>
<scale>1 1 1</scale> <scale>1 1 1</scale>
</mesh> </mesh>
</geometry> </geometry>
@@ -517,7 +517,7 @@
<pose frame=''>0 0 0 0 -0 0</pose> <pose frame=''>0 0 0 0 -0 0</pose>
<geometry> <geometry>
<mesh> <mesh>
<uri>/root/.gazebo/models/fanuc_robotic_arm/meshes/arm_link_5.STL</uri> <uri>/home/rrrobot/rrrobot_src/src/gazebo_models/fanuc_robotic_arm/meshes/arm_link_5.STL</uri>
<scale>1 1 1</scale> <scale>1 1 1</scale>
</mesh> </mesh>
</geometry> </geometry>
@@ -544,7 +544,7 @@
<pose frame=''>0 0 0 0 -0 0</pose> <pose frame=''>0 0 0 0 -0 0</pose>
<geometry> <geometry>
<mesh> <mesh>
<uri>/root/.gazebo/models/fanuc_robotic_arm/meshes/arm_link_5.STL</uri> <uri>/home/rrrobot/rrrobot_src/src/gazebo_models/fanuc_robotic_arm/meshes/arm_link_5.STL</uri>
<scale>1 1 1</scale> <scale>1 1 1</scale>
</mesh> </mesh>
</geometry> </geometry>
@@ -616,7 +616,7 @@
<pose frame=''>0 0 0 0 -0 0</pose> <pose frame=''>0 0 0 0 -0 0</pose>
<geometry> <geometry>
<mesh> <mesh>
<uri>/root/.gazebo/models/fanuc_robotic_arm/meshes/arm_link_6.STL</uri> <uri>/home/rrrobot/rrrobot_src/src/gazebo_models/fanuc_robotic_arm/meshes/arm_link_6.STL</uri>
<scale>1 1 1</scale> <scale>1 1 1</scale>
</mesh> </mesh>
</geometry> </geometry>
@@ -643,7 +643,7 @@
<pose frame=''>0 0 0 0 -0 0</pose> <pose frame=''>0 0 0 0 -0 0</pose>
<geometry> <geometry>
<mesh> <mesh>
<uri>/root/.gazebo/models/fanuc_robotic_arm/meshes/arm_link_6.STL</uri> <uri>/home/rrrobot/rrrobot_src/src/gazebo_models/fanuc_robotic_arm/meshes/arm_link_6.STL</uri>
<scale>1 1 1</scale> <scale>1 1 1</scale>
</mesh> </mesh>
</geometry> </geometry>
@@ -898,5 +898,7 @@
</joint> </joint>
<static>0</static> <static>0</static>
<allow_auto_disable>0</allow_auto_disable> <allow_auto_disable>0</allow_auto_disable>
<plugin name="joint_angles" filename="libarm_angles.so"/>
</model> </model>
</sdf> </sdf>

View File

@@ -1,5 +1,5 @@
#docker run -i -h rrrobot-env -t eecs467:rrrobot bash #docker run -i -h rrrobot-env -t eecs467:rrrobot bash
xhost +local:docker #rrrobot-env xhost +local:docker #rrrobot-env
docker run -it --rm --device=/dev/input/event4 --device=/dev/dri:/dev/dri -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v$PWD/gazebo_models:/root/.gazebo/models -h rrrobot-env eecs467:rrrobot docker run -it --rm --device=/dev/input/event4 --device=/dev/dri:/dev/dri -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v $PWD/rrrobot_src:/home/rrrobot/rrrobot_src -h rrrobot-env eecs467:rrrobot
xhost -local:docker #rrrobot-env xhost -local:docker #rrrobot-env

View File

@@ -1,3 +0,0 @@
# .env for docker-compose
IP_ADDRESS=192.168.1.14

View File

@@ -1,8 +0,0 @@
# Gazebo Dockerfile
# Use official image for Gazebo 9.x
FROM gazebo:gzserver9
COPY $PWD/gazebo_models /root/.gazebo/models
CMD ["/bin/bash"]

View File

@@ -1,7 +0,0 @@
#docker run -i -h rrrobot-env -t eecs467:rrrobot bash
#xhost +local:docker
#docker run -it --privileged --security-opt seccomp=unconfined -v $SSH_AUTH_SOCK:/ssh-agent --env SSH_AUTH_SOCK=/ssh-agent --device=/dev/dri:/dev/dri -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --env QT_X11_NO_MITSHM=1 -h rrrobot-env eecs467:rrrobot
#xhost -local:docker
../run_rrrobot_image.sh