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

External Loads Applies Force Checkbox: Unchecking the box from the user interface is not saved #1153

Closed
jenhicks opened this issue Nov 13, 2019 · 8 comments
Milestone

Comments

@jenhicks
Copy link
Member

Steps to reproduce

Load gait2354 model, launch ID tool, and edit external loads by unchecking the "applies force" box
Click Save and then edit again -> applies force box is still checked
Click Save and then save the external loads file -> applies force box is still not checked when inspecting later.

Environment and GUI version

OpenSim 4.0, Mac
Also reported by user in #1146

@aymanhab
Copy link
Member

This boils down to the following: ExternalForce uses two different/conflicting ways to indicate whether it applies_force. a custom method that checks for force_identifier and a base class method that checks for the property applies_force. Switching to using the property always will make the setting persistent and the GUI works fine but may have other side effects downstream if the API uses the custom method so I lean to not make this change but I'm open to suggestions @jimmyDunne @chrisdembia

@jenhicks
Copy link
Member Author

Could we remove this checkbox from the GUI? If we did that, what would be the pathway for users to change the setting?

@aymanhab
Copy link
Member

We can remove it, users will have to remove all the labels in force columns by selecting blank. which is inconvenient Another option is to keep it and make un-selection wipes out the columns for the user. It remains the case that the API users have 2 methods appliesForce and get_applies_force() that look identical but have different semantics/meaning.

@jenhicks
Copy link
Member Author

We will remove the checkboxes. We should make sure to note in the documentation and changelog that users should zero out the columns to prevent the forces from being applied.

@jenhicks jenhicks added this to the OpenSim 4.1 milestone Nov 18, 2019
@aymanhab
Copy link
Member

One complication is that since the radio button options (Body Force, Point Force) are not guarded by a checkbox, now users can't specify torque only, so I implemented the most surgical solution that blanks the Force columns if you uncheck the box.

@jenhicks
Copy link
Member Author

From @carmichaelong during beta testing (and I confirmed) ...
Tried with grf file from 2354 using the Static Optimization tool GUI. Unchecked the applies force box for 'right', and saved to file. Two issues: 1) xml file output still has applies force as true; 2) file no longer can be editted/opened from OpenSim GUI (by hitting the edit button again in the SO GUI)

@aymanhab
Copy link
Member

  1. appliesForce in the file has a different meaning (used to be isDisabled before we made it 'clearer 💣 in 4.0) so it should be true even if the check-box is off as long as it applies Torque. Sad but true.
  2. File fails to open because the datasource is deleted/removed while making a copy, may require fix on opensim-core. Still under investigation.

@carmichaelong
Copy link
Member

I forgot a piece of info that's like part 2b) in above: when I close the SO dialog and open it again and try to use the file, it still says it can't be opened.

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