We present the continuous model of a mobile slender mechanism that is intended to be the structure of an autonomous hyper-redundant slender robotic system. Rigid body degrees-of-freedom (DOF) and deformability are coupled through a Lagrangian weak formulation that includes control inputs to achieve forward locomotion and shape tracking. The forward locomotion and the shape tracking are associated to the coupling with a substrate that models a generic environment with which the mechanism could interact. The assumption of small deformations around rigid body placements allows to adopt the floating reference kinematic description. By posing the distributed parameter control problem in weak form, we naturally introduce an approximate solution technique based on Galerkin projection on the linear mode shapes of the Timoshenko beam model that is adopted to describe the body of the system. Simulation results illustrate coupling among forward motion and shape tracking as described by the equations governing the system.