Embodied AI Glossary中文

Python and C++

Python 与 C++(具身常用编程语言)Essential

The two languages embodied AI relies on most: Python for models and experiments, C++ for real-time control.

Embodied AI development runs on these two languages almost everywhere, with a fairly clear division of labor. Python is quick to write and has a rich ecosystem: deep-learning frameworks (PyTorch, JAX), simulation training (Isaac Lab, MuJoCo's Python bindings), data processing, and VLA model training are nearly all done in it. C++ runs efficiently with predictable latency, which suits the parts that need hard real-time guarantees: low-level motor control, whole-body control, motion planning, sensor drivers, high-performance ROS nodes, and most robot manufacturers' SDKs. A common pattern is to train a policy in Python, then export the model to be loaded and run in C++, or to have a Python layer on top call down into a C++ library. Newcomers usually get comfortable with Python first, then pick up C++ as their direction demands it.

ExampleA quadruped walking policy is trained in Python inside Isaac Lab, exported to ONNX (a general-purpose format for exchanging neural network models), and then run at a fixed rate inside a C++ control program that sends out motor commands.

Also called
Python, C++
Related
PyTorch · Robot Operating System 2 · Software Development Kit · TorchScript (torch.jit) / LibTorch · Real-Time Control
Sources
Python official site
ROS 2 Client Libraries (rclcpp / rclpy)

See it in the full glossary →