ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

How to read markers in ar_track_alvar?

asked 2020-01-09 08:09:16 -0500

zihao gravatar image

updated 2020-01-10 04:46:15 -0500

Hi there,

I was trying to use this pkg ar_track_alvar to detect a tag, and I found out that it keeps recognizing random things as tags. So I want to filter those wrong targets out by using the code that the marker contains, but I couldn't find anything related to the ID/number in any rostopic, does this mean the node isn't decoding the marker?

Does anyone have any idea about it?

Thank you in advance!

Best Regards

Updates

  • if I add code on, the tag looks like this in simulation image description
  • about false positive: when the camera is heading to a wall with 3 gray patches(without any code on them) image description
  • and this is what the topic /ARmarker_points shows image description
edit retag flag offensive close merge delete

Comments

Can you show us your code and images of the tags that you're using. I've given you enough karma to do this now. ar_track_alvar is definitely capable identifying specific markers and I've never seen it detect a false positive. We'll need to know some more information about how you're using it before we can help you though.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2020-01-09 16:50:34 -0500 )edit

@PeteBlackerThe3rd Hi! Thank you for replying, and I'm using this pkg in a simulation, the robot is running in gazebo. I just launched ar_track_alvar with a launch file, nothing special. And the pix are above, please let me know if you need some more information.

zihao gravatar image zihao  ( 2020-01-10 04:15:26 -0500 )edit

And one problem solved: the marker is actually being decoded and published to rostopic "/ar_pose_marker" as member "id" in rosmsg type "ar_track_alvar_msgs/AlvarMarkers"! But I wrongly chose "gray color" as the background of tag code, that's why I kept receiving random numbers as "id". The problem of false positive remains though.

zihao gravatar image zihao  ( 2020-01-10 07:10:24 -0500 )edit

The bright white color of your walls is probably causing most of your problems. ar_track_alvar thresholds the camera image into a binary image before trying to detect the markers. So unless the white areas of the markers are close to the brightest areas in the image this won't work very well.

Try changing the walls to a darker tone or color and see if that helps.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2020-01-10 12:32:06 -0500 )edit

Yes, that's the problem there, I fixed this by applying exact white color in markers, and all those false positives could be filtered out by using 'id's of markers. Thx Pete!

zihao gravatar image zihao  ( 2020-01-13 03:11:39 -0500 )edit

Great, glad you got it working. If you could accept my answer below, then other users will be able to see that your question has a solution. Thanks.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2020-01-13 04:35:32 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-01-13 04:35:00 -0500

Thanks for posting the images, I think I can see the problem now.

The bright white color of your walls is probably causing of your problems. ar_track_alvar thresholds the camera image into a binary image before trying to detect the markers. So unless the white areas of the markers are close to the brightest areas in the image this won't work very well.

Try changing the walls to a darker tone or color and see if that helps.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2020-01-09 08:05:30 -0500

Seen: 712 times

Last updated: Jan 13 '20