import rclpy
from rclpy.node import Node


class myNode(Node):  # Class that inherits from node
    def __init__(self):
        super().__init__("First_Node")  # Initialise the node and give it the name which will be visable in ROS2
        self.create_timer(1.0, self.timer_callback)

    def timer_callback(self):
        self.get_logger().info("Hello")


def main(args=None):
    # Initalise ROS2 communications
    rclpy.init(args=args)

    # Start the node
    node = myNode()
    rclpy.spin(node)

    # Shutdown ROS2 communication
    rclpy.shutdown()


if __name__ == '__main__':
    main()
