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

Get lane id from clicked lane #217

Merged
merged 3 commits into from
Aug 6, 2019
Merged

Conversation

BMarchi
Copy link

@BMarchi BMarchi commented Aug 2, 2019

For the moment, this works for the maliput viewer. I wanted to use only the maliput viewer model to gather the information but since it's not a QObect, I had to use the widget as a intermediary

@BMarchi BMarchi requested a review from hidmic August 2, 2019 13:17
@BMarchi BMarchi mentioned this pull request Aug 2, 2019
2 tasks
hidmic
hidmic previously approved these changes Aug 2, 2019
Copy link
Contributor

@hidmic hidmic left a comment

Choose a reason for hiding this comment

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

LGTM but for a few small details. Great addition @BMarchi !

@@ -101,6 +104,9 @@ class MaliputViewerModel {
/// \param[in] _isVisible The new visualization status of the text label.
void SetTextLabelState(MaliputLabelType _type, bool _isVisible);

const maliput::api::Lane* GetLaneFromWorldPosition(
Copy link
Contributor

Choose a reason for hiding this comment

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

@BMarchi nit: missing documentation block

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: consider changing point with position or simply removing it when redundant

if (_e->button() == Qt::LeftButton)
{
const ignition::rendering::RayQueryResult& rayResult =
this->orbitViewControl->GetQueryResult();
Copy link
Contributor

Choose a reason for hiding this comment

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

@BMarchi indent four spaces here

@@ -79,6 +80,8 @@ class RenderMaliputWidget : public QWidget {
/// \param[in] _e The event that happened.
virtual void paintEvent(QPaintEvent* _e);

signals: void VisualClicked(ignition::rendering::RayQueryResult rayResult);
Copy link
Contributor

Choose a reason for hiding this comment

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

@BMarchi nit: missing documentation block

@@ -77,6 +77,8 @@ class OrbitViewControl {
/// \param[in] _e The Qt mouse event.
void OnMouseWheel(const QWheelEvent* _e);

const ignition::rendering::RayQueryResult& GetQueryResult() const;
Copy link
Contributor

Choose a reason for hiding this comment

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

@BMarchi nit: missing documentation block

hidmic
hidmic previously approved these changes Aug 2, 2019
Copy link
Contributor

@hidmic hidmic left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -101,6 +104,9 @@ class MaliputViewerModel {
/// \param[in] _isVisible The new visualization status of the text label.
void SetTextLabelState(MaliputLabelType _type, bool _isVisible);

const maliput::api::Lane* GetLaneFromWorldPosition(
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: consider changing point with position or simply removing it when redundant

Copy link
Contributor

@hidmic hidmic left a comment

Choose a reason for hiding this comment

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

LGTM!

@BMarchi BMarchi merged commit 34c1d00 into master Aug 6, 2019
@BMarchi BMarchi deleted the bmarchi/lanes_point_and_click branch August 6, 2019 14:31
@hidmic hidmic mentioned this pull request Aug 20, 2019
14 tasks
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