Imagine having a climbing wall and you take 4 adjacent handholds and footholds where together they create a stance. Is there any algorithm or technique with which it would give you a realistic human pose? Currently im adjusting the skeleton by firstly finding the center of the 4 holds where then i construct the chest shoulder and pelvis accordingly. And by the use of IK i give position to the remaining limbs being which the arms and legs. Is there any other more elegant/better technique how to do such positioning of a skeleton ? As how i am adjusting the skeleton isnt so much of a realistic pose.All is done in 2D
To find a good algorithm for such a stance will take quite some time, observation and testing, I don't think you will find a "one-fits-all" solution on the internet.
There is a lot you have to consider for skeletons climbing obstacles and I assume you don't only want it to take a certain stance, but to move from one to another in a realistic way.
"Specific Stance" is a little to abstract, a specific stance could be:
in this case the arms and legs will almost be equally stretched, the body will be closer to the wall
depening on the distance the skeleton can have really bent legs to make it look like he is about to make a big leap upwards, or stretched legs if he tries to climb and pull himself up.
These are just simple examples, there are many more things and actions to be taken into consideration for a correct stance.
You can start by defining which stances you want, and which transitions from which stances you want. Then analyse some rock climbing videos on youtube (or yourself if you're a climber) for the look and feel of your stance and/or transition.
The easiest way will probably be to only implement the skeletons back and pelvis position (or movements for transitions) relative to the center of the 4 handholds/footholds, depending on the stance you want (centered, or lowered for a leap..). Then place the hands and feet on the hand/footholds.
The rest is adjusting your min/max angles for the knees and elbows, which will require some testing until you find something that looks good for you.