This small programm creates a simple joystick which controls the turtlesim_node. This example fits right in with the ros2 turtlesim tutorial.
Note: This node is not continuously sending. It will send a new twist command on change of the joystick.
Terminal1 :
python3 joystick
Terminal2 :
ros2 run turtlesim turtlesim_node