I am trying to learn how to auto dock the robot using ArUco markers, so that I might be able to do more interesting things with the ArUco Tags in the future. I have the auto-docking station from hello robot and I have found a few posts on the forum on auto docking and aruco marker detection. I was wondering if there are any more current scripts that I could begin to play with the aruco detection? Everytime I run the stretch_aruco.launch file in stretch_core, I get the following error.
Hey @jgangemi, We are sorry you are facing this issue. Could you also send us the ros logs of this failure to better understand the issue? For each roslaunch an /run_id is set and all the verbose output logs are stored in the path ~/.ros/log/[run_id]/*. Alternatively, you can also find the ros logs of the latest session at ~/.ros/log/latest/*.
In meantime could you also try running the command roslaunch stretch_core d435i_high_resolution.launch in another terminal before running the command roslaunch stretch_core stretch_aruco.launch?
The detect_aruco_markers node subscribes to the depth camera’s point cloud and RGB image stream.
Hello Mohamed, thank you for your help! I tried launching the depth camera in a separate terminal before, however, I ran into the same error. I sent the hello robot support email a copy of all of the ros logs that were created when I did this, since the forum did not allow me to attach them here. Please let me know what you think, thank you!
Hi Michal, no update yet. I sent the ROS logs to the support team and they were not able to locate the problem yet. They told me to try launching the camera first using the command roslaunch stretch_core d435i_high_resolution.launch before launching the aruco detector. This did not fix the issue, as although I get a hardware warning sometime the camera is still launching fine. Additionally, they told me to make sure my repo was still up to date with the dev/noetic branch, which it was, so this did not fix the issue either. Not sure if either of those ideas are helpful to you… I am still trying to figure it out and will keep you updated if I find any more insight!
@Michal, welcome to the forum, and thanks for reporting that you are facing a similar issue. Just to be sure that your case is not unrelated, could you confirm your robot serial number and describe the failure mode?
@jgangemi, thank you for being patient with this and relaying the steps to @Michal. Does the stretch_aruco.launch fail for you consistently? One failure mode that we are aware of is when the D435i fails to configure at times and errors out with a message like:
@jgangemi thanks for the tips! unfortunately that didn’t help me either @chintujaguar I first checked how often the D435i fails and it was 4 out of 10 times with the same message that you sent. Then i checked the stretch_aruco.launch and it failed every time both when the D435i fails as well as not.
My robot serial number is stretch-re2-2019
Failure mode: same as @jgangemi, whenever i launch stretch_aruco.launch file in stretch_core i get this error:
process[detect_aruco_markers-1]: started with pid 
[INFO] [1676880820.792139]: /detect_aruco_markers started
[detect_aruco_markers-1] process has died [pid 13636, exit code -11, cmd /home/hello-robot/catkin_ws/src/stretch_ros/stretch_core/nodes/detect_aruco_markers __name:=detect_aruco_markers __log:=/home/hello-robot/.ros/log/6c5121bc-b0f6-11ed-b1de-671a0574154a/detect_aruco_markers-1.log].
log file: /home/hello-robot/.ros/log/6c5121bc-b0f6-11ed-b1de-671a0574154a/detect_aruco_markers-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
@Michal, thank you for getting back with your robot number and the failure stat, it does seem pretty high. We are trying to recreate the issue on our robots and will get back to you soon with a resolution.
Yes, the stretch_aruco.launch fails for me every time. I ran roslaunch stretch_core d435i_high_resolution.launch 10 times, and 7 times out of 10 I got the same error message. It only launched correctly three times. Additionally, the three times it did launch correctly, I tried launching the aruco detector and it failed every time with the same message as Michal.
Thank you, @jgangemi and @Michal, for your patience. We were able to reproduce this issue of Aruco detector node shutting down abruptly without any error traceback outputs to the ros logs. The root cause of the problem we found was that the version of the python package opencv-contrib-python was lower than the most recently released version which is v4.7. And the recent developments in aruco detector node had changes pushed to support the latest opencv-contrib-python API changes.
I recommend upgrading the opencv-contrib-python package to the latest and retrying the Aruco detector node. You can do it with the command pip3 install opencv-contrib-python --upgrade.
Please let us know if this fixes your issues. Or else please feel free to reach out to us at firstname.lastname@example.org for further support.