Blank messages in multiple model reference instances

8 views (last 30 days)
Hi,
I'm using multiple of the same reference model in one top level model. The reference model contains blank messages from the Robotics toolbox. Every time I compile my model, the following error is given:
Error evaluating 'InitFcn' callback of Constant block 'Model1/Blank Message1/Constant'. Callback string is 'robotics.slros.internal.block.MessageBlockMask.dispatch('constantBlkInitFcn', gcb);'
Caused by:
  • Unable to load Simulink model "Model10".
As seen above, during compilation the blank message uses the gcb command for a "constant" block. The path of the block is subsequently described as "Model10" whereas the model name is actually "Model1". I think it has to do with the fact that there would otherwise be no unique path for this constant as it appears multiple times in the model. Is there any straight forward way to tackle this issue?

Answers (1)

Cam Salzberger
Cam Salzberger on 6 Mar 2019
Hello Chris,
As of R2018b, Simulink does not yet support the use of ROS blocks within reference models. If you need to operate on a blank message, I believe you can put the blank message block in the top-level model, use a bus selector to pull out the fields you want to modify, and pass that into a reference model. It will need to be passed out again and reassembled into a message bus before being passed to a publisher though.
-Cam

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!