Text this: Trajectory optimization inspired pneumatic locomotion on compliant terrains