# ArUco Markers and Auto-Docking

**URL:** <https://forum.hello-robot.com/t/aruco-markers-and-auto-docking/587>\
**Category:** Ask\
**Created:** [February 13, 2023, 5:49pm UTC](https://forum.hello-robot.com/t/aruco-markers-and-auto-docking/587 "2023-02-13T17:49:06Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![jgangemi](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@jgangemi](https://forum.hello-robot.com/u/jgangemi)\
**Post date:** [February 13, 2023, 5:49pm UTC](https://forum.hello-robot.com/t/aruco-markers-and-auto-docking/587/1 "2023-02-13T17:49:07Z")

</div>

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.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/hello_robot2/original/1X/7274dc211fd53e509eea698f1885bc73a542183f.png)  
Any ideas what could be happening? Thank you!!

---

<div class="post-metadata">

**Author:** ![Mohamed\_Fazil](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/mohamed_fazil/32/261_2.png) [@Mohamed\_Fazil](https://forum.hello-robot.com/u/Mohamed_Fazil)\
**Post date:** [February 14, 2023, 12:42am UTC](https://forum.hello-robot.com/t/aruco-markers-and-auto-docking/587/2 "2023-02-14T00:42:57Z")

</div>

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](https://github.com/hello-robot/stretch_ros/blob/dev/noetic/stretch_core/nodes/detect_aruco_markers) node subscribes to the depth camera’s point cloud and RGB image stream.

---

<div class="post-metadata">

**Author:** ![jgangemi](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@jgangemi](https://forum.hello-robot.com/u/jgangemi)\
**Post date:** [February 15, 2023, 4:23pm UTC](https://forum.hello-robot.com/t/aruco-markers-and-auto-docking/587/3 "2023-02-15T16:23:05Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Michal](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@Michal](https://forum.hello-robot.com/u/Michal)\
**Post date:** [February 17, 2023, 3:18pm UTC](https://forum.hello-robot.com/t/aruco-markers-and-auto-docking/587/4 "2023-02-17T15:18:13Z")

</div>

any update here? I have the same problem

---

<div class="post-metadata">

**Author:** ![jgangemi](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@jgangemi](https://forum.hello-robot.com/u/jgangemi)\
**Post date:** [February 17, 2023, 5:20pm UTC](https://forum.hello-robot.com/t/aruco-markers-and-auto-docking/587/5 "2023-02-17T17:20:29Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![chintujaguar](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/chintujaguar/32/260_2.png) [@chintujaguar](https://forum.hello-robot.com/u/chintujaguar)\
**Post date:** [February 18, 2023, 12:34am UTC](https://forum.hello-robot.com/t/aruco-markers-and-auto-docking/587/6 "2023-02-18T00:34:00Z")

</div>

@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:

```bash
Hardware Notification:Depth stream start failure,1.67648e+12,Error,Hardware Error

```

It is worth checking if this happens consistently for your camera unit by launching the D435i a few times using the below command:

```bash
roslaunch stretch_core d435i_high_resolution.launch

```

It would be helpful to know how many times the camera fails to boot out of, say, 10 times.

Best,  
Chintan

---

<div class="post-metadata">

**Author:** ![Michal](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@Michal](https://forum.hello-robot.com/u/Michal)\
**Post date:** [February 20, 2023, 8:14am UTC](https://forum.hello-robot.com/t/aruco-markers-and-auto-docking/587/7 "2023-02-20T08:14:20Z")

</div>

@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:

```auto
ROS_MASTER_URI=http://localhost:11311

process[detect_aruco_markers-1]: started with pid [13636]
[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
done

```

---

<div class="post-metadata">

**Author:** ![chintujaguar](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/chintujaguar/32/260_2.png) [@chintujaguar](https://forum.hello-robot.com/u/chintujaguar)\
**Post date:** [February 20, 2023, 3:36pm UTC](https://forum.hello-robot.com/t/aruco-markers-and-auto-docking/587/8 "2023-02-20T15:36:17Z")

</div>

@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.

Thank you,  
Chintan

---

<div class="post-metadata">

**Author:** ![jgangemi](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@jgangemi](https://forum.hello-robot.com/u/jgangemi)\
**Post date:** [February 20, 2023, 3:41pm UTC](https://forum.hello-robot.com/t/aruco-markers-and-auto-docking/587/9 "2023-02-20T15:41:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![chintujaguar](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/chintujaguar/32/260_2.png) [@chintujaguar](https://forum.hello-robot.com/u/chintujaguar)\
**Post date:** [February 20, 2023, 3:59pm UTC](https://forum.hello-robot.com/t/aruco-markers-and-auto-docking/587/10 "2023-02-20T15:59:29Z")

</div>

@jgangemi, thank you for confirming this behavior! We are working on this and will get back to you soon.

Chintan

---

<div class="post-metadata">

**Author:** ![Mohamed\_Fazil](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/mohamed_fazil/32/261_2.png) [@Mohamed\_Fazil](https://forum.hello-robot.com/u/Mohamed_Fazil)\
**Post date:** [February 23, 2023, 1:09am UTC](https://forum.hello-robot.com/t/aruco-markers-and-auto-docking/587/11 "2023-02-23T01:09:46Z")

</div>

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](https://pypi.org/project/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](https://github.com/hello-robot/stretch_ros/pull/86/files) 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 [support@hello-robot.com](mailto:support@hello-robot.com) for further support.

---

<div class="post-metadata">

**Author:** ![Michal](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@Michal](https://forum.hello-robot.com/u/Michal)\
**Post date:** [February 24, 2023, 8:12am UTC](https://forum.hello-robot.com/t/aruco-markers-and-auto-docking/587/12 "2023-02-24T08:12:17Z")

</div>

@Mohamed_Fazil this worked for me, thank you!
