AttributeError: type object 'type' has no attribute '_TYPE_SUPPORT' This might be a ROS 1 message type but it should be a ROS 2 message type. Make sure to source your ROS2 workspace after your ROS 1 workspace

This looks like a mixup in sourcing. Are you running the ros1_bridge anywhere here? I’m asking because that could explain why it is looking for something in ROS1.

You can try launching your file in a new terminal and be sure of only sourcing ROS2 and your workspace:

source /opt/ros/foxy/setup.bash
source ~/ros2_ws/install/setup.bash