Investigating Lagrangian Neural Networks for Infinite Horizon Planning in Quadrupedal Locomotion