Closed romainreignier closed 4 years ago
Thanks for the contribution!
I am not in a position to test this with NavSatFix data. If you've got a simple testing strategy that's reasonably easy and safe to share, that would be great. Otherwise I will defer to you to decide that this works as intended. The diff looks good to me.
I think there may be a case that if we handle more than 1 CRS, we should be more generic than hard-coding 2 of them. However, I think WGS84
and Simple
should cover most robotics + GIS use cases. This is a problem I'm happy to kick down the road.
I'd love to hear more about what you're doing with QGIS-ROS, if you've got any public links/details to share.
Let me know if you think it's good to merge and I'll do so.
Ok, thank you for the feedback.
Tomorrow, I might be able to record a trivial rosbag in Gazebo for you to test. Actually, there may be publicly available rosbags from autonomous driving projects like Autoware.
I am not doing much with QGIS-ROS for now, I work on phenotyping solutions and wanted to view positions on a map. I already use QGIS a bit for other geo data like shapefiles and geotiff. Furthermore, I have seen the talk at ROSCon and always wanted to try it out one day.
Hi!
I have used a sample bag from Autoware ROSBAG Demo:
It contains nmea_msgs/Sentence
that I converted to sensor_msgs/NavSatFix
with the nmea_navsat_driver.
So here it is: sample_moriyama_150324_navsatfix.bag.tar.gz
And the result in QGIS :
The live topic version can be tested with rosbag play
.
Note that I could not used lz4 compressed bag directly. It seems to be an issue with Python 3 because I can reproduce it with a simple script inspired from rosbag tutorial. It works with Python 2 but not with Python 3. This may be caused by ros-melodic-roslz4
that it targeted for Python 2 on Melodic. So it hould work on Noetic.
Also, I have done my PR against the master
branch but because I am on Melodic, I have actually used the ab-handle-empty-module-names
branch so maybe this branch should also merged to master
.
Thanks for the reminder. That branch should be merged. I'll test this out and then merge both today.
Thanks a lot of this
qgis_ros
package, it is quite useful to use QGis to see geographic data.So I have added a
NavSatFixTranslator
to use ROS standardsensor_msgs/NavSatFix
GNSS receiver messages.I had to add a new CRS in order to get the points on a correct location on a map, so I have added a
crsName
member to theTranslator
base class.I had to use dicts to store CRS PROJ4 data and
QgsCoordinateReferenceSystem
objects because the raw PROJ4 string contains spaces and cannot be used in theuri
passed toQgsVectorLayer
constructor when subscribing to a topic.