更新轴距标定值
This commit is contained in:
@@ -5,8 +5,8 @@
|
|||||||
#include "by_debug.h"
|
#include "by_debug.h"
|
||||||
#include "by_can.h"
|
#include "by_can.h"
|
||||||
|
|
||||||
#define D_X (0.18f) // 底盘 Y 轴上两轮中心的间距
|
#define D_X (0.25f) // 底盘 Y 轴上两轮中心的间距
|
||||||
#define D_Y (0.25f) // 底盘 X 轴上两轮中心的间距
|
#define D_Y (0.28f) // 底盘 X 轴上两轮中心的间距
|
||||||
#define RX_RY ((D_X + D_Y) / 2.f)
|
#define RX_RY ((D_X + D_Y) / 2.f)
|
||||||
|
|
||||||
/**********************************************
|
/**********************************************
|
||||||
@@ -55,8 +55,8 @@ void by_motion_update_speed(void)
|
|||||||
v_wheel[3] = speed->v_x - speed->v_y - RX_RY * speed->v_w;
|
v_wheel[3] = speed->v_x - speed->v_y - RX_RY * speed->v_w;
|
||||||
|
|
||||||
// 根据安装方式调整轮子方向
|
// 根据安装方式调整轮子方向
|
||||||
v_wheel[1] *= -1;
|
v_wheel[1] *= -1.0f;
|
||||||
v_wheel[2] *= -1;
|
v_wheel[2] *= -1.0f;
|
||||||
|
|
||||||
for (uint8_t i = 0; i < 4; i++) {
|
for (uint8_t i = 0; i < 4; i++) {
|
||||||
motion_speed_data[i] = (int16_t)v_wheel[i];
|
motion_speed_data[i] = (int16_t)v_wheel[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user