robotmathmaticalmodel.cpp
来自「InnovLabSimu在vc++下实现」· C++ 代码 · 共 19 行
CPP
19 行
//#include "StdAfx.h"
#include "RobotMathmaticalModel.h"
CRobotMathmaticalModel::CRobotMathmaticalModel(void)
{
}
CRobotMathmaticalModel::~CRobotMathmaticalModel(void)
{
}
// 速度运动模型,用机器人的线速度、角速度计算左右轮速
bool CRobotMathmaticalModel::VelocityMotionModel(float LinearVel, float AngularVel,float RobotWidth)
{
m_dLeftSpeed=LinearVel+RobotWidth*AngularVel;//5/2=2.5
m_dRightSpeed=LinearVel-RobotWidth*AngularVel;
return SafeLRSpeedLimit(m_dLeftSpeed,m_dRightSpeed);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?