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

Deterioration of performances when Simulink runs with an open scope (with real robot). #236

Open
5 of 7 tasks
Giulero opened this issue Oct 25, 2022 · 3 comments
Open
5 of 7 tasks

Comments

@Giulero
Copy link

Giulero commented Oct 25, 2022

  • I already updated to the latest version I can use
  • I already checked similar issues using the search box
  • I already checked the website for known troubleshooting
  • I already cleaned my environment (by removing the wb-toolbox install folder and installing it again)
  • I already excluded the possibility that system configuration files (e.g. yarp related) might be responsible
  • I am sure the environment variables are correct
  • I tried to reproduce the error in simulation (if it affects the real robot)

Description

The issue occurred during a joint data collection on the real robot (iCub Scarlett). The data were collected using a Simulink model that sent joint position references to the robot using a setPosition (direct) block.

When a scope is open, the model's performance seems to deteriorate. In particular, when using setPosition (in position direct) the actuated trajectory is jerky, while the desired one is smooth. Once the scope is closed, the actuation becomes smooth again.
The issue occurs even if the scope is already open before running the Simulink model. If instead the scope is opened during the execution of the model, the robot freezes for a while and catches the desired trajectory with a sudden movement. Then continues with the choppy behaviour.

cc @gabrielenava

Platform

We spotted the bug in a data collection in the real robot (iCub Scarlet).

Reproducibility

We tried many times with the real robot and the issue arose every time. Still, we tested only with one machine (icub29)

I cannot reproduce the issue in simulation. I guess the synchronization with Gazebo prevents it.

Screenshots

The desired vs the measured joint values

image

gnome-shell-screenshot-ok4f6

A zoom

image

The blue trajectory (the measured joint values) is jerky.

Additional information

  • OS: Ubuntu 20.04
  • Version / Commit:
  • Matlab Version:
    @gabrielenava can you help me with this? I do not remember the versions of software on icub29 :(
@traversaro
Copy link
Member

traversaro commented Oct 25, 2022

I think in general this is a known aspect of Simulink: it does not provide you with any (even soft) real-time guarantees. If you want to run a controller in real time, you should use automatic code generation using Simulink Coder (supported in WB-Toolbox since WB-Toolbox 4), or Simulink Real-Time.

For more info, see:

@traversaro
Copy link
Member

traversaro commented Oct 25, 2022

I cannot reproduce the issue in simulation. I guess the synchronization with Gazebo prevents it.

I think you can reproduce it if you disable the Gazebo synchronized and use the Real-Time one, as you do in the real robot.

@gabrielenava
Copy link
Collaborator

Matlab Version:
@gabrielenava can you help me with this? I do not remember the versions of software on icub29 :(

it is MATLAB 2021b

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

No branches or pull requests

3 participants