How to check if there is a new response in the "Call Service" block using ROS Toolbox?

1 visualización (últimos 30 días)

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 20 de Jul. de 2020
The "Call Service" block is "blocking". That means that the service client block does not finish processing a simulation time-step until it has sent a request and received a response from the service server. So technically, any output that is not indicating it has timed out is a new response from the service server.
This is a different way of functioning than the Subscribe block, where it will output the latest message receive, but will indicate when it has gotten a new message.
What the block doesn't tell you is if the values of the response message are different from the previous response received. If you need to do that, you will need to implement some kind of checks yourself in the model.

Más respuestas (0)

Categorías

Más información sobre Network Connection and Exploration en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by