activating valve with ROS

1 回表示 (過去 30 日間)
Amin Hallaj
Amin Hallaj 2022 年 11 月 18 日
編集済み: Yoga 2023 年 9 月 7 日
Hello,
We want to control a solenoid valve (on/off) with simulink. The simulink is connected to ROS and the activation message is 0 (for closing) and 1 (for opening).
The problem is that when the message is sent to the ROS, ROS receives it but valve is not opened completely (it partially opens). But when the message is sent from another node (an ubuntu machine), ROS again receives the same message and valve completely opens.
Does anyone have a similar experience and think it is a MATLAB/ROS clock issue?
Thank you.

回答 (1 件)

Yoga
Yoga 2023 年 9 月 7 日
編集済み: Yoga 2023 年 9 月 7 日
I understand that you are facing an issue with activating the valve in the ROS. The issue might be in the sorted execution order of the subscriber and publisher blocks. But it most likely should not be a MATLAB/ROS clock issue.
You can refer to the following links regarding ROS current time and accessing ROS time functionality:
  1. https://www.mathworks.com/help/ros/ref/currenttime.html
  2. https://www.mathworks.com/help/ros/ref/time.html
I hope this helps resolve resolve your issue.

カテゴリ

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

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by