UbiquityRobotics / fiducials

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

fixed aruco detect remaps to relative topic names to suport namespaces #236

Closed JanezCim closed 3 years ago

JanezCim commented 3 years ago

On a robot that has exported a ROS_NAMESPACE, aruco detect does not map topics correctly, because the remap takes in absolute topics and that can not be modified from terminal like other topics can be (eg. camera topic):

mon launch aruco_detect aruco_detect.launch camera:=raspicam_node

The changes that are made also work with the rest of the system when ROS_NAMESPACE is not set.

test that it works within magni gazebo with

roslaunch magni_gazebo fiducial_world.launch

JanezCim commented 3 years ago

@AGregorc can you also test this when you can

MoffKalast commented 3 years ago

On second thought I may have missed something, the TF frame the transforms are getting published in relation to what looks like namespace/raspicam_sensor instead of raspicam_sensor. Not sure why namespaces would get added to damn TF frames but it seems to be happening.

MoffKalast commented 3 years ago

Ok yeah it seems that if I add the namespace/raspicam_sensor link to the urdf with 0,0,0 connection to the actual one, it starts to work properly. Not sure how to properly solve this one though. There must be a line in there that wrongly takes a topic name as a tf frame, but I haven't found it yet.

MoffKalast commented 3 years ago

AH I found it, it's the frameId = msg->header_frame_id;. Checking the camera info topic, the frame is being published wrong by gazebo, it's not an aruco error.

All good then.

JanezCim commented 3 years ago

And i think that this camera frame topic in gazebo will be solved with https://github.com/UbiquityRobotics/magni_robot/pull/146#issuecomment-789472047