How to improve mapping accuracy based on ArUco identification code?

classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: How to improve mapping accuracy based on ArUco identification code?

xsasdA
This post was updated on .
Thanks for the hint. I added a ROS_WARN inside CoreWrapper.cpp. Unfortunately, the tag callback seems to never be called when running the launch and bagfile.

I tried to debug why that is happening, but everything seems fine. The only thing slightly related that I found was a CMake warning about a missing python module (numpy) in the apriltag package while building the whole catkin workspace. After fixing that related issue, it still does not work.

EDIT: I tried to investigate the problem further and found some weird error messages in the master.log after executing the launch + bag file:

[rosmaster.threadpool][ERROR] 2023-01-03 22:14:18,667: Traceback (most recent call last):
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rosmaster/threadpool.py", line 218, in run
    result = cmd(*args)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rosmaster/master_api.py", line 210, in publisher_update_task
    ret = xmlrpcapi(api).publisherUpdate('/master', topic, pub_uris)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1243, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1602, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1283, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1316, in single_request
    return self.parse_response(response)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1493, in parse_response
    return u.close()
  File "/usr/lib/python2.7/xmlrpclib.py", line 800, in close
    raise Fault(**self._stack[0])
Fault: <Fault -1: 'publisherUpdate: unknown method name'>

That error occurs 25 times throughout the whole run and is happening quite often for /tf & /tf_static topics:
[rosmaster.master][INFO] 2023-01-03 22:14:18,665: publisherUpdate[/tf_static] -> http://p53:39023/ ['http://p53:41113/']: sec=0.00, exception=<Fault -1: 'publisherUpdate: unknown method name'>

But also one time for rtabmap/cloudmap:
[rosmaster.master][INFO] 2023-01-03 22:14:18,667: publisherUpdate[/rtabmap/cloud_map] -> http://p53:39023/ []: sec=0.00, exception=<Fault -1: 'publisherUpdate: unknown method name'>

I'm not sure if these errors are related to my problem, because I don't understand them good enough to judge. I've read the following: https://github.com/ros/ros_comm/issues/572 --- especially https://github.com/ros/ros_comm/issues/572#issuecomment-89087064 which indicates, that the error occurs when the master can't call updatePublishers method on a node.
On the other hand, the same problem occurs for one user at rosanswers, because a node is both subscribing and publishing to a topic, although the marked answer states that this is not the actual cause of the problem: https://answers.ros.org/question/12870/rosmaster-unresponsive/?answer=19084#post-id-19084
Reply | Threaded
Open this post in threaded view
|

Re: How to improve mapping accuracy based on ArUco identification code?

xsasdA
This post was updated on .
In reply to this post by matlabbe
Hello Mathieu,

I've tried some more things, for example adding the specific version of apriltag with EXACT in CMakeLists of rtabmap and also making it not optional. I did the same thing for OpenCV 3.4.2 in all packages that depend on it, like rtabmap, cv_bridge etc. I tried different versions of both apriltag_ros and apriltag and OpenCV.
I also tried to set the definition WITH_APRILTAG_ROS in rtabmaps CMakeLists.txt, no matter if the package is found or not.
Still, the function CoreWrapper::tagDetectionsAsyncCallback does not get called. I made sure to not overlook a warning message by using ROS_ERROR.

Best regards
xsasda

EDIT: Today I installed Ubuntu 20.04 with ROS Noetic on an other partition to run the whole project again, to see if this changes up something. Unfortunately that also didn't help triggering the tag callback. :(
Reply | Threaded
Open this post in threaded view
|

Re: How to improve mapping accuracy based on ArUco identification code?

xsasdA
In reply to this post by matlabbe
Hey Mathieu,

it is actually working now. I was somewhat lost and forgot to remap tag_detections to /tag_detections topic...

Thank you very much for your help. Now, markers actually are shown in 3D map and Graph View.

I have some follow-up questions regarding Marker/Priors, because every time I enable them with my measured global coordinates of the tag the map looks kinda scuffed (one part of the map is rotated in two different angles). Maybe I measured the angles in a wrong way or I mixed up coordinates/angles. But I think I will create a new issue for this in order to not flood this one.

Best regards
xsasda
Reply | Threaded
Open this post in threaded view
|

Re: How to improve mapping accuracy based on ArUco identification code?

matlabbe
Administrator
Hi,

For a callback not called, I often do "rosnode info ..." or rqt_graph to see to which topic a node is actually listening to in case a remap is wrong like in your case.

For the prior stuff, yes a new post is maybe better. If you can provide the database it can help also to debug.

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: How to improve mapping accuracy based on ArUco identification code?

xsasdA
This post was updated on .
Hello Mathieu,

thank you. I completely forgot about these in the process because I was so focused on the error itself that I didn't think about looking the graph again.

Ok, I will post an other issue with this topic. Should I do it on GitHub issue/discussion or here? Which of these forums / issue trackers is the best for this?

Edit: I decided to post it on your rtabmap_ros Github Repo. I hope it fits there.
12