mirror of
https://github.com/EECS-467-W20-RRRobot-Project/RRRobot.git
synced 2025-04-20 21:35:22 +00:00
Warehouse Documentation & Docker
- Add instructions for running warehouse simulation to README - Create new warehouse docker service based on gazebo service - Add new warehouse Dockerfile with commands for installing GEAR
This commit is contained in:
parent
30f39c7fdd
commit
60bc79aea5
40
README.md
40
README.md
@ -8,8 +8,8 @@
|
|||||||
- [Docker Compose Services](#docker-compose-services)
|
- [Docker Compose Services](#docker-compose-services)
|
||||||
- [GUI Support](#gui-support)
|
- [GUI Support](#gui-support)
|
||||||
- [Running Docker Containers](#running-docker-containers)
|
- [Running Docker Containers](#running-docker-containers)
|
||||||
- [Building the simulation environment](#building-the-simulation-environment)
|
- [Warehouse Simulation](#warehouse-simulation)
|
||||||
- [Running the simulation](#running-the-simulation)
|
- [Gazebo Grasping Simulation](#gazebo-grasping-simulation)
|
||||||
|
|
||||||
## Contributors
|
## Contributors
|
||||||
|
|
||||||
@ -100,18 +100,40 @@ Additionally, be sure to update the `IP_ADDRESS` variable in [.env](src/.env) wi
|
|||||||
4. Use Docker Compose to run a service (refer to [docker-compose.yml](src/docker-compose.yml) or [Docker Compose Services](#docker-compose-services))
|
4. Use Docker Compose to run a service (refer to [docker-compose.yml](src/docker-compose.yml) or [Docker Compose Services](#docker-compose-services))
|
||||||
- `docker-compose run --rm <service_name>`
|
- `docker-compose run --rm <service_name>`
|
||||||
|
|
||||||
### Building the simulation environment
|
### Warehouse Simulation
|
||||||
|
|
||||||
|
1. Clone repo
|
||||||
|
- HTTPS: `git clone https://github.com/EECS-467-W20-RRRobot-Project/RRRobot.git`
|
||||||
|
- SSH: `git clone git@github.com:EECS-467-W20-RRRobot-Project/RRRobot.git`
|
||||||
|
2. Go to `RRRobot` folder
|
||||||
|
- `cd /PATH/TO/RRRobot`
|
||||||
|
3. Get submodule(s)
|
||||||
|
- `git submodule init`
|
||||||
|
4. Go to `docker_env` folder
|
||||||
|
- `cd /PATH/TO/RRRobot/docker_env`
|
||||||
|
5. Start gazebo docker container
|
||||||
|
- `docker-compose run --rm warehouse`
|
||||||
|
6. Source ROS Setup
|
||||||
|
- `source /opt/ros/melodic/setup.bash`
|
||||||
|
7. Go to warehouse folder in container
|
||||||
|
- `cd /app/rrrobot_src/warehouse`
|
||||||
|
8. Build package
|
||||||
|
- `catkin_make clean`
|
||||||
|
- `catkin_make`
|
||||||
|
- `catkin_make install`
|
||||||
|
- `source devel/setup.bash`
|
||||||
|
9. Run sample environment
|
||||||
|
- `roslaunch osrf_gear sample_environment.launch`
|
||||||
|
|
||||||
|
### Gazebo Grasping Simulation
|
||||||
|
|
||||||
1. Source ROS Setup
|
1. Source ROS Setup
|
||||||
- `source /opt/ros/melodic/setup.bash`
|
- `source /opt/ros/melodic/setup.bash`
|
||||||
2. Build the drivers for the simulation
|
2. Build the drivers for the simulation
|
||||||
- `cd /app/rrrobot_src/src/simulation_drivers/`
|
- `cd /app/rrrobot_src/src/simulation_drivers/`
|
||||||
- `source build.sh`
|
- `source build.sh`
|
||||||
|
3. Start ros master node
|
||||||
### Running the simulation
|
|
||||||
|
|
||||||
1. Start ros master node
|
|
||||||
- `roscore &`
|
- `roscore &`
|
||||||
2. Run the gazebo simulator - this will bring up gazebo with a robotic arm
|
4. Run the gazebo simulator - this will bring up gazebo with a robotic arm
|
||||||
- `gazebo /app/rrrobot_src/world/rrrobot.world`
|
- `gazebo /app/rrrobot_src/world/rrrobot.world`
|
||||||
3. Run control and perception programs
|
5. Run control and perception programs
|
||||||
|
@ -70,3 +70,19 @@ services:
|
|||||||
hostname: "rrrobot-env"
|
hostname: "rrrobot-env"
|
||||||
networks:
|
networks:
|
||||||
- ros
|
- ros
|
||||||
|
|
||||||
|
# Warehouse Production Service
|
||||||
|
warehouse:
|
||||||
|
# Use Dockerfile in warehouse folder
|
||||||
|
build: ./warehouse
|
||||||
|
# Mount warehouse folder on host to app folder in container
|
||||||
|
volumes:
|
||||||
|
- ../rrrobot_src:/app/rrrobot_src
|
||||||
|
# Set DISPLAY variable and network mode for GUIs
|
||||||
|
environment:
|
||||||
|
- DISPLAY=${IP_ADDRESS}:0.0
|
||||||
|
# Set working directory in container to app folder
|
||||||
|
# working_dir: /home/rrrobot
|
||||||
|
hostname: "rrrobot-env"
|
||||||
|
networks:
|
||||||
|
- ros
|
||||||
|
49
docker_env/warehouse/Dockerfile
Normal file
49
docker_env/warehouse/Dockerfile
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
# Warehouse Dockerfile
|
||||||
|
|
||||||
|
# Use official image for Gazebo 9.x
|
||||||
|
FROM gazebo:gzserver9
|
||||||
|
|
||||||
|
RUN apt-get update
|
||||||
|
# Install packages required for developing with gazebo
|
||||||
|
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
|
||||||
|
# Install packages required for developing with ROS
|
||||||
|
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
|
||||||
|
|
||||||
|
# Initialize the environment in .bashrc
|
||||||
|
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
|
||||||
|
|
||||||
|
USER rrrobot
|
||||||
|
|
||||||
|
RUN sudo apt-get update && \
|
||||||
|
sudo apt-get install -y \
|
||||||
|
wget
|
||||||
|
|
||||||
|
RUN sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable bionic main" > /etc/apt/sources.list.d/gazebo-stable.list' && \
|
||||||
|
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install -y \
|
||||||
|
ariac3
|
||||||
|
|
||||||
|
CMD ["/bin/bash"]
|
Loading…
x
Reference in New Issue
Block a user