- 博客(16)
- 资源 (1)
- 收藏
- 关注
原创 《无人驾驶车辆模型预测控制(第一版)》中的错误更正与代码解析(一)
《无人驾驶车辆模型预测控制(第一版)》中的错误更正与代码解析(一)以下内容针对**第三章**中的工程实例错误点 1问题分析中的运动学方程:[x˙ry˙rφ˙r]=[cosφsinφtanδf/l]vr\begin{bmatrix}\dot{x}_{r} \\ \dot{y}_{r}\\ \dot{\varphi}_{r}\\ \end{bmatrix}= \begin...
2019-03-27 08:46:14 10917 61
原创 【ROS节点订阅异常,必须在发布节点启动后再启动订阅节点才能收到订阅信息】
ROS节点订阅异常,必须在发布节点启动后再启动订阅节点才能收到订阅信息关闭roscore,并使用rosclean purge对ROS的log directory进行清理后,重启roscore,节点订阅恢复正常关闭roscore,并使用rosclean purge对ROS的log directory进行清理后,重启roscore,节点订阅恢复正常...
2022-03-30 16:36:02 2120 1
原创 ThinkPad 安装Ubuntu18.04, 无法发现WIFI适配器
ThinkPad 安装Ubuntu18.04, 无法发现WIFI适配器1、参照如下网址,更新Ubuntu内核https://blog.csdn.net/caigen0001/article/details/1022955852、更新内核后,启动发生问题,可以参照如下网址,将BIOS 中 Secure Boot 更改为 Disabledhttps://blog.csdn.net/qq_33588730/article/details/1001536183、通过 uname -sr 查看当前内核,如果
2021-09-12 12:02:50 635
原创 Stateflow中的除法运算
将Stateflow中的Action Language设置为MATLAB;在Chart中,让两个数相除,如下图所示;Tsig、Tstep、Rate的类型均为uint8 (对应C语言的unsigned char)如果对该模型进行编译,那么上图中的 Rate = Tsig/Tstep,将生成如下代码:41 uint8_T x; // 此为生成的中间变量42 ttt_DW.count...
2019-09-15 11:23:30 2109
原创 前台任务(Foreground Task)和后台任务(Background Task)
Threads can be executing in either foreground mode or background mode. A foreground task is one that displays and controls animations on your graphics pages. Any expression (not a command) entered in ...
2019-04-29 09:56:36 2430
原创 MotoHawk实时抢占式多任务内核(real-time pre-emptive multi-tasking kernel)
任务分配内核(Tasking Kernel)什么是“抢占”?抢占,描述的是这样一种动作:具有较高优先级的线程中断较低优先级线程的执行,意图在稍后的时间恢复低优先级线程的执行。什么是“多任务”?多任务,是指系统使用多个线程执行工作。多任务的好处是,可以将需要完成的工作,进行逻辑上的分解,得到子任务;并且可以根据需要,为子任务划分优先级。什么是“任务”?一个任务,就是一个线程。...
2019-04-28 23:19:34 818
原创 Kvaser、C++、Qt编写监控界面(三)
1、在利用Python和Kvaser进行二次开发时,Kvaser官方提供了可以解析原始CAN报文的Python模块 canlib.kvadblib,使用方法如下: // python mydbc = kvadblib.Dbc("mydbc.dbc") ... frame = ch.read(timeout=int(timeout * 1000)) bmsg = d...
2019-04-24 09:59:54 1817 1
原创 Kvaser、C++、Qt编写监控界面(二)
一、对DEMO - qtcandemo进行修改 例程qtcandemo,采用了两个线程:主程序线程、和CAN信号读取线程。存在的问题是:打开界面,点击运行“Bus on”之后,再点击“Bus off”时,程序经常卡死。 需要对canreader.cpp中的exec()进行修改。 //原程...
2019-04-23 16:43:44 1349
原创 Kvaser、C++、Qt编写监控界面(一)
从Kvaser官网下载开发组件下载地址:https://www.kvaser.com/download/下载文件:Kvaser CANlib SDK(canlib.exe)下载并安装Qt下载地址:http://download.qt.io/下载文件:qt-opensource-windows-x86-5.12.2.exe编译DEMO - qtcandemo1、用Qt打开范...
2019-04-18 09:36:55 2342 1
原创 在Stateflow中调用C函数
在Stateflow中调用自己定义的C函数基于MATLAB 2017b示例如下图所示,Stateflow的输入为a和b,输出为b;在Stateflow内部,直接调用自己定义的C函数add。为实现上述功能,需要对Simulink模型进行配置。通过“Simulation-Model Configuration Parameters”打开配置窗口,点击左侧的“Simulation Targe...
2019-04-01 15:54:37 7513
原创 make、makefile、cmake之间的区别与联系
make、makefile、cmake之间的区别与联系首先说明一下make、makefile、cmake存在的原因在进行编译时,如果程序只有一个源文件,那么我们可以直接利用gcc命令对其进行编译;但是,如果程序包含多个源文件的话,用gcc命令对源文件进行逐个编译显然会比较繁琐。尤其是在有大量源文件时,这样繁琐的编译工作很容易会导致混乱;为了使多个源文件的编译工作更加便捷,就出现了make...
2019-01-16 09:28:37 5866 2
原创 Ubuntu18.04 Qt编译过程中,“找不到 -lGL”
终端输入 sudo apt-get install libgl1-mesa-dev
2019-01-13 12:13:35 4241
原创 利用kvaser和Python编写监控界面(1)
操作一:连接Kvaser,输出设备的连接状态1、首先,在Kvaser官网下载pycanlib.zip并解压2、然后,在命令行窗口进入pycanlib的解压路径。利用pip install canlib-xxxxxx.whl命令安装canlib3、在官网下载“Kvaser Driver for Windows”安装后,重启电脑运行如下代码:from canlib import canlib...
2019-01-10 22:00:31 2290
原创 关于Python和PyQt线程问题
信号与槽,属于Qt的特性;PyQt是利用Python封装的Qt。为了能在线程中更好的使用Qt的信号槽特性,编写GUI时可以用PyQt的线程代替Python本身的线程机制。线程的start()方法,用来启动线程并且运行线程类中run()方法;因此可以通过重新定义run()方法来实现该线程中的功能。在run()中,可以通过发射(emit)将信号传递给其他线程(比如GUI线程)...
2019-01-10 22:00:10 371
原创 利用kvaser和Python编写监控界面(2)
利用Python,通过kvaser读取CAN信号,在DBC翻译信号时发生错误错误信息:UnicodeDecodeError:‘utf-8’ codec can’t decode byte …解决方法:1、利用文本编辑器(Geany)打开DBC文件2、进行如下设置:“文档”-“设置文件编码”-“Unicode”-“Unicode(UTF-8)”...
2019-01-10 21:59:38 1432
原创 利用kvaser和Python编写监控界面(3)
在窗口中打印byte时,特殊现象的解释def printframe(frame, width): form = '═^' + str(width - 1) print(format(" Frame received ", form)) print("id:", frame.id) # id:784 print("data:", bytes(frame.dat
2019-01-10 21:59:19 1400
Nonlinear Model Predictive Control For Autonomous Vehicles
2019-03-25
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人