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

AprilTag detection using ROS

asked 2020-02-27 03:44:25 -0600

mantha gravatar image

I am a beginner working with Turtlebot 3 and am trying to do the april tag detection using the following tutorial (https://github.com/AprilRobotics/apri...). However, I am having errors (mentioned below) and unable to fix it. Can anyone provide the code that works with turtlebot3 or help resolve this issue? I'd greatly appreciate any help you can provide. 

1) catkin_make doesnt compile but catkin_make_isolated does. However, this also has errors (so it might not be compiling it correctly) 2) After everything when i try to run the launch file "continuous_detection.launch" i get an error saying "apriltag_ros_continuous_node" cannot be located. specifically the following. ERROR: cannot launch node of type [apriltag_ros/apriltag_ros_continuous_node]: can't locate node [apriltag_ros_continuous_node] in package [apriltag_ros]

Your help is greatly appreciated.

edit retag flag offensive close merge delete

Comments

maybe when source, use devel_isolated

nd gravatar image nd  ( 2020-02-27 06:45:33 -0600 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2020-02-27 12:20:01 -0600

dj95 gravatar image

You should notice that when you use catkin_make command for the first time, the build and devel folders are created, similarly when using catkin_make_isolated, it creates folders name build_isolated and devel_isolated. After using catkin_make_isolated (for building non-ros packages along with ros packages) you won't be able to use catkin_make. And to locate the node, you would have to go into your workspace and then type:

 source devel_isolated/setup.bash

After this your problem should be solved.

edit flag offensive delete link more

Comments

Thanks I really appreciate your response. This solution worked to address that error. However, I am facing a new issue now. After sourcing the setup.bash file in devel_isolated and running the launch file (continuous_detection.launch), I get the following warning

[WARN} : remove_duplicates parameter not provided. Defaulting to true.

After I run rqt_image_view to the see the camera feed and detection, the /tag_detections_image topic (or other topics such as tag_Detections_image/compressed or tag_detections_image/compressedDepth or tag_detections_image/theora) shows a grey blurred static image and even I show a marker at the raspberry pi camera of the turtlebot nothing gets detected.

Could you please let me know what I might be doing wrong?

Thanks again for your time and help

mantha gravatar image mantha  ( 2020-03-03 02:10:18 -0600 )edit

I'm not really sure about this, are you sure your camera is working, do you see the image on rviz? Also did you add the tag definitions in the tags.yaml file? ( apriltag_ros/config/tags.yaml )

dj95 gravatar image dj95  ( 2020-03-03 08:19:14 -0600 )edit

yes, the camera does work but the tags.yaml seems to be empty bunch of lines commented (starts with #) and just two more things in there (below) standalone_tags: [ ] tag_bundles: [ ]

Could you suggest what to add in there if I would like to detect april tag 36h11 tags?

mantha gravatar image mantha  ( 2020-03-03 08:47:06 -0600 )edit

also i just noticed that settings.yaml has details regarding tag family

mantha gravatar image mantha  ( 2020-03-03 08:48:07 -0600 )edit

You would have to specify the tags in the yaml file. I'd recommend going through the tutorials [http://wiki.ros.org/apriltag_ros]

dj95 gravatar image dj95  ( 2020-03-03 15:16:22 -0600 )edit

I do have exactly what they have in the repository file which is the following

(contents of tags.yaml)

# Definitions of tags to detect

#

## General remarks

#

- All length in meters

- Ellipsis (...) signifies that the previous element can be repeated multiple times.

#

## Standalone tag definitions

### Remarks

#

- name is optional

#

### Syntax

#

standalone_tags:

[

{id: ID, size: SIZE, name: NAME},

...

]

standalone_tags: [ ]

## Tag bundle definitions

### Remarks

#

- name is optional

- x, y, z have default values of 0 thus they are optional

- qw has default value of 1 and qx, qy, qz have default values of 0 thus they are optional

#

### Syntax

#

tag_bundles:

[

{

name: 'CUSTOM_BUNDLE_NAME',

layout:

[

{id: ID, size: SIZE, x: X_POS, y: Y_POS, z: Z_POS, qw: QUAT_W_VAL, qx: QUAT_X_VAL, qy: QUAT_Y_VAL, qz: QUAT_Z_VAL},

...

]

},

...

]

tag_bundles: [ ]

mantha gravatar image mantha  ( 2020-03-03 23:14:21 -0600 )edit

You actually have to define tags for them to be detected, If you don't specify the id and size it wouldn't know what to look for.

standalone_tags:
  [
    {id: 0, size: .1524},
    {id: 1, size: .1524},
    {id: 2, size: .1524},
  ]
dj95 gravatar image dj95  ( 2020-03-05 08:58:12 -0600 )edit

Hey is this issue resolved? Even I am facing the same issue. 1) I added the standalone tags in the tags.yaml but in the rqt_image_view tab I can see the image but it is not showing up in the rviz. 2) Even the raspi_cam node is free in the rqt graph, it is not subscribing to the tag_detection_image topic.

Sai teja gravatar image Sai teja  ( 2020-03-29 23:51:17 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-02-27 03:44:25 -0600

Seen: 2,392 times

Last updated: Mar 03 '20