Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
documentation:vision:aruco_marker_detection [2023/01/22 22:20] – pontusr | documentation:vision:aruco_marker_detection [2023/01/30 08:29] (current) – marcusn | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== ArUco marker detection ====== | ====== ArUco marker detection ====== | ||
- | Aruco markers are squares with bit patterns which can easily be detected and their orientation can always be determined due to their non-symmetric pattern. These markers can be generated [[https:// | + | //Aruco// markers are squares with bit patterns which can easily be detected and their orientation can always be determined due to their non-symmetric pattern. These markers can be generated [[https:// |
==== Detection with OpenCV ==== | ==== Detection with OpenCV ==== | ||
- | The repository in the following [[https:// | + | The repository in the following [[https:// |
^ Argument Name ^ Description | ^ Argument Name ^ Description | ||
Line 12: | Line 12: | ||
| -pause | | -pause | ||
- | The aruco marker ids and their size should be specified in a text file of the following form: | + | The //aruco// marker ids and their size should be specified in a text file of the following form: |
<cli> | <cli> | ||
Line 21: | Line 21: | ||
</ | </ | ||
- | The first line is ignored so it should only contain the header "id: size, length" | + | The first line is ignored so it should only contain the header "id: size, length" |
The code expects a realsense camera to be connected to the computer. If the pipeline does not receive a frame from the camera within 5 seconds the following error will be thrown | The code expects a realsense camera to be connected to the computer. If the pipeline does not receive a frame from the camera within 5 seconds the following error will be thrown | ||
Line 27: | Line 27: | ||
< | < | ||
- | In which case one should check that the camera works and sends frames to the compute | + | In which case one should check that the camera works and sends frames to the computer |
It is very important to check if the camera is recognized as a USB2 device or USB3 device since USB2 supports a smaller sets of resolution than USB3. If a resolution that is not possible is requested (for example if the camera is detected as a USB2 device and the expected resolution is too big) the pipeline throws the following error: | It is very important to check if the camera is recognized as a USB2 device or USB3 device since USB2 supports a smaller sets of resolution than USB3. If a resolution that is not possible is requested (for example if the camera is detected as a USB2 device and the expected resolution is too big) the pipeline throws the following error: | ||
Line 35: | Line 35: | ||
In which case one should check what resolution the frames from the camera have with realsense-viewer to verify that the expected resolution is correct. | In which case one should check what resolution the frames from the camera have with realsense-viewer to verify that the expected resolution is correct. | ||
- | First the aruco markers of some size are detected in the current frame with [[https:// | + | First the //aruco// markers of some size are detected in the current frame with [[https:// |
+ | |||
+ | In order to make use of the translation of the //aruco// markers and the angle-axis one could use //openCV// [[https:// | ||
+ | to get a [[https:// | ||
+ | |||
+ | This script only draws the determined pose of each detected //aruco// marker in each frame and displays it but it can easily be modified to instead return the pose of each //aruco// marker and their associated id. | ||
==== Detection with SkiROS ==== | ==== Detection with SkiROS ==== | ||
+ | To detect //aruco// makers with a skill and implement a skill in [[https:// | ||
+ | |||
+ | There are a couple of steps to create a skill in **SkiROS**. | ||
+ | - [[https:// | ||
+ | - Create a // | ||
+ | - addParam needed for the skill | ||
+ | - Create a // | ||
+ | - Handle the different situation like, [onPreempt, onInit, onStart, execute]. | ||
+ | - Create a // | ||
+ | - [[https:// | ||
+ | - Add skill to simulation in e.g. [[https:// | ||
+ | - Add skill code to into one of the skill repositories: | ||
+ | - [[https:// | ||
+ | - [[https:// | ||
+ | - Add possible new ontologies to the [[https:// | ||
+ | |||