The goal of this project is to quickly build an accurate (calibration-free) localization system in indoor medium & large-scale scenarios.
In the project, we define the 0th Tag as the base tag for each Tag family. The output pose is related to the base tag. Thus, we use the method of common view to construct a series of April tag pose associations. After that, we will use the available tag in each frame to calculate the global camera pose and finish the localization task.
The whole system consists of two parts: the Tag Generator module & the Localization module.
-
The Tag Generator module will get tag information (Tag Family, Tag Size / Tag print PPI, Extend Dot size/position) from the YAML file and generate a Tag image with Extend dot.
-
The localization module will get information (Tag info, Camera Intrinsic parameter/Distortion coefficient, Tag pre-calibration pose) from the YAML file and do the localization task. Finally, the output should be the camera pose related to the base tag.
- AprilTag
- Yaml-cpp
- Glog
- Ceres
- Opencv4
- Eigen3
sudo apt install -y libyaml-cpp-dev libgoogle-glog-dev libeigen3-dev libceres-dev
sudo apt install -y libopencv-dev git cmake
mkdir 3rdparty && cd 3rdparty
git clone https://github.com/AprilRobotics/apriltag && cd apriltag
cmake -B build -DCMAKE_BUILD_TYPE=Release
sudo cmake --build build --target install
cd ${catkin_ws}/src
git clone https://github.com/sjtuyuxuan/ExtendAprilTagLocal
cd .. && catkin_make
Yaml Definition
Name | Discription | Module |
---|---|---|
TagFamily | The TagFamily used by both localization module and generator | localization & generator |
ImagePath | The raw tag image path | generator |
ImageCount | The raw tag input image path | generator |
GenTags | The tag id used by tag generator | generator |
GenPath | The extend tag output image path | generator |
Tag ID as key | File : The raw tag input image name Size : The size of tag edge (mm) Canvas : The size of canvas (mm) [W, H] Extand_Dot : The position and size of extend dot (mm) [X, Y, R] Pixpermm : PPI for image Extrinsic : Pre-calibrate pose for tag (option) |
localization & generator |
ImageTopic | The input image topic | localization (Ros only) |
ImageSize | The input image size [W, H] | localization |
ImageIntrinsic | Intrinsic parameter of the camera [$f_x$, 0, |
localization |
ImageDistrotion | Distrotion parameter of the camera [$k_1$, |
localization |
T_b_c | deprecate / | / |
PosePublishTopic | The output camera pose topic | localization |
DebugPlot | Choose whether to plot the debug image (close to get better performance) | localization(Pi only) |
rosrun extend_april_local localization
Use rqt to check wether ros camera is working
bag is in [link](bag - Google Drive)
rosrun extend_april_local localization
rosbag play test.bag
rviz
You need to calibrate the camera manually. Ros camera calibration
maybe a good choice.
You need to get
see whether the tf tree work in rviz