AMR仿真模型
根据现有调度系统和本体逻辑实现的仿真模型,剥离定位导航方式,用于环境仿真、性能测试、方案论证
- 剥离二维码/slam导航定位方式,实现本体的状态机、运动、定位、任务执行等逻辑
- 充分追求OOP思想,设计任务大类,定位任务开始、暂停\继续、结束方法,通过回调函数触发任务状态改变上报给状态机模型,触发状态改变及子任务结果上报,不同任务(导航、充电、动作)继承任务大类,根据需要重写相关方法
- 设计各个线程类的定时器取代threading.run(),根据功能不同确定运行频率,减少资源占用,便于大规模仿真
- 设计模型内消息订阅/发布模块,实现模型内数据通过topic实现传输,高效且安全
- 设计本体的运动模型,按路径线段夹角及交管点设置子目标点,根据距离子目标点的距离,动态计算AMR实际速度,使运动过程科学平滑,AMR仿真模型具备单独设置加速度、最大限速的功能
- 设计AMR状态机,在模型初始化、运行中、暂停中、停止、结束这个阶段响应响应的本体逻辑
- 设计过程中处处考虑资源使用,一模型一线程,使用Python内置数据结构和设计对象模型,传输数据
仿真视频:
AMR Simulation Model
Simulation model based on existing scheduling system and ontology logic implementation, stripping positioning and navigation methods for environment simulation, performance testing, and solution demonstration
- Strip the QR code/slam navigation and positioning method, and realize the state machine, motion, positioning, task execution and other logic of the ontology
- Fully pursue OOP ideas, design task categories, positioning task start, pause\continue, end methods, trigger task state changes through callback functions reported to the state machine model, trigger state changes and subtask results reported, different tasks (navigation, charging, action) inherit task categories, rewrite relevant methods as needed
- Design timers for each thread class to replace threading.run(), determine the running frequency according to the different functions, reduce resource consumption, and facilitate large-scale simulation
- Design the message subscription/publishing module in the model to realize the transmission of data in the model through topic, which is efficient and safe.
- Design the motion model of the body, set sub-target points according to the angle of the path segment and the intersection point, and dynamically calculate the actual speed of AMR according to the distance from the sub-target point, so that the motion process is scientifically smooth, and the AMR simulation model has the functions of setting acceleration and maximum speed limit individually.
- Design AMR state machine, respond to the response ontology logic in the stage of model initialization, running, pausing, stopping and ending
- Consider resource use everywhere in the design process, one model, one thread, use Python built-in data structure and design object model, transfer data
Simulation video.
发表回复