Ask Your Question

Ros2 Architecture / Best place for LED status?

asked 2020-12-19 19:27:29 -0600

Kajack gravatar image

I am working on a rover with 3 status LEDS for Rover is powered ( Green LED ) , ROS is running ( Blue LED ), and proximity alert ( Red ). I want to store 3 boolean values in one place where they can be updated by a service or update by subscribed topic, and I will plug in some Python code to manipulate some GPIO pins for the physical LEDs, but I am not sure what kind of Node to put the values in. I expect a service for sonar to publish something when something is too close. I am guessing a subscriber will control the physical LED, but should the values be stored in a Publisher that can connect to a service or Listen for a Topic?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-01-04 10:34:05 -0600

Kajack gravatar image

updated 2021-01-04 10:35:19 -0600

This has been coded a publisher ( system_status Node ) which outputs a json encoded dictionary, and a Subscriber ( LED_Display Node ) that decodes the system status dictionary and sets GPIOs connected to LED ). Additional service calls may be added to the system_status publisher later.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-12-19 19:27:29 -0600

Seen: 43 times

Last updated: Jan 04 '21