UbiquityRobotics / fiducials

Simultaneous localization and mapping using fiducial markers.
BSD 3-Clause "New" or "Revised" License
265 stars 135 forks source link

TF problem when I detect the aruco markers #279

Closed wowowolala closed 2 years ago

wowowolala commented 2 years ago

I run the aruco_detect.launch, but the tf about camera and aruco marker is wrong, like picture below. autodock_tf_problem

The tf should be like this: (for example) autodock_tf_problem2

How can I modify the tf to be correct?

wowowolala commented 2 years ago

It is not camera problem.

anfederman commented 2 years ago

Do you have the camera orientation correct?

On Tue, Nov 29, 2022, 10:22 PM wowowolala @.***> wrote:

It is not camera problem.

— Reply to this email directly, view it on GitHub https://github.com/UbiquityRobotics/fiducials/issues/279#issuecomment-1331696267, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHZ3734MDJT4WZTAHFYC6DWK3XBZANCNFSM6AAAAAASPIM2UE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

anfederman commented 2 years ago

tThis is the same issue as 271 and 275. Perhaps trying STAG makers instead will resolve, as I don't think we have any LTS for aruco_detect.

anfederman commented 2 years ago

OK I just tried STAG markers in our easymap stack. This on a Magni robot with the camera forward. It still puts the maker below the floor. even when it is on the wall directly ahead of the robot.

Screenshot from 2022-11-30 09-48-12

Screenshot from 2022-11-30 09-47-57

anfederman commented 2 years ago

Since the TF error is in both the magni and easymap stacks, It must have something to do with camera orientation. It appears the transform thinks the camera is in the tower orientation rather than the lower magni forward orientation. This would explain why rviz put the maker below the floor. I have tried changing the camera orientation in the URDF section but nothing seem to fix the issue.

we need documentation and pictures CAREFULLY explaining and showing the camera installed and the extrinsics config files. SOmewhere in the history of going from magni to breadcrumb, this information has been lost.

wowowolala commented 2 years ago

Do you have the camera orientation correct? On Tue, Nov 29, 2022, 10:22 PM wowowolala @.> wrote: It is not camera problem. — Reply to this email directly, view it on GitHub <#279 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHZ3734MDJT4WZTAHFYC6DWK3XBZANCNFSM6AAAAAASPIM2UE . You are receiving this because you are subscribed to this thread.Message ID: @.>

yes, because I use same camera file to detect apriltag and aruco marker. The result of detecting apriltag is correct like picture 2.

wowowolala commented 2 years ago

This is my rs_camera.launch

wowowolala commented 2 years ago

And this is my aruco_detect.launch 擷取

wowowolala commented 2 years ago

Since the TF error is in both the magni and easymap stacks, It must have something to do with camera orientation. It appears the transform thinks the camera is in the tower orientation rather than the lower magni forward orientation. This would explain why rviz put the maker below the floor. I have tried changing the camera orientation in the URDF section but nothing seem to fix the issue.

we need documentation and pictures CAREFULLY explaining and showing the camera installed and the extrinsics config files. SOmewhere in the history of going from magni to breadcrumb, this information has been lost.

Same situation! I just run rs_camera.launch and aruco_detect.launch. and I found it think that aruco marker is on z axis of camera! But the correct is aruco marker should be on x axis of camera.

anfederman commented 2 years ago

Screenshot from 2022-12-01 10-43-21.

I have it working.

the camera needs to be mounted with the cable coming out the bottom, ie toward the PI.

Have the camera position specified in the robot.yaml

Check for lidar and camera extrinsics files in two places with following prior

ities:

1.) in ~/.ros/extrinsics/extrinsics.yaml

2.) in package magni_description/extrinsics/extrinsics.yaml

where is either "camera" or "lidar" and is an arbitrary string with which the extrinsics file is identified

raspicam_position: 'forward' # to disable insert "None" lidar_position : 'top_plate' # to disable insert "None"

good luck