diff --git a/docker_env/docker-compose.yml b/docker_env/docker-compose.yml index 0d620fe..dfee363 100644 --- a/docker_env/docker-compose.yml +++ b/docker_env/docker-compose.yml @@ -78,7 +78,6 @@ services: # Mount gear folder on host to app folder in container volumes: - ../src/rrrobot_ws:/app/rrrobot_ws - - ../src/ariac_ws:/app/ariac_ws # Set DISPLAY variable and network mode for GUIs environment: - DISPLAY=${IP_ADDRESS}:0.0 diff --git a/docs/home.md b/docs/home.md index b831a4d..4b676e3 100644 --- a/docs/home.md +++ b/docs/home.md @@ -8,8 +8,8 @@ - [Docker Compose Services](#docker-compose-services) - [GUI Support](#gui-support) - [Running Docker Containers](#running-docker-containers) - - [Gazebo Grasping Simulation](#gazebo-grasping-simulation) - - [GEAR Simulation](#gear-simulation) + - [Gazebo Grasping Simulation (Testing)](#gazebo-grasping-simulation-testing) + - [GEAR Simulation (Final)](#gear-simulation-final) - [Tips & Tricks](#tips--tricks) ## Contributors @@ -55,15 +55,15 @@ ros-turtlesim is a container that tests whether GUI support is working. This wil #### ros -ros is the production container for all ROS nodes we create. This is meant to run our final code and interface with the gazebo container for simulation. +ros is a container based on the ROS Melodic docker image. This is provided for convenience, but not used for running the final simulation. #### gazebo -Similarly to ros, gazebo is the production container for gazebo. This is meant to run our final simulation. +gazebo is a container based on the Gazebo Server 9 docker image. This is provided for convenience, but not used for running the final simulation. #### gear -The GEAR container includes the Gazebo Environment for Agile Robotics from the Agile Robotics for Industrial Automation Competition 2019. +The GEAR container includes the Gazebo Environment for Agile Robotics from the Agile Robotics for Industrial Automation Competition 2019. This is used for running the final simulation. ### GUI Support @@ -106,7 +106,7 @@ 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)) - `docker-compose run --rm ` -### Gazebo Grasping Simulation +### Gazebo Grasping Simulation (Testing) 1. Source ROS Setup - `source /opt/ros/melodic/setup.bash` @@ -119,7 +119,7 @@ Additionally, be sure to update the `IP_ADDRESS` variable in [.env](src/.env) wi - `gazebo /app/rrrobot_src/world/rrrobot.world` 5. Run control and perception programs -### GEAR Simulation +### GEAR Simulation (Final) Instructions for working in the GEAR Simulation can be found on the [GEAR](gear.md) page. diff --git a/src/rrrobot_ws/run_all.sh b/src/rrrobot_ws/run_all.sh index d557fff..2e68849 100755 --- a/src/rrrobot_ws/run_all.sh +++ b/src/rrrobot_ws/run_all.sh @@ -1,11 +1,60 @@ -#/app/rrrobot_ws/src/rrrobot/scripts/rrrobot_run_no_build.sh & +#!/bin/bash + +# Build Workspace +cd /app/rrrobot_ws +catkin_make clean +catkin_make +source devel/setup.bash +export GAZEBO_RESOURCE_PATH=$(pwd)/world:$GAZEBO_RESOURCE_PATH + +# ARIAC Environment +cd /app/rrrobot_ws/src/rrrobot/scripts +./rrrobot_run_no_build.sh & +sleep 25 +rosparam set /use_sim_time true + +# CV Model cd /app/rrrobot_ws/src/rrrobot/src python3 cv_model.py & -cd /app/rrrobot_ws/devel/lib/rrrobot -./rrrobot_node & -./depth_camera_node >> /dev/null & -./object_spawner_node & -./arm_controller_node & -rostopic echo /arm_controller/destination & -rostopic echo /desired_grasp_pose & -rostopic echo /cv_model & +sleep 10 + +# Arm Controller Node +cd /app/rrrobot_ws +rosrun rrrobot arm_controller_node & +sleep 3 + +# Depth Camera Node +rosrun rrrobot depth_camera_node & +sleep 3 + +# RRRobot Node +rosrun rrrobot rrrobot_node & +sleep 3 + +# Object Spawner +rosrun rrrobot object_spawner_node & +sleep 3 + +# Start Competition +source /opt/ros/melodic/setup.bash +rosservice call /ariac/start_competition +sleep 1 +rosservice call /ariac/conveyor/control "power: 100" +sleep 1 +rosservice call /ariac/arm1/gripper/control "enable: false" +sleep 1 +rosservice call /ariac/arm1/gripper/control "enable: true" +sleep 1 +rosservice call /ariac/arm1/gripper/control "enable: false" + +#/app/rrrobot_ws/src/rrrobot/scripts/rrrobot_run_no_build.sh & +# cd /app/rrrobot_ws/src/rrrobot/src +# python3 cv_model.py & +# cd /app/rrrobot_ws/devel/lib/rrrobot +# ./rrrobot_node & +# ./depth_camera_node >> /dev/null & +# ./object_spawner_node & +# ./arm_controller_node & +# rostopic echo /arm_controller/destination & +# rostopic echo /desired_grasp_pose & +# rostopic echo /cv_model &