# Robot\_hat srv file?

**URL:** <https://forum.sunfounder.com/t/robot-hat-srv-file/3401>\
**Category:** Robotic kit for Raspberry Pi\
**Created:** [June 20, 2025, 5:32pm UTC](https://forum.sunfounder.com/t/robot-hat-srv-file/3401 "2025-06-20T17:32:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spf650](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@Spf650](https://forum.sunfounder.com/u/Spf650)\
**Post date:** [June 20, 2025, 5:32pm UTC](https://forum.sunfounder.com/t/robot-hat-srv-file/3401/1 "2025-06-20T17:32:38Z")

</div>

Hi,  
some time ago I created a simple ROS environment for controlling pidog.

I’m now looking at creating something much more complex and offloading some of the behavioral/AI workload to a pironman5 as a set of distributed ros nodes to facilitate this extra complexity.

The project was my first foray into ROS and python, and in hindsight they were naively written (inefficient, difficult to maintain etc.) So I wish to rewrite most/all of them to start my new project, and I’m looking around at what others have done just to get some ideas and possible alternative methods.

I noticed that Sunfounder created a couple of hat nodes about 2 years ago here

> **[robot\_hat\_ros/robot\_hat\_ros at main · sunfounder/robot\_hat\_ros](https://github.com/sunfounder/robot_hat_ros/tree/main/robot_hat_ros)**
>
> Robot Hat package for ROS2. Contribute to sunfounder/robot\_hat\_ros development by creating an account on GitHub.

I’ve downloaded this package and it builds fine via colcon,

`>:ros2 pkg executables robot_hat_ros`

robot\_hat\_ros grayscale\_3ch  
robot\_hat\_ros mcu  
robot\_hat\_ros test  
robot\_hat\_ros ultrasonic

however I get a runtime error

`from robot_hat_ros.srv import RegisterADC, RemoveADC ModuleNotFoundError: No module named 'robot_hat_ros.srv`

For reference, Cmakelists.txt is copied below from the above package

find\_package(geometry\_msgs REQUIRED)  
find\_package(rosidl\_default\_generators REQUIRED)  
rosidl\_generate\_interfaces(${robot\_hat\_ros}  
“srv/RegisterADC.srv”  
“srv/RemoveADC.srv”  
)

but I don’t have those ADC service files to generate robot\_hat\_ros.srv

I just wondered if anyone at Sunfounder still had these file to nudge me in the right direction!

Thanks

---

<div class="post-metadata">

**Author:** ![Spf650](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@Spf650](https://forum.sunfounder.com/u/Spf650)\
**Post date:** [June 24, 2025, 5:27pm UTC](https://forum.sunfounder.com/t/robot-hat-srv-file/3401/2 "2025-06-24T17:27:15Z")

</div>

Hi, I’ll assume that as there was no answer, that these files are not available.

They should be only about 4 or 5 lines of code, which I should be able to derive from the existing client and server code. Thanks anyway.

---

<div class="post-metadata">

**Author:** ![SunFounder\_Moderator](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SunFounder\_Moderator](https://forum.sunfounder.com/u/SunFounder_Moderator)\
**Post date:** [June 25, 2025, 6:24am UTC](https://forum.sunfounder.com/t/robot-hat-srv-file/3401/3 "2025-06-25T06:24:55Z")

</div>

Sorry this repository was a temporary test repository created a long time ago and has since been deprecated. We currently do not have any ROS components written for robotics

---

<div class="post-metadata">

**Author:** ![Spf650](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@Spf650](https://forum.sunfounder.com/u/Spf650)\
**Post date:** [June 25, 2025, 7:53am UTC](https://forum.sunfounder.com/t/robot-hat-srv-file/3401/4 "2025-06-25T07:53:11Z")

</div>

No problem, Ive got it running now anyway. I have ROS nodes written for most of pidog hardware, IMU, camera, ultrasonics, servos etc I only wanted to see how you’d approached the problem as to where I could improve. I now have this information.

My next step is to bring all the messages from these nodes to a central “brain” for arbitration and autonomy, probably off loaded to a pironman5.

I’ll start with a fairly simple subsumption architecture and see how it goes!

---

<div class="post-metadata">

**Author:** ![SunFounder\_Moderator](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SunFounder\_Moderator](https://forum.sunfounder.com/u/SunFounder_Moderator)\
**Post date:** [June 26, 2025, 5:58am UTC](https://forum.sunfounder.com/t/robot-hat-srv-file/3401/5 "2025-06-26T05:58:14Z")

</div>

Wishing you smooth development, and Happy coding!
