I created a two-wheeled platform that I want to stabilize. But I do not understand through which device or through the program code to do this.
I expect the platform to be upright.
You probably need to add a Gyro (https://www.cyberbotics.com/doc/reference/gyro) and an Inertial Unit (https://cyberbotics.com/doc/reference/inertialunit) to know the angle of the robot and the rotation speed.
You can also find an example of this (not exactly similar as it use a position sensor to know the angle of another Solid node) here: https://robotbenchmark.net/benchmark/inverted_pendulum/