AR_Motors: add frame type Omni3Mecanum

Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
This commit is contained in:
Rhys Mainwaring 2024-07-15 21:07:35 +01:00 committed by Randy Mackay
parent e93b3722c9
commit 4de8e04679
2 changed files with 8 additions and 0 deletions

View File

@ -647,6 +647,13 @@ void AP_MotorsUGV::setup_omni()
add_omni_motor(2, 0.0f, -1.0f, 1.0f); add_omni_motor(2, 0.0f, -1.0f, 1.0f);
add_omni_motor(3, 1.0f, 0.0f, 0.0f); add_omni_motor(3, 1.0f, 0.0f, 0.0f);
break; break;
case FRAME_TYPE_OMNI3MECANUM:
_motors_num = 3;
add_omni_motor(0, -1.0f, 1.0f, -0.26795f);
add_omni_motor(1, 0.73205f, 1.0f, -0.73205f);
add_omni_motor(2, 0.26795f, 1.0f, 1.0f);
break;
} }
} }

View File

@ -27,6 +27,7 @@ public:
FRAME_TYPE_OMNI3 = 1, FRAME_TYPE_OMNI3 = 1,
FRAME_TYPE_OMNIX = 2, FRAME_TYPE_OMNIX = 2,
FRAME_TYPE_OMNIPLUS = 3, FRAME_TYPE_OMNIPLUS = 3,
FRAME_TYPE_OMNI3MECANUM = 4,
}; };
// initialise motors // initialise motors