MATLAB 機器人學工具箱(Robotics Toolbox )sl_drivepoint 模型 consecutive zero crossings 問題


操作環境

  • 工具箱:Robotics Toolbox for MATLAB 版本 10.2.1 作者 Peter Corke
  • MATLAB版本:R2018a
  • 操作系統:win10

問題

sl_drivepoint模型在使用時出現過零檢測錯誤問題,仿真波形錯誤,機器人向相反的方向走,matlab報錯如下。

An error occurred while running the simulation and the simulation was terminated
Caused by:
During the simulation of model 'sl_drivepoint', 2 zero crossing signal(s) exceeded the maximum number of 1000 consecutive zero crossings at time 0.89480252115574577 and therefore, the simulation will stop.
  Suggested Actions
  You can suppress the diagnostics and continue simulation without bracketing these zero crossings, by switching the zero crossing detection algorithm to 'Adaptive' and setting the Consecutive zero crossings violation diagnostic to 'none'.

原因

下圖模塊中angadff()函數使用錯誤,角度相減時順序顛倒。
問題模塊

解決方案

修改為下圖所示。
修改方案


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM