Migrated applyAccelerationConstraints to use RobotTrajectory.