# FUNMAP implementation using wrist D405 camera

**URL:** <https://forum.hello-robot.com/t/funmap-implementation-using-wrist-d405-camera/1164>\
**Category:** Ask\
**Created:** [November 14, 2024, 10:21am UTC](https://forum.hello-robot.com/t/funmap-implementation-using-wrist-d405-camera/1164 "2024-11-14T10:21:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Davide\_Peron](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/davide_peron/32/901_2.png) [@Davide\_Peron](https://forum.hello-robot.com/u/Davide_Peron)\
**Post date:** [November 14, 2024, 10:21am UTC](https://forum.hello-robot.com/t/funmap-implementation-using-wrist-d405-camera/1164/1 "2024-11-14T10:21:32Z")

</div>

We are looking to utilize the D405 wrist camera for plane detection using FUNMAP. In our application, the head camera’s vision may become occluded, so switching to the wrist camera would be beneficial.  
Could you please provide suggestions or guidance on how to modify the ros2\_stretch\_FUNMAP package to use the wrist camera instead of the head scans?

Thank you for your assistance!

---

<div class="post-metadata">

**Author:** ![bshah](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/bshah/32/55_2.png) [@bshah](https://forum.hello-robot.com/u/bshah)\
**Post date:** [November 15, 2024, 3:18pm UTC](https://forum.hello-robot.com/t/funmap-implementation-using-wrist-d405-camera/1164/2 "2024-11-15T15:18:03Z")

</div>

Hey @Davide_Peron, FUNMAP’s [`fit_closest_flat_surface()`](https://github.com/hello-robot/stretch_ros2/blob/9a44eee2933c5c171f9504aae69c3bb6becf0443/stretch_funmap/stretch_funmap/segment_max_height_image.py#L217) method could work for this.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/hello_robot2/original/1X/ce6daedee427cc487ac87f0f2a8468e5a3017caa.png)

It takes in a max height image (MHI), the robot’s position in image space, and a debug boolean. The FUNMAP node already tracks the robot’s position in image space, so you could just use that. Constructing the MHI from the D405 wrist camera is possible; here’s code showing how it’s done with the D435if head camera:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/hello_robot2/original/1X/62446e55c2cddb8a761feb253327b5bdaf3212f9.png)  
Github Link: [stretch\_ros2/stretch\_funmap/stretch\_funmap/mapping.py at 9a44eee2933c5c171f9504aae69c3bb6becf0443 · hello-robot/stretch\_ros2 · GitHub](https://github.com/hello-robot/stretch_ros2/blob/9a44eee2933c5c171f9504aae69c3bb6becf0443/stretch_funmap/stretch_funmap/mapping.py#L340-L355)

---

<div class="post-metadata">

**Author:** ![Davide\_Peron](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/davide_peron/32/901_2.png) [@Davide\_Peron](https://forum.hello-robot.com/u/Davide_Peron)\
**Post date:** [November 18, 2024, 8:27am UTC](https://forum.hello-robot.com/t/funmap-implementation-using-wrist-d405-camera/1164/3 "2024-11-18T08:27:03Z")

</div>

Thanks, and we will try to follow your suggestions.
