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

Migrate Wrench Display #396

Merged
merged 12 commits into from
Jun 19, 2019

Conversation

Martin-Idel
Copy link
Contributor

@Martin-Idel Martin-Idel commented Apr 26, 2019

Closes #91

As before:

  • Add unit tests for 3d-component (they also reveal some problems with updates that get fixed)
  • Add visual test for display including reference image
  • Refactoring in separate commits to apply general coding standard for ros 2

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@tfoote tfoote added the in review Waiting for review (Kanban column) label Apr 26, 2019
@Martin-Idel Martin-Idel force-pushed the feature/migrate_wrench_display branch from 71c1b35 to 255bc01 Compare April 27, 2019 20:42
@Martin-Idel Martin-Idel force-pushed the feature/migrate_wrench_display branch from 255bc01 to 2736ebf Compare May 29, 2019 15:09
@jacobperron jacobperron self-requested a review June 18, 2019 00:56
{


class RVIZ_DEFAULT_PLUGINS_PUBLIC WrenchStampedDisplay : public
Copy link
Member

Choose a reason for hiding this comment

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

I don't think there's anything to do in this PR, but I noticed we're not including "Stamped" in the name of classes for other stamped message types (except PointStamped). Perhaps we should consider renaming this (and the PointStamped) plugin to remove "Stamped" from the name for consistency. Or, add "Stamped" to the other plugins for stamped messages.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree. I could change it for the WrenchDisplay in this PR if you want because it's not yet on master. For the PointStamped, we should definitely have a new PR and we probably also need a workaround for older configs.

EXPECT_THAT(force_arrow->getScale(), Vector3Eq(Ogre::Vector3(0.2f, 3, 0.2f)));
}

TEST_F(WrenchVisualTestFixture, setWrench_updates_force_array_correctly) {
Copy link
Member

Choose a reason for hiding this comment

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

What is this supposed to be testing? It looks identical to the previous test.

auto wrench_visual = std::make_shared<rviz_rendering::WrenchVisual>(scene_manager, root_node);

wrench_visual->setForceScale(1);
wrench_visual->setWidth(0.2f);
Copy link
Member

Choose a reason for hiding this comment

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

It would also be nice to test the case when the width is greater than the arrow length.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I rewrote the second test to do just that. I think I wanted to do this and therefore copied the first but never actually changed it...

@Martin-Idel
Copy link
Contributor Author

Thanks for the review. I agree with the naming problems. Should I just change the WrenchDisplay name here?

@jacobperron
Copy link
Member

Should I just change the WrenchDisplay name here?

I think that would be good. Then we only have the PointStamped message to deal with later.

@wjwwood wjwwood mentioned this pull request Jun 19, 2019
34 tasks
- other displays don't include the "stamped" part in their name
Copy link
Member

@jacobperron jacobperron left a comment

Choose a reason for hiding this comment

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

LGTM, cheers!

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Edit: re-triggered CI with up-to-date repos file.

@jacobperron jacobperron merged commit 6877a13 into ros2:ros2 Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in review Waiting for review (Kanban column)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate WrenchStampedDisplay
3 participants