MTRN4230 Group Project source code for a Gazebo-simulated pick-and-place robot.
- /config - UR5 Controller Manager Config Files
- /include - C++ header files (mostly for plugins)
- /launch - Launch Files to run the application
- /models - Gazebo Models (.urdf, .sdf, .xacro, etc)
- /msg - Custom Messages for Publishers & Subscribers
- /src - ROS Nodes, plugin scripts, test scripts, utility functions
- /srv - Custom Service request / response definitions
- /web - React-based Web GUI
- /world - Gazebo World Files
There are 2 methods to setup and run the project.
-
Setting Up
1.1. Install docker and docker-compose
1.2. Install NVIDIA Container Toolkit to allow docker containers to use your host GPU
1.3. Install xhost for your system to enable GUIs for docker containers
1.4. Configure Docker Daemon to use GPU (workaround for docker-compose)
-
Run Environment
Run the run.sh
script:
./run.sh
If configured properly, the Gazebo Simulation environment will spawn. You can visit http://localhost:3000 to connect the Web GUI that monitors and controls the Gazebo environment and orders (see linked video for more info).
-
Setting Up
1.1. Install ROS Kinetic (for future steps, I will be assuming
ros-kinetic-ros-base
was installed)1.2. Install Gazebo7 simulator
1.3. Install project ROS dependencies:
sudo apt-get update && apt-get install \ ros-kinetic-gazebo-msgs \ ros-kinetic-gazebo-plugins \ ros-kinetic-gazebo-ros \ ros-kinetic-gazebo-ros-control \ ros-kinetic-image-transport-plugins \ ros-kinetic-controller-manager \ ros-kinetic-eigen-conversions \ ros-kinetic-xacro \ ros-kinetic-rosbridge-server \ ros-kinetic-robot-state-publisher \ ros-kinetic-joint-state-controller \ ros-kinetic-joint-trajectory-controller \
1.4. Install npm (or Yarn) to launch the Web GUI
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - sudo apt-get install -y nodejs
1.5. Download the Github code into ROS Workspace
cd ~/catkin_ws/src && git clone git@github.com:JimmeeX/ur5_t2_4230.git
-
Build Environment
2.1. Enable ROS Commands & Access to Packages (Protip: Add this to ~/.bashrc)
source ~/catkin_ws/devel/setup.bash
2.2. If you are using a virtual environment, disable GPU config for Gazebo (prevent Gazebo from crashing) (Protip: Add this to ~/.bashrc).
export SVGA_VGPU10=0
2.3. Build Environment
cd ~/catkin_ws && catkin_make
2.5. Update npm packages for Web GUI
cd ~/catkin_ws/src/ur5_t2_4230/web npm install
-
Run
3.1. Launch Gazebo Simulation Environment
roslaunch ur5_t2_4230 ur5_world.launch
3.2. Launch Web GUI (accessible via http://localhost:3000)
cd ~/simulation_ws/src/ur5_t2_4230/web/roswebcontroller npm start