资源简介
这个代码是做了一个pure control demo,具体的文档见我的博客https://blog.csdn.net/caokaifa/article/details/91376997

代码片段和文件信息
function [closestPoint distance] = closestPointOnLine(pt1 pt2 refPt)
%This function is for internal use only. It may be removed in the future.
%closestPointOnLine Find a point closest to refPt (i.e. projection point) on line
% segment between pt1 and pt2. If the projected point is outside line
% segment then the closest vertex is returned. This function is used in
% robotics.algs.internal.PurePursuitbase class.
% Copyright 2016 The MathWorks Inc.
%#codegen
% Don‘t do any computation if points are equal
if isequal(pt1 pt2)
closestPoint = pt1;
distance = norm(refPt-closestPoint);
return;
end
% Vector from pt1 to pt2
v12 = pt2 - pt1;
% Vector from refPt to pt2
vr2 = pt2 - refPt;
% Projection of the vr2 on v12 normalized by norm(v12)
alpha = v12*vr2‘/(v12*v12‘);
% Find the closet point by interpolation
if alpha > 1
closestPoint = pt1;
elseif alpha < 0
closestPoint = pt2;
else
closestPoint = alpha.*pt1 + (1-alpha).*pt2;
end
distance = norm(refPt-closestPoint);
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-06-10 15:43 pure control\
文件 29657 2019-04-16 17:45 pure control\HelperPathAnalyzer.m
文件 43394 2019-06-10 15:42 pure control\LateralControlPurePursuit.slx
文件 5245 2019-06-10 15:43 pure control\LateralControlPurePursuit.slxc
文件 37245 2019-04-26 11:47 pure control\LateralControlPurePursuitCodeGen.slx
目录 0 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\
文件 813 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\LateralControlPurePursuit.bat
文件 60206 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\LateralControlPurePursuit.c
文件 46758 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\LateralControlPurePursuit.h
文件 13123 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\LateralControlPurePursuit.mk
文件 29766 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\LateralControlPurePursuit.obj
文件 135 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\LateralControlPurePursuit.rsp
文件 384 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\LateralControlPurePursuit_comp.rsp
文件 30202 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\LateralControlPurePursuit_data.c
文件 15573 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\LateralControlPurePursuit_data.obj
文件 1924 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\LateralControlPurePursuit_private.h
文件 0 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\LateralControlPurePursuit_ref.rsp
文件 1977 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\LateralControlPurePursuit_types.h
文件 39775 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\buildInfo.mat
文件 1508 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\builtin_typeid_types.h
文件 18626 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\codeInfo.mat
文件 820224 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\codedesc
文件 556 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\compileInfo.mat
文件 213 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\defines.txt
文件 78 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\mlEnv.txt
文件 33 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\modelsources.txt
文件 17345 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\multiword_types.h
文件 3323 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\rtGetInf.c
文件 841 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\rtGetInf.h
文件 1993 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\rtGetInf.obj
文件 2300 2019-05-19 15:16 pure control\LateralControlPurePursuit_grt_rtw\rtGetNaN.c
............此处省略670个文件信息
- 上一篇:旅行社客户管理系统课程设计
- 下一篇:激光雷达原理PDF 高清
相关资源
- BCG帮助手册,完整版_修正
- 编程实现二维DCT变换
- 图像二值化
- 用FFT对信号进行频谱分析
- Tone-Reservation
- QGA 量子遗传算法
- 差分形式的阻滞增长模型
- 遗传算法的M文件
- ProfControl系统对接手册
- Simulation of Active Heave Compensation System
- 简单二阶互联系统的非线性动力学分
- 基于Freemarker模板的代码生成器后台代
- USB-Serial-Controller_虚拟串口.rar
- The Existence of Optimal Control for Fully Cou
- AlphaControls14.23_20190502_Full_Source.rar
- Optimal control of the nonlinear one dimension
- s7epasrvx.exe CP2102_USB_to_UART_Bridge_Contro
- Size-Controlled Synthesis of LaF3:Eu3+ Nanopla
- Facile hydrothermal synthesis of Tb2(MoO4)
- 手写数字识别-模板匹配法
- Stock_Watson_动态因子分析模型
- 果蝇优化算法优化支持向量回归程序
- 自己做的一个简单GUI扑克纸牌识别-
- multi output SVR
- AR过程的线性建模过程与各种功率谱估
- PCNN TOOLBOX
- plstoolbox.zip
- 中国国家基础地理信息系统GIS数据
- 粒子群微电网优化调度
- 矩阵分析-经典教材-中文版-Roger.A.Ho
评论
共有 条评论