C++ Source Code Question

Hello All,

Hope everyone are doing well and stay safe. I have a quick question regarding the source code.

In the picture above, the update function is to minimize the error between set point and current point by using a Proportional controller P=2.25 (Error* P Gain) based on my understanding. But we also use a PID controller in the .yaml file as shown below.
2

So I am confused what is the difference between these two controllers? Why do we have to add another PID contoller although the P controller is already assigned in the source code? Appreciate anyone who could help me.

Hello @tonyli19970130,

Yes you are right, the pid values are not required for the custom controller that you create, so you don’t need to set them.

1 Like