30         msg = geometry_msgs.msg.Twist()

Where trans is tf from turtle1. There is a good tutorial that explains this in more detail: https://automaticaddison.com/working-with-tf2-in-ros-noetic/