ROS Action Client in Simulink

1 次查看(过去 30 天)
SMEAC
SMEAC 2019-11-26
评论: SMEAC 2019-12-8
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

回答(1 个)

Cam Salzberger
Cam Salzberger 2019-12-5
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 个评论
Cam Salzberger
Cam Salzberger 2019-12-6
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 2019-12-8
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

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Publishers and Subscribers 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by