GithubHelp home page GithubHelp logo

ryul1206 / arucorospy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jurehudoklin/arucorospy

0.0 1.0 1.0 92 KB

Detect ArUco Marker and visualize its pose

License: MIT License

Python 87.42% CMake 12.58%

arucorospy's Introduction

ArUcoROSpy

Detect a set of aruco markers to estimate a pose of an object. Transforms between markers can be found or provided in a form of a .npz file. The .npz file should contain a dictionary with a transforms (4x4 matrix) of each marker to the main marker

##Detecting 36 ArUco Markers at once 36arucomarkers

Architecture

MarkerDetectionSchematic

Prerequisites (Installations and Dependencies)

[opencv-contrib-python] cv2 does not have an attribute "aruco"

Python 3 cv2 Has No Attribute Aruco

cv_bridge

Dependencies info

Running the Code

There are 2 ways this package may be used. Either as a service that calculates the position of the object only when asked or a node that continuously updates the position of the object in the tf tree.

Before running any of the versions above the transformation matrix between markers has to be "calibrated".

Run the camera code in ROS (If using realsense or kinect)

  • Intel Realsense ROS

    Run the built-in Intel Realsense program to see the camera's current state

    realsense-viewer

    Run the launch files

    roslaunch realsense2_camera rs_camera.launch
  • Azure Kinect ROS

    Run the built-in Azure Kinect program to see the camera's current state

    k4aviewer

    Run the launch files

    roslaunch azure_kinect_ros_driver kinect_rgbd.launch

1. Determine Aruco marker transforms

First open "aruco_calibrate.launch" file and set the appropriate parameters. Run the following command. For the next 60 seconds ros will try to calculate the transformations between markers. Try to capture all markers from as many angles as possible. At least two markers should be seen in each frame.

roslaunch aruco_detect aruco_calibrate.launch

2. Run service or node

In the launch file the following parameters may be set:

  • aruco_type {str}: Type of the aruco marker (default: "DICT_6X6_100")
  • aruco_size {double}: Size of the aruco markers in meters (default: "0.1")
  • aruco_transforms {str}: A path to the .npz file containing the transforms between markers. If not provided calibration needs to be done at launch.
  • aruco_update_rate {double}: A value between 0 and 1. Determines how much each frame updates the position of the object (running average)
  • aruco_object_id {str}: The name the detected object will be given in the tf tree.
  • aruco_main_marker_id {int}: The ID of the "0" aruco marker. All transforms are calculated to this marker. The object position is the location of this marker.
  • camera_img_topic {str}: The name of the ros topic where camera images are posted.
  • camera_info_topic {str}: The name of the ros topic where the information about the camera is posted (camera matrix, distortion matrix)
  • camera_frame_id {str}: The id of the frame in which the Image is posted.

To run the node:

roslaunch aruco_detect arucode_node.launch

To run as a service:

roslaunch aruco_detect arucode_service.launch

arucorospy's People

Contributors

haejoon96 avatar hongyoungjin avatar jurehudoklin avatar ssw0536 avatar

Watchers

 avatar

Forkers

sang-yoon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.