Hybrid Trajectory Optimization for Autonomous Terrain Traversal of Articulated Tracked Robots