We have joy_node always running but the joystick is only connected in need to teleop the robot. I noticed that when it is not connected and the node is launched, it uses a lot of CPU. I tracked down the high CPU consumption to this line.
Why do we we need to call SDL_Quit in this loop? Is there a better way to avoid the high CPU consumption?