Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed-rtos mbed QEI BNO055 MPU6050_DMP_Nucleo-I2Cdev virgo3_imuHandler_Orion_PCB MAX17048 Servo
Fork of Orion_newPCB_test by
kinematics.cpp
00001 #include "kinematics.h" 00002 00003 kinematics::kinematics() 00004 { 00005 wheelDia = wheel_dia; 00006 trackWidth = track_width; 00007 00008 } 00009 00010 void kinematics::VW_RPM(float velocity, float omega, float* left_rpm, float* right_rpm) 00011 { 00012 *right_rpm = (velocity + (omega * trackWidth / 2)) * (60.0 / (M_PI * wheelDia)); 00013 *left_rpm = (velocity - (omega * trackWidth / 2)) * (60.0 / (M_PI * wheelDia)); 00014 00015 /* 00016 if(*right_rpm > 100) 00017 *right_rpm = generalFunctions::constrain_f(*right_rpm, min_rpm, max_rpm); 00018 else 00019 *right_rpm = 0; 00020 00021 if(*left_rpm > 100) 00022 *left_rpm = generalFunctions::constrain_f(*left_rpm, min_rpm, max_rpm); 00023 else 00024 *left_rpm = 0; 00025 */ 00026 }
Generated on Tue Jul 12 2022 20:53:07 by
1.7.2
