v = (v_r + v_l)/2,ω = (v_r − v_l)/L

Input left and right wheel speeds, compute robot overall linear and angular velocity using the differential-drive model, for wheeled mobile robot motion control and odometry.

📐 计算公式
差速驱动运动学:线速度 v = (右轮速 v_r + 左轮速 v_l) ÷ 2(m/s);角速度 ω = (v_r − v_l) ÷ 轮距 L(rad/s)。校验:v_l、v_r、L 三项非空合法数值守卫,L=0 时除零落兜底。判据:无固定分级,两轮同速时 ω=0 走直线、差速越大转弯越急。

由左右轮速度求机器人线速度与角速度。

📌 计算说明
  • v=(v_r+v_l)/2。
  • 两轮不等速产生转向。