aruco_ros not detecting marker
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
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.
Also test with this marker: https://github.com/pal-robotics/aruco... to discard the problem it’s not your marker
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:
Why does difference in marker make such an impact? I tried my first marker with aruco_detect and it ...(more)
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.
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, consider answering your question with this finding so it closes the loop.