  Stability and safety are critical properties for successful deployment of
automatic control systems. As a motivating example, consider autonomous mobile
robot navigation in a complex environment. A control design that generalizes to
different operational conditions requires a model of the system dynamics,
robustness to modeling errors, and satisfaction of safety \NEWZL{constraints},
such as collision avoidance. This paper develops a neural ordinary differential
equation network to learn the dynamics of a Hamiltonian system from trajectory
data. The learned Hamiltonian model is used to synthesize an energy-shaping
passivity-based controller and analyze its \emph{robustness} to uncertainty in
the learned model and its \emph{safety} with respect to constraints imposed by
the environment. Given a desired reference path for the system, we extend our
design using a virtual reference governor to achieve tracking control. The
governor state serves as a regulation point that moves along the reference path
adaptively, balancing the system energy level, model uncertainty bounds, and
distance to safety violation to guarantee robustness and safety. Our
Hamiltonian dynamics learning and tracking control techniques are demonstrated
on \Revised{simulated hexarotor and quadrotor robots} navigating in cluttered
3D environments.
