how can i calculate kP and b in the formula: pwmVel = K_P * cmdVel.linear.x + b [closed]

asked 2021-08-30 21:41:13 -0500

dungton gravatar image

// Calculate the PWM value given the desired velocity

 pwmLeftReq = K_P * cmdVel.linear.x + b;
 pwmRightReq = K_P * cmdVel.linear.x + b;

// Proportional constant, which was measured by measuring the PWM-Linear Velocity relationship for the robot.

  const int K_P = 278;

// Y-intercept for the PWM-Linear Velocity relationship for the robot.

   const int b = 52;

I read the book Practical robotics in c++ and I didn't find how kP and b are calculated or is it just a constant based on the characteristic of a particular robot. Please someone point it out to me, thanks everyone.

edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant. Please see http://wiki.ros.org/Support for more details. by jarvisschultz
close date 2021-08-31 12:08:14.920054

Comments

It seems this question has nothing to do with ROS. Maybe try something like https://robotics.stackexchange.com/ for this question.

jarvisschultz gravatar image jarvisschultz  ( 2021-08-31 12:08:56 -0500 )edit