Two languages, two jobs
Walk into most robotics codebases today and you'll find both Python and C++ living side by side, and that's not an accident or a leftover from history, it's a deliberate division of labor. Python is popular for prototyping, data analysis, and the AI and machine learning pipelines that train and evaluate a robot's perception or decision-making models, because it's fast to write, easy to read, and has a huge ecosystem of libraries for exactly that kind of work.
C++ dominates the other half of the codebase: the parts that talk directly to motors, encoders, and sensors, and that have to run on a strict, repeating schedule no matter what else the system is doing. That's not a matter of taste or tradition, it comes down to a specific technical property Python doesn't offer in the same way, direct and predictable control over how a program uses time and memory.
