ROS Action Client in Simulink

3 vues (au cours des 30 derniers jours)
SMEAC
SMEAC le 26 Nov 2019
Commenté : SMEAC le 8 Déc 2019
Does anyone know if it is possible to use a ROS Action Client in Simulink? Combined with Stateflow it would be a lovely alternative to FlexBE.
Many thanks in advance

Réponses (1)

Cam Salzberger
Cam Salzberger le 5 Déc 2019
I am afraid that it is currently not possible (as of R2019b), but I have passed along your suggestion to the relevant people. They will consider it for inclusion in a future release of MATLAB.
  3 commentaires
Cam Salzberger
Cam Salzberger le 6 Déc 2019
Ah, do you mean that you used the MATLAB rosactionclient within Stateflow? Sorry, I was thinking only of a Simulink action client block. It's great that you got it working, and I'm sure that other users looking to perform a similar workflow would love to have an example to work from!
SMEAC
SMEAC le 8 Déc 2019
Hello Cam,
Yes, I actually did at first want a Simulink Action Client Block, but after developing it, I found in the end, the more elegant solution for my need was a direct integration into Stateflow. I have now uploaded both solutions as small demo programs. They are not finished completely, the only interesting point really is tracking the goal ID from a request to the feedback and status. And what needs to be updated, is that at present, there is no waitForServer working. In Matlab, I can detect if a Server is running using a few tricks with rosnode(), but in Simulink that fails with coder.extrinsic and the need to access the mxarray. An alternative is to monitor the server publishers, but then you would have to rely on a timeout.
The Action Client Block can be found here:
The Action Client inside Stateflow can be found here:
Regards
Gavin

Connectez-vous pour commenter.

Catégories

En savoir plus sur Publishers and Subscribers dans Help Center et File Exchange

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by