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

Add scale and color properties to Marker selection #1436

Merged
merged 3 commits into from
Oct 11, 2019
Merged

Add scale and color properties to Marker selection #1436

merged 3 commits into from
Oct 11, 2019

Conversation

robustify
Copy link
Contributor

This PR addresses issue #1380 and adds some extra functionality to the marker selection pane.

This PR started from #1435 and was intended to target melodic-devel, but it wasn't possible to make the necessary changes and not break the ABI. Therefore, this PR targets noetic-devel instead. Here is an updated screenshot with some changes made since the initial PR was opened:

Before modifications:
before

After modifications:
after

robustify and others added 3 commits October 8, 2019 23:22
Address recommendations in PR discussion:
- Change scale dimension titles
- Add marker type name to root property node
- Use existing ColorProperty instead of a new property class
Copy link
Contributor

@rhaschke rhaschke left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution and the quick adaption to my comments.
I have pushed some more changes to your PR branch. See the following comments.

@@ -85,53 +85,49 @@ QColor MarkerSelectionHandler::getColor()
(int)(marker_->getMessage()->color.a * 255) );
}

QString MarkerSelectionHandler::getMarkerTypeName()
Copy link
Contributor

Choose a reason for hiding this comment

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

I moved getMarkerTypeName to marker_utils.cpp.

}

void MarkerSelectionHandler::createProperties( const Picked& obj, Property* parent_property )
{
Property* group = new Property( "Marker " + marker_id_ + " (" + getMarkerTypeName() + ")", QVariant(), "", parent_property );
Copy link
Contributor

Choose a reason for hiding this comment

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

Here, my intention was to use the type name in the value field. Minor change.

@@ -140,7 +136,7 @@ void MarkerSelectionHandler::createProperties( const Picked& obj, Property* pare
orientation_property_ = new QuaternionProperty( "Orientation", getOrientation(), "", group );
orientation_property_->setReadOnly( true );

scale_property_ = new MarkerScaleProperty( "Scale", getScale(), marker_->getMessage()->type, "", group );
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no need to duplicate code for a new MarkerScaleProperty, which actually behaves like a VectorProperty.
It's possible to rename (and hide) the fields.

@rhaschke rhaschke merged commit 03d673d into ros-visualization:noetic-devel Oct 11, 2019
@robustify robustify deleted the enhanced-marker-properties branch October 11, 2019 18:32
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.

2 participants