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

April tag 2 ROS pose detection

asked 2018-07-31 03:21:17 -0500

b-sriram gravatar image

updated 2019-03-11 23:15:15 -0500

jayess gravatar image

Hi,

I am using the Apriltag2_ros package to detect the apriltags in my scene.

Everything works well and I get really good pose detections. The problem is that its too slow, I have a lag when I view it on rviz.

I checked the origin source code Apriltag too and that seems to run with a lag too.

I didn't know where to ask this question so started here.

Thanks in advance for the help. image description

My Launch file (continuous_detection.launch)

<launch>
  <arg name="launch_prefix" default="" /> 
  <arg name="node_namespace" default="apriltags2_ros_continuous_node" />
  <arg name="camera_name" default="camera" />
  <arg name="camera_frame" default="camera" />
  <arg name="image_topic" default="image_rect_color" />

  <!-- Set parameters -->
  <rosparam command="load" file="$(find apriltags2_ros)/config/settings.yaml" ns="$(arg node_namespace)" />
  <rosparam command="load" file="$(find apriltags2_ros)/config/tags.yaml" ns="$(arg node_namespace)" />

  <node pkg="apriltags2_ros" type="apriltags2_ros_continuous_node" name="$(arg node_namespace)" clear_params="true" output="screen" launch-prefix="$(arg launch_prefix)" >
    <remap from="image_rect" to="$(arg camera_name)/$(arg image_topic)" />
    <remap from="camera_info" to="$(arg camera_name)/camera_info" />

    <param name="camera_frame" type="str" value="$(arg camera_frame)" />
    <param name="publish_tag_detections_image" type="bool" value="true" />      
  </node>
</launch>

Tag Setting:

   standalone_tags:
      [
       {id: 0, size: 0.17, name: YOLO}
      ]
edit retag flag offensive close merge delete

Comments

What is you actual question?

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-07-31 08:12:29 -0500 )edit

That the time taken for the algorithm to process one image is extremely high. This makes the pose detection really slow. Do you have the same problem or is it only me?

b-sriram gravatar image b-sriram  ( 2018-08-01 01:24:22 -0500 )edit

What is your hardware setup? You said "I have a lag when I view it on rviz." - does this mean it only lags when you try and visualize in rviz?

stevejp gravatar image stevejp  ( 2018-08-01 20:13:31 -0500 )edit

Intel Xeon Processor with 4 cores and 32gb RAM. "does this mean it only lags when you try and visualize in rviz". Its lags while detecting too, the overall algorthim speed is slow is what I meant.

b-sriram gravatar image b-sriram  ( 2018-08-06 03:27:37 -0500 )edit

What resolution images are you feeding into it? This sounds unusually slow given your hardware. We've have this running at 30fps on smaller machines.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-08-06 05:10:57 -0500 )edit

The resolution is 2048 x 2048.

b-sriram gravatar image b-sriram  ( 2018-08-06 05:13:53 -0500 )edit

Okay that's big but certainly not too big. Can you try using the rqt_top gui to check how much CPU your nodes are using just to confirm that the Apriltag2 node is the problem.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-08-06 05:31:56 -0500 )edit

Its using a lot of CPU around 200%

b-sriram gravatar image b-sriram  ( 2018-08-06 06:10:22 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-03-11 22:14:39 -0500

rjosodtssp gravatar image

updated 2019-03-11 23:16:56 -0500

jayess gravatar image

I just solved my problem. I dont' know your context. Problem is in my setting.yaml. I set

tag_debug=0

and

tag_refine_pose=0

then CPU usage is around 45%. BTW

tag_blur<0

will increase CPU usage too

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-07-31 03:21:17 -0500

Seen: 2,032 times

Last updated: Mar 11 '19