Synchronize ros publisher with simulink - DELAY
3 次查看(过去 30 天)
显示 更早的评论
Hi, I'm using simulink to create a complex stateflow for controlling a ros simulated arm robot.
My setup:
The goal is to move the arm in three different positions using the stateflow. I have written a python node for reading joint positions sent by simulink, publishing them to ros. Another node is responsible to check if the arm arrives in the desired position publishing to simulink the state.
The problem arise when my stateflow tries to publish the second (and third) position that the arm should reach. In details: I have a delay of about 7 seconds between the command sent by simulink and the command published to the python node. I tried to use the Real-Time Pacer and the simulation > mode > "accelerator" but without any results. Is there a way to synchronize simulink with my python node? Increasing the publish rate of simulink? Any hints?
PS: If I bypass simulink and I use only my python to obtain the same trajectory I have no delay at all! Meaning that my python node should be reliable.
0 个评论
回答(1 个)
Andres Drago
2018-11-13
I have the same problem usign Matlab in a laptop + ROS in Raspberry Pi. The image received from the RPI takes 5~7 seconds with no processing just image raw.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Publishers and Subscribers 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!