While I can't comment on the movie version of the Dinobots, their original origin came from the TransformersTransformers cartoon, where some dinosaur bones were found sealed away in the mountain that the Ark had crashed into. The Autobot medic, Ratchet, decided to try and put some new robots together based on the shapes of the dinosaur remains that were found. They were supposed to be the "answer" to the Decepticons' newest creation at the time, the Constructicons. At
At first, Grimlock was a bit belligerent and chafed under Optimus Prime's leadership. In later seasons of the cartoon however, Grimlock mellows out considerably and ends up more as comic relief in the show in the vein of "Me Grimlock (insert joke here)".