Ask Your Question
0

How to use ar_track_alvar for detecting markers using Kinect ?

asked 2015-02-16 09:35:39 -0600

MSYazeed gravatar image

Hello guys,

I'm new to ros and want to use it for markers detection. I don't know how to use ar_track_alvar (individualMarkers) in the proper way to make it work using Kinect camera. I'm also confused about the parameters (Camera image topic, Camera topic info, output frame) what should be used there ?

And finally should I run rviz to before using ar_track_alvar package ?

Thank you for your help!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2015-02-16 22:52:30 -0600

marguedas gravatar image

You can indeed use ar_track_alvar to detect ar_markers.

If you are using openni_launch or freenect_launch packages to get the images from your kinect, you should have a bunch of topics published.
Camera image topic stands for the topic where your kinect image is published, should look like: /camera/rgb/image_raw
Camera info topic stands for the topic where the information of your camera are published, shoud look like: /camera/rgb/camera_info
The output frame parameter means the link relative to which you want the position of the detected ar marjers will be published (for example base_link) or whatever link suits your application. This must be a link known by tf, otherwise ROS won't be able to compute a transformation.
Documentation can be found here
Examples can be found here

The detected markers will be published on /ar_pose_marker (ar_track_alvar/AlvarMarkers) as an array of AlvarMarkers You can also visualize them in rviz, you just have to add a marker plugin and select the correspondig topic (/visualization_marker).

Hope this helps,

edit flag offensive delete link more

Comments

currently I'm using /camera/rgb/image_color for Camera image topic to make the camera receive the coloured image . and for the output frame I'm using camera_link(not sure its right). but I can't see any output yet and I can't manage to show it on rviz. What am I doing wrong here ?

MSYazeed gravatar imageMSYazeed ( 2015-02-24 04:38:47 -0600 )edit

I also should note that I ran roscore first then openni_launch then the ar_track_alvar and rviz. it gives me weird error saying '[1424775599.179064296]: Client [/marker_detect] wants topic /camera/rgb/image_color to have datatype/md5sum [~], but our version has [~]. Dropping connection.

MSYazeed gravatar imageMSYazeed ( 2015-02-24 05:13:28 -0600 )edit

This is the full error: [ERROR] [1424775599.179064296]: Client [/marker_detect] wants topic /camera/rgb/image_color to have datatype/md5sum [sensor_msgs/PointCloud2/1158d486dd51d683ce2f1be655c3c181], but our version has [sensor_msgs/Image/060021388200f6f0f447d0fcd9c64743]. Dropping connection.

MSYazeed gravatar imageMSYazeed ( 2015-02-24 05:13:50 -0600 )edit

ok, here the error says that this node requires a sensor_msgs/PointCloud2 and not a color image. So you should use depth_registered (camera/depth_registered/image_raw). If you want to check the type of a message sent on a given topic you can use: rostopic info TOPICNAME

marguedas gravatar imagemarguedas ( 2015-02-25 01:24:17 -0600 )edit

Thank you so much its working now and can detect the the marker, but some how it shows the marker on Rivz for a second then it gives me the following error

MSYazeed gravatar imageMSYazeed ( 2015-03-02 07:43:06 -0600 )edit

/usr/include/eigen3/Eigen/src/Core/DenseStorage.h:69: Eigen::internal::plain_array<t, size,="" matrixorarrayoptions,="" 16="">::plain_array() [with T = float, int Size = 4, int MatrixOrArrayOptions = 0]: Assertion `(reinterpret_cast<size_t>(array) & 0xf) == 0 && "this assertion is explained here: " "http://e

MSYazeed gravatar imageMSYazeed ( 2015-03-02 07:43:26 -0600 )edit

No idea, Sorry. I've never face this issue. But it seems that several people got this problem recently: http://answers.ros.org/question/20369... Try to track these threads and check on the internet, the solution will pop up in the eventually.

marguedas gravatar imagemarguedas ( 2015-03-02 08:26:02 -0600 )edit

Thank you so much for your help

MSYazeed gravatar imageMSYazeed ( 2015-03-02 08:43:13 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2015-02-16 09:35:39 -0600

Seen: 2,793 times

Last updated: Feb 16 '15