The objective of this project is to perform cooperative 3D printing with industrial robotic arms with ROS. This is done using the Kinova Gen 3 6-DOF robotic arm, and the Universal Robot’s UR10. The user has the capability to upload an STL (or OBJ or PLY) file and the resulting simulation will have both brands of robotic arm printing half of the object in the same RViz simulation environment. The arms communicate through the communication hub and the G-Code commands are processed through each arm’s respective firmware.
As is, this project can only be run in Ubuntu 20.04. No other versions of Ubuntu or distributions of Linux have been tested. All other system dependencies are in the Installation section.
The Installation instructions can also be found in
/docs/install.md
. The install script and instructions will
set up a specific directory structure that this project refers to and
uses in the documentation and code.
install.sh
from the scripts folder
On GitLab, click on the src
folder
Click on the scripts
folder
Click on the install.sh
file
Click download
The install.sh
file should now be in your downloads
folder. Depending on your system and settings, the download location may
be different. In the step 2 example, we assume the
install.sh
script has been saved to the
Downloads
folder
install.sh
script
is downloadedExample: (In this example, the install.sh
file has been
downloaded to the Downloads
folder)
# this is an example of navigating to the location of the install.sh script
cd /Downloads
sudo chmod +x install.sh
Follow any directions in the terminal such as entering your root user password when prompted
./install.sh
Following these instructions below, in order, will result in the same
install as using the install.sh
script
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt install curl
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo apt update
sudo apt install ros-noetic-desktop-full
source /opt/ros/noetic/setup.bash
sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential
sudo apt install python3-rosdep
sudo rosdep init
rosdep update
sudo apt install ros-noetic-moveit
https://github.com/Kinovarobotics/ros_kortex
source /opt/ros/noetic/setup.bash
sudo apt install python3 python3-pip
sudo python3 -m pip install conan
conan config set general.revisions_enabled=1
conan profile new default --detect > /dev/null
conan profile update settings.compiler.libcxx=libstdc++11 default
mkdir -p catkin_workspace/src
cd catkin_workspace/src
git clone -b noetic-devel https://github.com/Kinovarobotics/ros_kortex.git
git clone https://gitlab.com/capstone-team16/ambots.git
cd ../
rosdep install --from-paths src --ignore-src -y --rosdistro noetic
catkin_make
source devel/setup.bash
sudo apt-get install ros-noetic-universal-robots
git clone https://github.com/PyMesh/PyMesh.git
cd PyMesh
git submodule update --init
sudo apt-get purge python
sudo apt-get install \
\
libeigen3-dev \
libgmp-dev \
libgmpxx4ldbl \
libmpfr-dev \
libboost-dev \
libboost-thread-dev \
libtbb-dev \
python3-dev \
python3-setuptools \
python3-numpy \
python3-scipy \
python3-nose \
python3-pip cmake
All the test cases should pass
python3 ./setup.py build
python3 ./setup.py install --user
python3 -c "import pymesh; pymesh.test()"
sudo snap install prusa-slicer
cd ../
cd ./src/ambots/src/catkinWorkspace/src/ambots/frontEnd/
sudo chmod +x slicer.sh
cd ../../../../
cd ./scripts/
sudo chmod +x launchCommunicationHub.sh
sudo chmod +x launchFrontEnd.sh
sudo chmod +x launchKinovaFirmware.sh
sudo chmod +x launchUR10Firmware.sh
sudo chmod +x launchRviz.sh
Make sure you have installed the code using the install script or followed the instructions in the install document.
You must launch the software in this order: 1. Rviz 2. The firmware for both the arms 3. The communication hub 4. The front end
For every piece of software you want to launch using our launch
scripts, you must navigate to the scripts
folder in the
cloned ambots
repository that is located in the
catkin_workspace
folder.
Example:
# this is an example of navigating to the location of the "scripts" folder from your home directory
cd ~/catkin_workspace/src/ambots/src/scripts/
Run the script:
./launchRviz.sh
Run the script:
./launchKinovaFirmware.sh
Run the script:
./launchUR10Firmware.sh
Run the script:
./launchCommunicationHub.sh
Run the script:
./launchFrontEnd.sh
You can launch the pieces of software like any other ROS software. You do not have to use our scripts to launch them.
source /opt/ros/noetic/setup.bash
cd catkin_workspace
source devel/setup.bash
roslaunch ambots bothArmsRvizLaunch.launch
source /opt/ros/noetic/setup.bash
cd catkin_workspace
source devel/setup.bash
roslaunch ambots kinovaFirmware.launch
source /opt/ros/noetic/setup.bash
cd catkin_workspace
source devel/setup.bash
roslaunch ambots urFirmware.launch
source /opt/ros/noetic/setup.bash
cd catkin_workspace
source devel/setup.bash
roslaunch ambots communicationHub.launch
source /opt/ros/noetic/setup.bash
cd catkin_workspace
source devel/setup.bash
roslaunch ambots frontEnd.launch
The Front End will display a list of commands that one can execute:
Type the number of the command. The number of a command is shown on the left side of the command in the terminal. Press the enter key to execute the command you have typed.
When a command has finished executing, the list of commands will be displayed again. You can then execute another command.
If number 1 is selected, you will not be able to choose the file that is printed. Instead, a demo object, which is a cube from the “cube.stl” file, is used. However, if you want to specify a specific STL file to slice and print, one has to execute commands number 2, 3, and 4. The “cube.stl” file is automatically cut into two halves. These halves are then sliced and saved into G-Code files using a slicer script. These G-Code files are sent to the arms. A start command is then sent to the Kinova arm to start printing.
When this command is executed, you will be prompted to type the name of the STL file that will be sliced. Only the files in the “input” folder can be sliced. If you provide a file path or a file name of a file that is not in the “input” folder, the front end will throw an error and terminate. Once you have typed the file name of the file you want to slice, press the enter key. This will start the slicing process. The output will be saved to the “output” folder.
The front end also has the capability to accept other CAD file formats such as OBJ and PLY. To specify your own file to be sliced, add your file to the “input” folder. Then execute command 2 and type the name of the file you added into the folder.
When command 3 is executed, the two G-Code files are sent to the communication hub. Execute this command to send the generated G-Code to the arms when you have sliced an STL file of your choosing.
When this command is executed, the front end will send the A1 command to tell the Kinova arm to start printing. Execute this command to start printing when you have sliced and sent the G-Code to the arms.
This command will exit out of the front end. The other software, such as RViz, both of the firmware, and the communication hub, will continue to run.
This project is available under the MIT license. See the LICENSE folder for more information.