Installation - miloboyd/chess-robot GitHub Wiki
This guide explains how to install and run the RS2 ROS2-based chess-playing robot system with a UR3 arm, including dependencies, camera setup, and MoveIt integration.
Start by cloning the RS2 repository into your ROS2 workspace:
cd ~/ros2_ws/src
git clone https://github.com/seanealey/rs2.git
Make sure you are in the src folder of a valid ROS2 workspace.
Dependencies ROS2 and System Packages Install required ROS2 packages and system libraries:
sudo apt update
sudo apt install -y \
ros-humble-rclpy \
ros-humble-std-msgs \
ros-humble-sensor-msgs \
ros-humble-image-transport \
ros-humble-cv-bridge \
python3-opencv \
python3-pip \
python3-tk
Python Libraries Install the required Python packages:
pip install numpy opencv-python chess stockfish
RealSense Camera Setup RS2 uses a RealSense D435 camera for board recognition.
- Install RealSense packages:
sudo apt install ros-humble-realsense2-camera
For detailed setup or troubleshooting: https://github.com/IntelRealSense/realsense-ros
- Test camera stream:
realsense-viewer
- Launch the camera in ROS2:
ros2 launch realsense2_camera rs_launch.py
UR3 + MoveIt Setup RS2 assumes a UR3 robotic arm controlled with MoveIt.
- Install UR and MoveIt dependencies:
sudo apt install -y \
ros-humble-moveit \
ros-humble-moveit-common \
ros-humble-moveit-ros-move-group \
ros-humble-moveit-ros-planning \
ros-humble-moveit-ros-visualization \
ros-humble-moveit-setup-assistant \
ros-humble-joint-state-publisher \
ros-humble-robot-state-publisher \
ros-humble-xacro \
ros-humble-ur-description \
ros-humble-ur-bringup
You may need to clone and build the Universal_Robots_ROS2_Driver package:
cd ~/ros2_ws/src
git clone -b humble https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver.git
git clone -b humble https://github.com/UniversalRobots/Universal_Robots_Description.git
- Connect to UR3: Make sure your UR3 is running the correct URCap, reachable over LAN, and in remote control mode.
Check IP connectivity, then bring up the robot using:
ros2 launch ur_bringup ur_control.launch.py ur_type:=ur3 robot_ip:=<ROBOT_IP> launch_rviz:=true
Replace <ROBOT_IP> with the actual IP address of the UR3 controller.
Build the Workspace After all dependencies are installed:
cd ~/ros2_ws
colcon build
source install/setup.bash
Always source this file in a new terminal session:
source ~/ros2_ws/install/setup.bash