Synchronise ROS with Simulink

1 回表示 (過去 30 日間)
JR
JR 2015 年 10 月 26 日
コメント済み: Sebastian Castro 2015 年 10 月 27 日
Hello,
is there any possibility to synchronise ROS and Simulink with the ROS time?
Thanks!

採用された回答

Sebastian Castro
Sebastian Castro 2015 年 10 月 26 日
What exactly do you mean by this?
There's a real-time pacer block on the File Exchange, which is very common for Simulink-ROS desktop applications.
This block will essentially slow down your Simulink model using your host CPU clock; otherwise, Simulink will just run as fast as it can. Hopefully that was your problem and I understood it correctly?
- Sebastian
  2 件のコメント
JR
JR 2015 年 10 月 26 日
I would like to use the ROS /clock which is generated by Gazebo in Simulink. It should be possible faster than realtime.
Thanks for you help!
Sebastian Castro
Sebastian Castro 2015 年 10 月 27 日
I see.
Well, you could subscribe to the /clock topic and grab the times from there (or otherwise grab them from the timestamp data of any other message coming in).
You can use that in a Triggered Subsystem. This subsystem will execute only when its control signal is triggered; for example, when the ROS clock time exceeds some value.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePublishers and Subscribers についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by