将omnet ++时钟与系统时钟对齐 [英] aligning omnet++ clock with the system clock

查看:103
本文介绍了将omnet ++时钟与系统时钟对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将omnet ++与3d机器人模拟器集成在一起,而这正是我所描绘的.

I'm trying to integrate omnet++ with a 3d robot simulator, and this is roughly what I'm picturing.

因此,机器人模拟器中有许多对象,它们使用802.11进行通信,而802.11将由omnet ++进行仿真. omn​​et ++中的每个节点对应于机器人模拟器中的每个对象,并且对象的运动将与omnet ++中的相应节点同步.

So There are a number of objects in the robot simulator, and they communicate with each other using 802.11 which will be simulated by omnet++. Each node in omnet++ corresponds to each object in the robot simulator, and an object's movement will be synchronized with the corresponding node in omnet++.

但是由于omnet ++是离散事件模拟器,因此我需要处理omnet ++和机器人模拟器之间的时钟不匹配问题.

But since omnet++ is a discrete event simulator, I need to deal with the clock mismatch problem between omnet++ and the robot simulator.

我知道omnet ++具有cRealTimeScheduler类,用于将模拟时钟与壁钟同步,但是我不确定这是否可以满足我的要求.

I know omnet++ has cRealTimeScheduler class for synchronizing simulation clock to wall clock, but I'm not sure if this will do what I want.

在网络仿真方面,我是个菜鸟,所以我想知道这是否有可能.使用cRealTimeScheduler类可以处理时钟同步吗?还是我需要采取其他措施? (不同的调度程序,甚至是不同的模拟器?)

I'm a noob when it comes to network simulation, so I want to know if this is even possible or not. Does using cRealTimeScheduler class take care of clock synchronization? or do I need to take a different tack? (a different scheduler, or even a different simulator?)

任何帮助将不胜感激.谢谢.

Any help will be greatly appreciated. Thank you.

推荐答案

如果机器人模拟器本身是实时运行的,那么使用cRealTimeScheduler方法就可以了. cRealTimeScheduler将与挂钟时间同步.如果机器人模拟器也实时运行,那么两者也将隐式同步.

If the robot simulator itself is running in real-time, then you are fine with the cRealTimeScheduler approach. cRealTimeScheduler will synchronize with the wall clock time. If the robot simulator is also running in real-time then the two will be implicitly synchronized, too.

如果机器人模拟器有自己的模拟时间(即可以比实时运行更快),那么您应该创建自己的调度程序类,以同步两个模拟.这被称为协同仿真,其中两个仿真串联在一起.在Sumo(汽车交通模拟器)和omnet(网络模拟器)协同工作的情况下,Vins(sumo + omnet)也在这样做.

If the robot simulator has its own simulation time (i.e. can run faster than real time) then you should create your own scheduler class that synchronizes the two simulation. This is called co-simulation where two simulation in tandem. Veins (sumo + omnet) is also doing this where Sumo (car traffic simulator) and omnet (network simulator) is working together.

您试图实现的目标是可能的,但是我对机器人模拟器部分并不熟悉,但是只要其他模拟器也正在与消息通信是离散的时间点,您就可以从机器人模拟器,您应该没事.

What you are trying to achieve is possible, however I'm not familiar with the robot simulator part, but as long as the other simulator is also communicating with messages are discrete time points, and you can get the simulation time from the robot simulator, you should be fine.

这篇关于将omnet ++时钟与系统时钟对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆