visualisation using rviz

99 views
Skip to first unread message

Akash Bhansali

unread,
Jun 26, 2020, 1:51:35 AM6/26/20
to tagslam

Hello Bernd,
     I hope you are doing great.
     I am trying to visualize tags using rviz but only few are shown. (out of  20 only 6).
     Here  I am attaching the output of rviz and my bag file after using sync_and_detect. Also i  am attaching the video captured using my phone.
     Please have a look at them and help me. If i am wrong, please correct me.
     Would be waiting for your response.


Thanks,
command_prompt_1.png
command_prompt_2.png
c_P_3.png
full_rviz_image.png
rviz_map.png
data2.bag_output.bag

Akash Bhansali

unread,
Jun 26, 2020, 1:59:49 AM6/26/20
to tagslam

Please have a look here. 
Also i am attaching mobile captured video.

Google Drive LINK:

Bernd Pfrommer

unread,
Jun 27, 2020, 10:32:25 AM6/27/20
to tagslam
I can see a lot of "unopt" factors in your tagslam output. This means that somehow TagSLAM couldn't optimize it. Usually this is due to not providing some priors that are required to solve the optimization problem. Can you attach your cameras.yaml and tagslam.yaml?

Bernd Pfrommer

unread,
Jun 27, 2020, 10:54:55 AM6/27/20
to tagslam
Looks like your bag contains only detections for 10 different tags. So some of your 20 tags must not be detected properly. Check that you have the right border width and tag family. Look at the "disp" output topic with rqt_image_view. Is the detection reliable?

Here is how I checked for the detected tags:
rostopic echo -b ~/Downloads/data2.bag_output.bag /detector/tags | grep -i "id" | grep -v frame | sort | uniq
    id: 0
    id: 1
    id: 11
    id: 13
    id: 16
    id: 17
    id: 18
    id: 2
    id: 3
    id: 4

Another point to watch out: if you only specify the pose of a single tag (let's call it the "root" tag) in your tagslam.yaml, then tagslam will need to see the root tag before it can do any optimization. To localize any other (new) tag, it will have to see the new tag *in the same image* as a known tag, i.e. it will have to see the tag together with the root tag, or together with a tag that has previously been seen in the same image of the root tag.

For instance in the video you posted, it is often the case that new tags are seen, but only after all other tags have disappeared from the image. In that case, tagslam has no idea where the camera is because you are viewing a tag with unknown pose. You need to have image "overlap", or a chain of "overlaps". Hope this makes sense.

Bernd Pfrommer

unread,
Jun 27, 2020, 11:16:15 AM6/27/20
to tagslam
Are there tags printed on the rear of your tags? There seems to be some grey pattern shining through. This will not help detection.
Message has been deleted

Akash Bhansali

unread,
Jun 29, 2020, 11:46:11 PM6/29/20
to tagslam
I am adding my cameras.yaml and tagslam.yaml file here. Please have a look.
And there are no tags printed behind the tags its just one gray line and tags are being detected on them i have cheacked each tag individually. I have calibrated camera once again and its new file. 


On Friday, June 26, 2020 at 11:21:35 AM UTC+5:30, Akash Bhansali wrote:
cameras.yaml
tagslam.yaml

Bernd Pfrommer

unread,
Jun 30, 2020, 11:14:36 AM6/30/20
to tagslam
The tagslam.yaml looks good. You specify tag 0 as root tag, so discover all other tags, you need to successively establish image overlap between tag 0 and the other tags.
However, your bag file indicates that the detector only sees 10 of the 20 tags you put up. That's not a problem related to tagslam, but has to do with the detector.
Your cameras.yaml file is kind of ok, too, although I have never seen such large distortion coefficients, ever. A value of -57 is huge. Also, the x image center is way off from the middle. It should be at about 1920/2 = 960, but its at 882. Usually the image center would be off by 10 to 20 pixels maybe.

However, that the tag detector doesn't see half of your tags has nothing to do with the intrinsic calibration.
I suggest you run sync_and_detect with the annotated images switched on (or better, run the tag detector real-time) to see if/why only half the tags are being detected.
Reply all
Reply to author
Forward
0 new messages