The declaration and the definition do not match:
Declaration (note: two double
paramters`):
void compute_twist(SpeedCmd* s1, double m1, double m2);
Defintion (note: two int32_t
parameters):
void compute_twist(SpeedCmd* s, int32_t m1_speed, int32_t m2_speed)
For C++, these are two different functions. Calls such as: compute_twist(&actual_speed, motors[0].speed, motors[1].speed);
have seen the declaration with double
parameters and expect such a function. But the only definition (implementation) provided uses int32_t
parameters. So the linker correctly complains about the missing function with double
parameters.
I guess it should be obvious how to fix it.