關於Matlab2019a+Matlab2019b使用Peter cork robotics tool box 中報錯的解決方案

簡介

這個主要羅列一些使用Peter cork robotics tool box遇到的問題彙總和解決方案,會進行持續更新,今天先上第一個問題,之前從頭擼到尾的時候其實還是遇到很多問題了,只是當初沒那個意識記錄問題,現在遇到一個寫一個,記錄一個。

問題1:當使用移動底盤simlink仿真遇到很多關於zero crossings報錯,報錯內容大概如下

Warning: Starting at time 1.2008920164367514, Simulink detected 1000 consecutive zero crossings within a time interval of 1.4210854715202004e-11. In order to let simulation proceed and not hang, the adaptive zero-crossing detection algorithm will accept the current step size (0.019107983549037755) without reducing it any further. The zero crossings signals causing these consecutive events (or whose events are not being bracketed) are listed below.

問題1解決方案:

其實這個問題很奇怪,很難發現,一開始以爲是tool box version 和matlab version不匹配造成這個報錯,後來換了幾個版本也不行,猜測應該是有工具箱函數和內部函數有衝突,這裏有一個angdiff這個函數,然後使用如下命令進行查找

which angdiff

竟然發現是默認的mathwork提供的一個包,也就是和peter cork給的函數不一樣,但是默認調用是mathwork提供的,解決方案也很簡單。
刪除mathwork提供的robotics 包即可,刪除方法直接點擊add-ons即可刪除

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章