How can I control a rig with gamepad or vr controller
The topic you are intrested in is called Motion Capture and is quite vast.
TLDR: depending on your use case probably can't because you cant track enough axis.
The old school way of doing this is to build a real world version of your rig. Then you attach motion sensors often called Internal Mesurment Unit (IMU) that mesure each movement axis of each physical represented bone. This principal also exist in form of motion capture suits where you slip in.
When you have the motion data for each frame per sensor you convert it to FBX or blender keyframes usualy by python code. You also can build a plugin for blender that takes realtime input from the motion sensors so you can fiddel around with your rig and see wat happens in blender (there probably exist comercial products doing this)
Of course you dont have to track the data for every bone, but than you have to calculate it ither by smart IK rigging or by calculating the missing data yourself.
With a Gamepad and VR controller you dont have enough axis of fredom you can track.
A VR controler gives tracked in a room gives you one tracked translation and rotation. So you can use it to manipulate one object. Of course you have some butons so you could togle thro your bones and place them one by one .. but this seems quite tedious to do.
I think ther exist some gamepats with tracking as well. But still you need to track more than one thing for most rigs.
Ther is a solution to capture your motion to a rig using the Kinekt depth sensor for blender.
If you want to do lo entry cost motion capute probably motion capture via computer vision from webcam or video data is your way to go. There exist comercial products doing this.. and also code from research papers were you have to fiddle your way through.