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

aruco_ros not detecting marker

asked 2021-10-15 05:07:31 -0500

Roshan gravatar image

Hello, I'm trying to detect a marker using aruco_ros. The launch code for the aruco_ros node:

<arg name="markerId" default="1"/>
<arg name="markerSize" default="0.2"/> 
<arg name="marker_frame" default="marker_frame"/>
<arg name="ref_frame" default="tb3_1/base_footprint"/> 
<arg name="corner_refinement" default="LINES" /> 


<node pkg="aruco_ros" type="single" name="aruco_single">
<remap from="/camera_info" to="/tb3_1/camera/rgb/camera_info" />
<remap from="/image" to="/tb3_1/camera/rgb/image_raw" />
<param name="image_is_rectified" value="True"/>
<param name="marker_size" value="$(arg markerSize)"/>
<param name="marker_id" value="$(arg markerId)"/>
<param name="reference_frame" value="$(arg ref_frame)"/> 
<param name="camera_frame" value="tb3_1/camera_rgb_optical_frame"/>
<param name="marker_frame" value="$(arg marker_frame)" />
<param name="corner_refinement" value="$(arg corner_refinement)" />
</node>

The marker is 0.2x0.2, the list of topics I have is:

 /aruco_single/debug
/aruco_single/debug/compressed
/aruco_single/debug/compressed/parameter_descriptions
/aruco_single/debug/compressed/parameter_updates
/aruco_single/debug/compressedDepth
/aruco_single/debug/compressedDepth/parameter_descriptions
/aruco_single/debug/compressedDepth/parameter_updates
/aruco_single/debug/theora
/aruco_single/debug/theora/parameter_descriptions
/aruco_single/debug/theora/parameter_updates
/aruco_single/marker
/aruco_single/parameter_descriptions
/aruco_single/parameter_updates
/aruco_single/pixel
/aruco_single/pose
/aruco_single/position
/aruco_single/result
/aruco_single/result/compressed
/aruco_single/result/compressed/parameter_descriptions
/aruco_single/result/compressed/parameter_updates
/aruco_single/result/compressedDepth
/aruco_single/result/compressedDepth/parameter_descriptions
/aruco_single/result/compressedDepth/parameter_updates
/aruco_single/result/theora
/aruco_single/result/theora/parameter_descriptions
/aruco_single/result/theora/parameter_updates
/aruco_single/transform
/clock
/gazebo/link_states
/gazebo/model_states
/gazebo/parameter_descriptions
/gazebo/parameter_updates
/gazebo/performance_metrics
/gazebo/set_link_state
/gazebo/set_model_state
/rosout
/rosout_agg
/tb3_0/camera/parameter_descriptions
/tb3_0/camera/parameter_updates
/tb3_0/camera/rgb/camera_info
/tb3_0/camera/rgb/image_raw
/tb3_0/camera/rgb/image_raw/compressed
/tb3_0/camera/rgb/image_raw/compressed/parameter_descriptions
/tb3_0/camera/rgb/image_raw/compressed/parameter_updates
/tb3_0/camera/rgb/image_raw/compressedDepth
/tb3_0/camera/rgb/image_raw/compressedDepth/parameter_descriptions
/tb3_0/camera/rgb/image_raw/compressedDepth/parameter_updates
/tb3_0/camera/rgb/image_raw/theora
/tb3_0/camera/rgb/image_raw/theora/parameter_descriptions
/tb3_0/camera/rgb/image_raw/theora/parameter_updates
/tb3_0/cmd_vel
/tb3_0/imu
/tb3_0/joint_states
/tb3_0/odom
/tb3_0/scan
/tb3_1/camera/parameter_descriptions
/tb3_1/camera/parameter_updates
/tb3_1/camera/rgb/camera_info
/tb3_1/camera/rgb/image_raw
/tb3_1/camera/rgb/image_raw/compressed
/tb3_1/camera/rgb/image_raw/compressed/parameter_descriptions
/tb3_1/camera/rgb/image_raw/compressed/parameter_updates
/tb3_1/camera/rgb/image_raw/compressedDepth
/tb3_1/camera/rgb/image_raw/compressedDepth/parameter_descriptions
/tb3_1/camera/rgb/image_raw/compressedDepth/parameter_updates
/tb3_1/camera/rgb/image_raw/theora
/tb3_1/camera/rgb/image_raw/theora/parameter_descriptions
/tb3_1/camera/rgb/image_raw/theora/parameter_updates
/tb3_1/cmd_vel
/tb3_1/imu
/tb3_1/joint_states
/tb3_1/odom
/tb3_1/scan
/tf
/tf_static

The aruco does not get detected, even at different distances right in front of the camera

edit retag flag offensive close merge delete

Comments

Can you get what the topic is publishing:

rostopic echo <topic_name>

Your launch file looks ok but hard to know and topics are publishing so we need to narrow down what could be the issue.

osilva gravatar image osilva  ( 2021-10-15 17:41:41 -0500 )edit

Also test with this marker: https://github.com/pal-robotics/aruco... to discard the problem it’s not your marker

osilva gravatar image osilva  ( 2021-10-15 17:47:23 -0500 )edit

Hello, thank you for your answer. I changed the marker and it does get detected, but it "flickers". It gets detected for a second, and then stops being detected for a while and this keeps happening. The /aruco_single/results is printing a long list of numbers:

155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155

Why does difference in marker make such an impact? I tried my first marker with aruco_detect and it ...(more)

Roshan gravatar image Roshan  ( 2021-10-16 02:40:04 -0500 )edit

Usually this aruco detectors use opencv and divide the detected aruco into smaller regions or quads to process the image and if you consider there is conversion from 3D to 2D there is loss of accuracy. Back to your original problem if you can detect an aruco, then focus on calibration parameters or perhaps consider working with a bigger aruco.

osilva gravatar image osilva  ( 2021-10-16 07:58:13 -0500 )edit

Will try calibrating the parameters. What about white borders around the aruco marker, I've heard that you usually need those but the tutorial I've been following didn't use white borders

Roshan gravatar image Roshan  ( 2021-10-16 08:28:37 -0500 )edit

@Roshan, consider answering your question with this finding so it closes the loop.

osilva gravatar image osilva  ( 2021-10-19 09:19:44 -0500 )edit

2 Answers

Sort by » oldest newest most voted
1

answered 2021-10-19 09:24:28 -0500

Roshan gravatar image

updated 2021-10-19 09:25:14 -0500

Did not get aruco_ros to work properly. The marker was detected but it was flickering and would only get detected some times even after calibrating the parameters. The reason why I was testing aruco_ros was because aruco_detect was not doing a good enough job of detecting the marker.

After adding a white border around the aruco marker, aruco_detect became a lot better. I tried with aruco_ros after adding the white border but it was still flickering and because of that I did not try to make aruco_ros work better and instead changed to aruco_detect.

edit flag offensive delete link more
0

answered 2021-11-09 07:26:08 -0500

AliAs gravatar image

I tried to detect a marker using aruco_ros using two following launch files and faced the same problem. roslaunch usb_cam usb_cam-test.launch roslaunch aruco_ros aruco-test.launch

visualizing "/aruco_single/debug/compressed" topic using "rosrun rqt_gui rqt_gui" or through rviz gives this: image description

I received 2 warnings: [ WARN] : Corner refinement options have been removed in ArUco 3.0.0, corner_refinement ROS parameter is deprecated [ WARN] : normalizeImageIllumination is unimplemented! I think the source of the flickering problem is the latter warning! but I didn't find a solution for it yet!

edit flag offensive delete link more

Comments

Yeah, I've had a lot more success with aruco_detect. If you can use aruco_detect, I'd recommend that

Roshan gravatar image Roshan  ( 2021-11-09 07:48:58 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-10-15 05:07:31 -0500

Seen: 1,467 times

Last updated: Nov 09 '21