This project provides a ROS (Robot Operating System) package designed for controlling a Universal Robotics robotic arm.
- Operating System: Ubuntu 22.04 LTS (Recommended)
- ROS 2 Distribution: Humble
- Docker: Installed and configured for running ROS 2 applications
- NVIDIA Drivers: Ensure you have the latest drivers installed if using GPU acceleration.
Note
If you are using Docker, installing ROS 2 separately is not required.
Important
ROS 2 requires the universe repository, which is only available on Ubuntu or Ubuntu derivatives of Linux. If you are using Arch or other non-Ubuntu distributions, you must use Docker.
If you haven't already installed Ubuntu, follow these steps:
- Download the Ubuntu 22.04 LTS ISO from the official website.
- Create a bootable USB stick using tools like Rufus (for Windows) or Startup Disk Creator (for Ubuntu).
- Boot from the USB stick and follow the on-screen instructions to install Ubuntu.
Important
Cross Check these installation commands from the official ROS2 installation guide
Follow the official ROS 2 installation guide for Ubuntu:
-
Set up your sources:
sudo apt update && sudo apt install curl -y sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add - sudo sh -c 'echo "deb http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list'
-
Install ROS 2 packages:
sudo apt update sudo apt install ros-humble-desktop
-
Source the ROS 2 setup script:
source /opt/ros/humble/setup.bash
-
Install dependencies:
sudo apt install python3-argcomplete python3-colcon-common-extensions
Important
Cross Check these installation commands from the official Docker installation guide
Docker is required to run the ROS 2 application in a containerized environment. Follow the official Docker installation guide:
-
Update your package index:
sudo apt-get update
-
Install required packages:
sudo apt-get install \ ca-certificates \ curl \ gnupg \ lsb-release
-
Add Docker’s official GPG key:
sudo mkdir -p /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gp
-
Set up the Docker repository:
echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
-
Install Docker Engine:
sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
-
Verify Docker installation:
sudo docker run hello-world
Important
Cross Check these installation commands from the official NVIDIA Docker installation guide
If you're using GPU acceleration, you'll need to set up NVIDIA Docker. Follow the official Nvidia Container Toolkit installation guide:
-
Install NVIDIA container toolkit:
sudo apt-get install -y nvidia-container-toolkit sudo systemctl restart docker
-
Test NVIDIA Docker setup:
sudo docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi
Clone this repository to your local machine:
https://github.com/Robotics-Society-PEC/Robotic-Arm.git
To run the container there is a convenient python script:
Note
Running the container first time will start building the image, this will take several minutes.
-
Starting the Container
./launch start
-
Enter the Container
./launch exec
I Like your enthusiasm, Best of Luck for your future endeavors!
To start simulating the robot in Gazebo run the following command:
ros2 launch ur_gz_bringup sil.launch.py model:=<MODEL OF THE ROBOT>
Important
Enable Sim Time for Moveit Move Group, after starting the simulation.
To Enable Sim Time for Moveit Move Group:
ros2 param set /move_group use_sim_time true
This project is licensed under the GPL-3.0-only License. See the LICENSE file for more details.
This project is developed based on resources and support from Universal Robotics. We extend our gratitude to them for providing the robotic arm and necessary documentation for the development of this ROS package.