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