If your “climbing” surface is the same for all obstacles and the only one colliding with the obsticles is your player, then I recommend you use OnTriggerEnter and OnTriggerExit to detect when the player hits an obstacle.
If you need more information about the collision (e.g. to tweak your animation), you can use OnCollisionEnter/OnCollisionExit instead which gives you some information about the contact point and normal.