资源简介
这个代码是做了一个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 高清
相关资源
- Sound Control 2.2.3 For Mac
- 数值分析第二版 Numerical Analysis 2nd T
- Realtek Audio Control的uwp版独立安装包
- 数字图像处理大作业.zip
- Modern_Robotics_Mechanics Planning and Control
- GrblController中文版
- DE2_115_ControlPanel_V2.2.0
- unity 多点触控插件Touch Controls Kit v1.
- MODERN ROBOTICS MECHANICS PLANNING AND CONTROL
- Nanonis SPM Controller Help
- 模型预测控制学习实用教材
- 火力发电厂含有SVG无功补偿装置的并
- Observers in Control Systems
- Dynamic Programming and optimal control
- MPPT控制的可运行程序合辑
- Dev-Express-之GridControl详解(图文并茂)
- puremvc 框架源码及教程 附带一个使用
- mc_att_control源码简单分析.pdf
- psychtoolbox教程
- 大家期待的 STM32 MOTOR CONTROL SDK 5.01
- Model Predictive Control: Theory and Design
- Altera 官方SDRAM_controller IP CORE源代码
- USB-Serial Controller D驱动
- A Concise Introduction to Pure Mathematics by
- Ultimate Character Controller Integrations_201
- Robust and Optimal Control
- IntroductiontoRoboticsMechanicsandControl机器人
- grbl controller 3.4.6
- tucker分解工具包
- GrblController361 汉化版,能用,用来写
评论
共有 条评论