How to animate different parts of a robot arm I am trying to make a robot arm.  

I am able to add animation to one of the objects easily, but then whenever I try to add animation to other objects there is distortion in the first animation.  

What I tried:  


I have used parent relation but somehow changes in the child are effecting the animation of the parent.  
I tried using bones and armature but exporting that as a .glb file is giving another time, all the animations and figures are getting distorted.


Is there a better way to do it?
Any help would be appreciated.
Well, this is not the right way of using blender, turns out you need to animate all the objecst in a single frame and then you can make subclips based on what clips you want, this can be done using three.js Utilities