Robot_hat srv file?

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

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

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.

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

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!

Wishing you smooth development, and Happy coding!

1 Like