#!/usr/bin/env python3
"""Publish identity 3x3 homography to /arm/panel/homography (sendXY == imageXY)."""

import rclpy
from rclpy.node import Node
from std_msgs.msg import Float64MultiArray


class IdentityHomographyPublisher(Node):
    def __init__(self, topic: str):
        super().__init__("identity_homography_publisher")
        pub = self.create_publisher(Float64MultiArray, topic, 10)
        msg = Float64MultiArray()
        msg.data = [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
        pub.publish(msg)
        self.get_logger().info(f"Published identity homography once on {topic}")


def main():
    rclpy.init()
    node = IdentityHomographyPublisher("/arm/panel/homography")
    node.destroy_node()
    rclpy.shutdown()


if __name__ == "__main__":
    main()
