Skip to content
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

Update all models to launch Simulink from command line #39

Closed
gabrielenava opened this issue Sep 14, 2018 · 6 comments
Closed

Update all models to launch Simulink from command line #39

gabrielenava opened this issue Sep 14, 2018 · 6 comments
Assignees
Labels

Comments

@gabrielenava
Copy link
Collaborator

In view of robotology/wb-toolbox#160 and #38, it is necessary to modify all the startup procedure of the Simulink controllers. The idea is to create a Matlab function named startTorqueBalancingxxx.m and the open a (static) gui that can handle the Simulink model without opening it.

@traversaro
Copy link
Member

As you may know, there is no guarantee that this new way of launching the controllers will not stop working in new versions of MATLAB, depending on how the (unknown) internal details of MATLAB change. For this reason I think it would be ideal if there is a way to always inspect the discrepancy between the real time and the simulation time, eventually printing a warning/error or stopping if the maximum delay is reached. This will ensure that they will be no regression w.r.t. to this in the future.

@gabrielenava
Copy link
Collaborator Author

I agree. I will also include a warning or error

@gabrielenava
Copy link
Collaborator Author

@gabrielenava
Copy link
Collaborator Author

Another interesting review of 3 different methods: https://blogs.mathworks.com/pick/2012/06/01/use-matlab-guis-with-simulink-models/

@gabrielenava
Copy link
Collaborator Author

A first prototype of the GUI have been created in this branch. There are still a couple of things I want to solve before merging in master, but I already tested the GUI on iCubGenova02. These are the results:

Yoga ++, from Simulink GUI

screenshot from 2018-09-20 13-51-04

screenshot from 2018-09-20 13-47-42

The problem is clearly present.

Yoga ++, from the new static GUI

screenshot from 2018-09-20 13-52-22
screenshot from 2018-09-20 13-52-00

By running Simulink with the new static GUI, the problem is solved and the difference between two time steps is always closed to 0.01 s. A similar result is obtained by running Simulink from command line:

Yoga ++, from command line

screenshot from 2018-09-20 13-53-41
screenshot from 2018-09-20 13-53-27

So, it seems the new GUI works! Here is a picture of how it looks like:

screenshot from 2018-09-20 13-52-41

@gabrielenava
Copy link
Collaborator Author

The PR is ready to be tested on the robot. Closing this issue, as the troubleshooting from now on will be done inside the PR.

Concerning the GUI, at this stage it has been added to the Yoga demo only. After testing it on the real robot, we may discuss if adding it also to the standup and impedance controllers in a future release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants