Robotics-Lagrangian- Calculation of Potential Energy http://www.flickr.com/photos/66943862@N06/7141839687 [Broken] The above png is from the Robotics Book by John Craig. Here Dynamic Modelling of a simple 2 link manipulator is being done using Lagrangian Dynamics. In Both Equations 6.82 & 6.83, I don't see where the 2nd term is coming from. i.e. Potential energy is mgh, in case 1, h = l1sin(theta) & case 2, h = d2sin(theta), so the first term in both the eqns are fine - but why is the 2nd term i.e m1l1g & m2d2maxg added?