compas-dev / compas-dev/compas_fab
Evaluate how to integrate marker detection into COMPAS FAB
- Dominant language
- Python
- Stars
- 137
- Forks
- 47
- PR merge metrics
- No merged PRs in 30d
Description
NOTE: This might involve kicking off a separate package.
As a user of industrial robots, I would like to use COMPAS FAB in combination with OpenCV (or similar tools) to get pose estimation out of (ARuCo) markers so that I can calibrate and adjust positioning of the robot's TCP.
The basic code for detecting markers on a video stream is very simple. The first step (and the full scope of this issue) would be to evaluate more in detail how to integrate this into compas fab for long-term usage/support:
```python
import numpy as np
import cv2
import cv2.aruco as aruco
cap = cv2.VideoCapture(0)
while(True):
ret, frame = cap.read()
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
aruco_dict = aruco.Dictionary_get(aruco.DICT_6X6_1000)
arucoParameters = aruco.DetectorParameters_create()
corners, ids, rejectedImgPoints = aruco.detectMarkers(
gray, aruco_dict, parameters=arucoParameters)
frame = aruco.drawDetectedMarkers(frame, corners)
cv2.imshow('Display', frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
```
Contributor guide
Assessment
This issue has not been assessed yet.