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

NavSat (GPS) map plugin #342

Merged
merged 4 commits into from
Jan 5, 2022
Merged

NavSat (GPS) map plugin #342

merged 4 commits into from
Jan 5, 2022

Conversation

chapulina
Copy link
Contributor

@chapulina chapulina commented Dec 23, 2021

🎉 New feature

Summary

Ported @Sarath18 's GPS plugin from ign-rviz to ign-gui, see

I had to make a few changes to the QML for it to work for me on Bionic:

  • I couldn't get the mapbox plugin to work, so I went with osm
  • supportedMapTypes wasn't working for me so I removed it
  • The unicode symbol won't render for me when I load the GUI, mysterious... So I went with a different one for now which is not as nice:

I can think of a few different features to add, like showing multiple vehicles on the same map, marking the world origin, clicking on the map to choose the location to spawn a model... The possibilities are endless! This is just the first MVP.

TODO

  • Fix warnings [GUI] [Wrn] [Application.cc:674] [QT] file::/NavSatMap/NavSatMap.qml:97:3: QML Map: Binding loop detected for property "center"

Test it

It works with gazebosim/gz-sim#1248:

navsat_move

navsat_origin

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial - on Gazebo
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸

Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
@chapulina chapulina added enhancement New feature or request needs upstream release Blocked by a release of an upstream library labels Dec 23, 2021
@chapulina chapulina requested a review from adlarkin December 23, 2021 05:19
@chapulina chapulina requested a review from jennuine as a code owner December 23, 2021 05:19
@github-actions github-actions bot added the 🏯 fortress Ignition Fortress label Dec 23, 2021
Copy link
Contributor

@jennuine jennuine left a comment

Choose a reason for hiding this comment

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

LGTM, left some minor comments

TODO: Fix warnings [GUI] [Wrn] [Application.cc:674] [QT] file::/NavSatMap/NavSatMap.qml:97:3: QML Map: Binding loop detected for property "center"

I don't get this warning on focal 🤔 Although I do get it for:

[GUI] [Wrn] [Application.cc:674] [QT] file::/Gazebo/GazeboDrawer.qml:147:3: QML Dialog: Binding loop detected for property "implicitHeight"

src/plugins/navsat_map/NavSatMap.cc Outdated Show resolved Hide resolved
src/plugins/navsat_map/NavSatMap.qml Outdated Show resolved Hide resolved
Signed-off-by: Louise Poubel <[email protected]>
@chapulina
Copy link
Contributor Author

I don't get this warning on focal

I can't reproduce it anymore either 😄

Although I do get it for:

Ah yeah that's a pre-existing one. We should look into this when working on OOBE soon

Comment on lines +113 to +114
this->newMessage(this->dataPtr->navSatMsg.latitude_deg(),
this->dataPtr->navSatMsg.longitude_deg());
Copy link
Contributor

Choose a reason for hiding this comment

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

What if latitude/longitude_deg is not set in the new message?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah that's a tough one, protobuf doesn't make a distinction between doubles that are not set or set to zero. I think it's not unreasonable to assume that these values must be set here.

We could determine a convention like passing NaN when the fields are unknown. I see that the ROS message specifies NaNs for a missing altitude, but not for missing lat/lon 🤔 https://github.com/ros2/common_interfaces/blob/master/sensor_msgs/msg/NavSatFix.msg

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's not unreasonable to assume that these values must be set here

👍 Sounds good to me

@chapulina chapulina mentioned this pull request Jan 4, 2022
7 tasks
@chapulina chapulina removed the needs upstream release Blocked by a release of an upstream library label Jan 4, 2022
Signed-off-by: Louise Poubel <[email protected]>
@chapulina chapulina enabled auto-merge (squash) January 5, 2022 00:00
@codecov
Copy link

codecov bot commented Jan 5, 2022

Codecov Report

Merging #342 (99956e1) into ign-gui6 (879a8d1) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           ign-gui6     #342   +/-   ##
=========================================
  Coverage     64.48%   64.48%           
=========================================
  Files            36       36           
  Lines          4953     4953           
=========================================
  Hits           3194     3194           
  Misses         1759     1759           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 879a8d1...99956e1. Read the comment docs.

@chapulina chapulina merged commit 277f28b into ign-gui6 Jan 5, 2022
@chapulina chapulina deleted the chapulina/6/gps_gui branch January 5, 2022 00:32
@osrf-triage
Copy link

This pull request has been mentioned on Gazebo Community. There might be relevant details there:

https://community.gazebosim.org/t/new-ignition-releases-2022-01-10/1228/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 🏯 fortress Ignition Fortress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants