From LLMs to Actions: Latent Codes as Bridges in Hierarchical Robot Control