Ratchet is the Autobots' medical officer of considerable skill and renown. He's only cranky when he's getting shot at, due to having a dry wit, often giving his wounded comrades a hard time for taking hits he somehow avoids.
He is also a good friend of Optimus Prime, you'd be hard-pressed to find another Autobot who loves his leader as much as he does. He's as flawed as any normal being would be, and a huge vice is his Cybertronian pride. At least once, it's nearly cost him the life of a friend. Furthermore, his grief for his destroyed home world is what drives him. He didn't take the loss of Cybertron very well, and would do almost anything to get it back some day.