-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simulink Coder needs the robot plugged (either real or simulated) #97
Comments
A new logic to handle the singleton logic has been implemented in #115, but this change does not affect the dependency between the At the current moment I still don't see any way to exclude the call of block's It would be great if Simulink would provide a cc @pattacini |
I didn't find any solution to this problem. A possible workaround is to generated code targeting the real robot using the correct gains and a "fake" name matching the Gazebo robot. In this was the gains are loaded in the workspace and embedded in the generated code. Then, in the generated cpp, all the occurrences of the gazebo robot name (e.g. Putting this issue in the backlog. cc @aikolina |
Which block(s) actually require the |
The first example I can recall is: wb-toolbox/toolbox/library/src/SetReferences.cpp Lines 212 to 217 in bbd3e52
Not sure if it is the only one. We might move this piece of code in the |
I think this is a good idea, even because anything that reduce the uncertainty related to the duration of the time passed between when the control mode has switched and the first real reference sent to the real system is highly beneficial. After all, we have no info about the time that simulink will take between the |
A minor clarification about this. The control mode is switched in the first call of the |
Ah, great, I misread the code. If you are sure that |
@traversaro I did a quick test and The only solution would be to initialize all these resources during the first call of the |
Alternative solutions that probably take some more work:
|
Yes, I would rather go to a more clear
What's strange is that here it says:
But when I run a model I see that also the |
|
When generating the code, Simulink Coder executes all the callbacks at least up to
mdlStart
, that calls theBlock::initialize()
method of our toolbox.This is a big problem, because
Block::initialize()
allocates theRemoteControlBoardRemapper
device for the first block that needs it. This means that the robot must be plugged for generating code from a Simulink model.It is somehow related to #15.
We should think how to tackle this issue also keeping in mind #94 that would require changing how the retain / release of the
RemoteControlBoardRemapper
is handled.The text was updated successfully, but these errors were encountered: