Skip to main content
Version: 1.0.1

Warning Systems

Hardware​

Warning system outputs are configured to control standard components such as warning lights and buzzers. Two drivers are allocated for the lighting system, and one driver is designated for a warning buzzer/horn.

Connector Pinout​


Warning Systems Specifications​


ParameterValue
OnstateSinks up to 24V
Drive Current2A
ControllabilityON/OFF
Number of Sinks3

SVG Image created as Graphical Drawings-Warning_Buzzer.svg date 2025/02/06 13:37:17 Image generated by Eeschema-SVGGND0-24VWarning BuzzerWARNxOnboardAutomateProGND0-24VWarning BuzzerSVG Image created as Graphical Drawings-Warning_System.svg date 2025/02/06 13:37:17 Image generated by Eeschema-SVG0-24VGNDWARNxOnboardAutomatePro0-24VGND


ROS API​

Subscribers​

TopicTypeDescription
/io/warning_system_outautomatepro_interfaces/msg/WarningSystemsPublish the desired states for the warning system to this topic.

Inputs:
warning_system_id:
DataType: uint8
(Use ENUM constants defined in msg definition. Options WarningSystems.WARNING_BUZZER, WarningSystems.WARNING_LIGHT1, WarningSystems.WARNING_LIGHT_2)

state:
DataType: bool
(Use ENUM constants defined in msg definiton. Options WarningSystems.ON, WarningSystems.OFF)

Response Rate: 200 ms

Example​

Example code snippet toggles the Warning Buzzer ON/OFF by publishing to the /io/warning_system_out topic.
ROS package can be found here.

import rclpy
from rclpy.node import Node
from automatepro_interfaces.msg import WarningSystems

class WarningSystemsPublisher(Node):

def __init__(self):
super().__init__('warning_systems_publisher')
self.publisher_ = self.create_publisher(WarningSystems, '/io/warning_system_out', 10)
self.timer = self.create_timer(1.0, self.timer_callback) # 1s
self.state = False

def timer_callback(self):
msg = WarningSystems()
msg.warning_system_id = WarningSystems.WARNING_BUZZER
msg.state = self.state
self.publisher_.publish(msg)
self.get_logger().info(
'Publishing WarningSystems: warning_system_id=%d, state=%d' %
(msg.warning_system_id, msg.state))
self.state = not self.state # Toggle state

def main(args=None):
rclpy.init(args=args)
node = WarningSystemsPublisher()
rclpy.spin(node)
node.destroy_node()
rclpy.shutdown()

if __name__ == '__main__':
main()

Run the node using the following command:

ros2 run automatepro_python_tutorials warning_system_out_node