TLDR
: This is a set of instructions to help set up necessary ROS2 packages to start detecting Apriltag.
- Ubuntu
20.04
Focal Fossa ( Operating System ) - ROS2
Foxy Fitzroy
( ROS ) - Apriltag
3.2
( Library SDK ) - python3-rosdep ( Dependency Manager )
- Intel Realsense D400 Series Depth Camera ( Physical Camera Hardware )
- Download the necessary ROS2 packages:
cd $HOME
mkdir -p ~/apriltag_ros2_ws/src
cd ~/apriltag_ros2_ws/src
git clone https://github.com/AprilRobotics/apriltag.git # Clone Apriltag library
git clone https://github.com/Adlink-ROS/apriltag_ros.git -b foxy-devel # Clone Apriltag ROS wrapper
- Build the aforementioned packages:
cd ~/apriltag_ros2_ws
rosdep install --from-paths src --ignore-src -r -y # Install any missing packages
colcon build --symlink-install # Build all packages in the workspace
- Download the necessary ROS2 packages and Realsense Library:
# Download Realsense SDK 2.0
sudo apt-key adv --keyserver keys.gnupg.net --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE
# Use intel servers instead of using the now defunct amazon servers that were used to distribute these binaries.
sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main" -u
sudo apt-get install librealsense2-dkms librealsense2-utils librealsense2-dev librealsense2-dbg -y
# Create a ROS2 workspace
cd ~/apriltag_ros2_ws/src
# Download and Set-up ros2_intel_realsense package.
git clone --depth 1 --branch `git ls-remote --tags https://github.com/IntelRealSense/realsense-ros.git | grep -Po "(?<=tags/)3.\d+\.\d+" | sort -V | tail -1` https://github.com/IntelRealSense/realsense-ros.git
- Build the aforementioned packages:
cd ~/apriltag_ros2_ws
colcon build
Run realsense-ros ROS2 package:
cd ~/apriltag_ros2_ws
source install/setup.bash
ros2 launch realsense2_camera rs_launch.py
Run apriltag_ros ROS2 package:
ros2 launch apriltag_ros tag_realsense.launch.py camera_name:=/camera/color image_topic:=image_raw
- Adlink-ROS/apriltag_ros - https://github.com/Adlink-ROS/apriltag_ros#quickstart