Coder Social home page Coder Social logo

Comments (5)

psigen avatar psigen commented on April 19, 2024 5

@Asukamax: You are correct, the apriltags node only processes image data, but it does not connect to a camera. You need to run one of several camera driver ROS nodes to get data from your camera and publish it on ROS.

The exact driver you need to use depends on your camera. For USB cameras, two common options are:

The standard for cameras on ROS is to publish a subset of a few standard topics, such as:

  • /image_raw - an unmodified camera image
  • /image_mono - a black and white version of the image
  • /camera_info - information about the camera calibration

After your camera node is outputting these, you need to rectify the image in order to remove the distortions from the camera not being physically ideal. ROS provides another node for this, in the image_proc package:
http://wiki.ros.org/image_proc

This node will take in one of the above images, and use the information in /camera_info to produce a new image topic called /image_rect. This will be the same image, only warped to remove the camera distortions.

At this point, you can set the /camera_info and /image_rect topics in the apriltags.launch file so that your camera images are fed into the Apriltags node. The output will be a stream of detections, one message per frame.

You can read through many online ROS tutorials for setting up a camera, it should help explain more about what these nodes do and how to use them.

from apriltags.

andre-nguyen avatar andre-nguyen commented on April 19, 2024

After your camera node is outputting these, you need to rectify the image in order to remove the distortions from the camera not being physically ideal. ROS provides another node for this, in the image_proc package:
http://wiki.ros.org/image_proc

@psigen I was wondering about this, I seem to get better performance in terms of the pose estimation when I didn't give rectified images to the detector. My guess was that its because the call to solvePnP takes into account the distortion coefficients https://github.com/personalrobotics/apriltags/blob/master/src/apriltags.cpp#L118 if you feed the rectified image these coefficients should be zero instead.

from apriltags.

psigen avatar psigen commented on April 19, 2024

That's a good point @andre-nguyen, we should probably document that.

from apriltags.

kubark42 avatar kubark42 commented on April 19, 2024

Could a .bag also be provided? It would be nice to test against a known working set.

from apriltags.

YuehChuan avatar YuehChuan commented on April 19, 2024

Hi, I also felt the usage of apriltags in ros is not well documented yet.
So I tried to manage. Here https://github.com/xenobot-dev/apriltags_ros
welcome comment. :)

from apriltags.

Related Issues (20)

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.