Ask Your Question
0

April tag 2 ROS pose detection

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

b-sriram gravatar image

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

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 imagePeteBlackerThe3rd ( 2018-07-31 08:12:29 -0600 )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 imageb-sriram ( 2018-08-01 01:24:22 -0600 )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 imagestevejp ( 2018-08-01 20:13:31 -0600 )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 imageb-sriram ( 2018-08-06 03:27:37 -0600 )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 imagePeteBlackerThe3rd ( 2018-08-06 05:10:57 -0600 )edit

The resolution is 2048 x 2048.

b-sriram gravatar imageb-sriram ( 2018-08-06 05:13:53 -0600 )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 imagePeteBlackerThe3rd ( 2018-08-06 05:31:56 -0600 )edit

Its using a lot of CPU around 200%

b-sriram gravatar imageb-sriram ( 2018-08-06 06:10:22 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

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

rjosodtssp gravatar image

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

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

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

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

Seen: 823 times

Last updated: Mar 11