Skip to content

MSA: improve author information gui - #221

Merged
davetcoleman merged 7 commits into
kinetic-develfrom
pr-rhaschke-msa-author-info
Sep 22, 2016
Merged

davetcoleman merged 7 commits into
kinetic-develfrom
pr-rhaschke-msa-author-info

Conversation

@rhaschke

Copy link
Copy Markdown
Contributor

This continues #187, v4hn#1.

As discussed don't install setup_assistant.launch.
In order to warn if the user disables generation for a file that should be (re)written, I propose the following mechanism:

  • Each to-be-written file has a bitfield of information pieces it depends on (write_on_changes).
  • During editing, MSA sets similar bitfields in a global changes variable (part of config_data_).
  • If the user disables file generation, those bitfields are checked for an overlap and a warning is generated.

I implemented this mechanism for author information for now. Other bits of information should follow.

@davetcoleman

Copy link
Copy Markdown
Member

I like the required-to-be-generated warning feature but I think I see a problem. If you've edited, for example, the .setup_assistant file outside of the MSA Gui and the timestamps are out of sync, the file will not be checked to be generated on the "Generate Configuration Files" widget. It will allow you to "Generate Package" without any warning that the file should be generated / checked in the GUI. Your current warning only pops up if the user actively unchecks it. I think it should also warn you if it was never checked at all

void ConfigurationFilesWidget::changeCheckedState(QListWidgetItem* item)
{
QVariant index = item->data(Qt::UserRole);
size_t index = item->data(Qt::UserRole).toUInt();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::


// Display this list in the GUI
for (int i = 0; i < gen_files_.size(); ++i)
for (size_t i = 0; i < gen_files_.size(); ++i)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::

template_path = config_data_->appendPaths( config_data_->template_package_path_, file.file_name_);
file.description_ = "CMake build system configuration file";
file.gen_func_ = boost::bind(&ConfigurationFilesWidget::copyTemplate, this, template_path, _1);
file.write_on_changes = 0;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

before we merge this, I think these should be chosen now.

@davetcoleman davetcoleman mentioned this pull request Sep 19, 2016
19 tasks done
@rhaschke

Copy link
Copy Markdown
Contributor Author

It will allow you to "Generate Package" without any warning that the file should be generated / checked in the GUI. Your current warning only pops up if the user actively unchecks it. I think it should also warn you if it was never checked at all.

I see. What about marking externally modified files for re-creation but highlighting them in red and providing a corresponding message? Then, if the file is deselected, the user is warned again.

Regarding the other files, I'm not exactly sure, which pieces of information they depend on. I will make an initial proposal though.

@davetcoleman

Copy link
Copy Markdown
Member

What about marking externally modified files for re-creation but highlighting them in red and providing a corresponding message? Then, if the file is deselected, the user is warned again.

Sounds good to me

@rhaschke
rhaschke force-pushed the pr-rhaschke-msa-author-info branch from 4e91036 to fc401e2 Compare September 19, 2016 23:21
@rhaschke

Copy link
Copy Markdown
Contributor Author

I decided to keep conflicting files deselected - explicit changes by user should still have precedence. However, they will be marked red. Also, I change the generation-dialog to re-check the file list each time the dialog is chosen - in order to accommodate user edits in between.

v4hn and others added 5 commits September 20, 2016 01:23
* fix comments
* remind user to regenerate .setup_assistant
…be written due to changes

For now only implemented for author information.
However, other bits of information and their affected can be considered too.
- Set the appropriate bit in config_data_->changes.
- Define dependency of files on information fields via write_on_changes.
@rhaschke

Copy link
Copy Markdown
Contributor Author

Preparing a rebase to resolve conflicts before merging.

* re-check + re-issue warning when entering generation dialog multiple times
* mark conflicting files (modified externally and in MSA) with red color
* augmented warning about conflicting files
@rhaschke
rhaschke force-pushed the pr-rhaschke-msa-author-info branch from fc401e2 to 0f8feec Compare September 19, 2016 23:59
@rhaschke

Copy link
Copy Markdown
Contributor Author

Finished rebasing.

@davetcoleman

Copy link
Copy Markdown
Member

Travis failed - looks like an integration test is failing:

Invalid Trajectory: start point deviates from current robot state more than 0.01
joint 'joint_1': expected: 0.188012, current: 0.199903
[ INFO] [1474331918.610170913]: Execution completed: ABORTED
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
  what():  boost: mutex lock failed in pthread_mutex_lock: Invalid argument
testpython_move_group ... ok
[ROSTEST]-----------------------------------------------------------------------
[moveit_ros_planning_interface.rosunit-python_move_group/test_target_setting][passed]
[moveit_ros_planning_interface.rosunit-python_move_group/test_validation][FAILURE]
False is not true
  File "/usr/lib/python2.7/unittest/case.py", line 329, in run
    testMethod()
  File "/root/ws_moveit/src/moveit/moveit_ros/planning_interface/test/python_move_group.py", line 57, in test_validation
    self.assertTrue(self.group.execute(plan3))
  File "/usr/lib/python2.7/unittest/case.py", line 422, in assertTrue
    raise self.failureException(msg)
--------------------------------------------------------------------------------
SUMMARY
 * RESULT: FAIL
 * TESTS: 2
 * ERRORS: 0
 * FAILURES: 1

Seems totally unrelated to this PR but indicates we have a flaky test probably because of #63

I'll retrigger Travis now

@davetcoleman

Copy link
Copy Markdown
Member

Just tested your changes. I notice that the popup warning that says "Attention: Some files (marked red) are changed both, externally and in the Setup Assistant" is always shown (when there are files that have changed outside of the MSA) even when there are no files actually marked red. Perhaps that part of the popup warning is hidden unless there are files that qualify to be red? It confused me at first.

@rhaschke

Copy link
Copy Markdown
Contributor Author

The failing Travis check is due to #232 still missing, i.e. not waiting for robot state updates before planning, trajectory validation, etc. Having #63 merged now, I re-filed this PR.

@rhaschke

Copy link
Copy Markdown
Contributor Author

I notice that the popup warning that says "Attention: Some files (marked red) are changed both, externally and in the Setup Assistant" is always shown - even when there are no files actually marked red.

Hm. This doesn't happen for me:

screenshot_2016-09-21_00-29-20

Could you have a look into your console to see, which files are conflicting? Maybe, you manually modified .setup_assistant? This is indeed always considered to be "conflicting". However, in this case this file turns red for me as expected:

screenshot_2016-09-21_00-33-24

@davetcoleman

Copy link
Copy Markdown
Member

Looking closer, the problem is that I get the popup box with a red text warning even when the file that must be written is already checked. So if I change the Author Information then go to the Configuration Files screen, it tells me .setup_assistant must be written but its already checked and not red. I think this is somewhat confusing for users. Can we make that red text message hidden if the necessary files are already checked?
screenshot from 2016-09-21 15-25-03

else
item->setForeground( QBrush(QColor(255, 135, 0)));
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and only here, the files entries are colored red or orange. If they are colored red, also the flag have_conflicting_changes is set which triggers the extra warning. I cannot see a reason for the behavior observed by @davetcoleman.

@rhaschke

Copy link
Copy Markdown
Contributor Author

I cannot reproduce your behavior on my side. If the red extra warning pops up, at least one file is marked red. That's also what is stated in the code here. Maybe, there is some build issue and you should try to clean your workspace before re-building?

@davetcoleman

Copy link
Copy Markdown
Member

The fault was mine - I was not seeing the red because package.xml is highlighted as the first item in the list. I didn't realize my mistake because I was thinking it would show up for .setup_assistant instead

@davetcoleman
davetcoleman merged commit 7b906cc into kinetic-devel Sep 22, 2016
@davetcoleman

Copy link
Copy Markdown
Member

Should this be merged into I/J also?

@v4hn

v4hn commented Sep 22, 2016

Copy link
Copy Markdown
Contributor

Yes. This (should) resolve the problem I explained in #100 (comment) that also affects indigo.

@davetcoleman

Copy link
Copy Markdown
Member

ill create PRs now

@rhaschke
rhaschke deleted the pr-rhaschke-msa-author-info branch September 25, 2016 11:33
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

Successfully merging this pull request may close these issues.

3 participants