nobleo / rviz_satellite Goto Github PK
View Code? Open in Web Editor NEWDisplay internet satellite imagery in RViz
License: Apache License 2.0
Display internet satellite imagery in RViz
License: Apache License 2.0
Hi,
We are fusing various sources to obtain our final position estimate in UTM frame. Can we use this plugin without a NavSat message? If not, could you provide me some pointers for implementing this?
Thanks
This used to work fine in ROS Kinetic, but the introduction of getTF2BufferPtr() in 0e8ff38 doesn't work there:
rviz_satellite/src/aerialmap_display.cpp: In member function 'virtual void rviz::AerialMapDisplay::onEnable()':
/workspace/src/external/rviz_satellite/src/aerialmap_display.cpp:98:45: error: 'class rviz::FrameManager' has no member named 'getTF2BufferPtr'
tf_buffer_ = context_->getFrameManager()->getTF2BufferPtr();
I think querying it from getTFClient()
(see http://docs.ros.org/kinetic/api/rviz/html/c++/classrviz_1_1FrameManager.html#a6eb09c3609b6591faee43483186b8730 ) would already work around it.
Would be cool if Kinetic support could stay for some more months until upstream support for it goes away in April 2021. Thanks!
I keep seeing this error message during tile loading: "Reading ras files from sequential devices not supported"
seems like it could be a Qt bug?
Hello there,
I have a question regarding the creation of the WMTS server requests.
From this german governmental-website I can get the address for their WMTS server: https://www.wmts.nrw.de/geobasis/wmts_nw_dop. I can successfully integrate it into josm as an image layer (wmts:https://www.wmts.nrw.de/geobasis/wmts_nw_dop) and it gets displayed correctly.
I can watch the server request made by josm in the terminal, which is something like:2019-09-26 18:54:31.651 INFO: GET https://www.wmts.nrw.de/geobasis/wmts_nw_dop/tiles/nw_dop/EPSG_25832_16/16/17680/35107 -> HTTP_1 200 (13.3 kB)
You can view this tile image: https://www.wmts.nrw.de/geobasis/wmts_nw_dop/tiles/nw_dop/EPSG_25832_16/16/17680/35107
In the rviz-satellite-plugin I entered the string for the request: https://www.wmts.nrw.de/geobasis/wmts_nw_dop/tiles/nw_dop/EPSG_25832_16/{z}/{y}/{x}
If I let rviz_satellite figure out the y and x, I'm getting trash in rviz:
I think this is because the images/tiles are in EPSG25832-projection method, but rviz-satellite thinks in Mercator-projection. And I need the images to be in EPSG25832, because of other data which gets displayed.
If you look at the WMTSCapabilities.xml of the map-server you can see there are images available up to zoom level 16 and other info: https://www.wmts.nrw.de/geobasis/wmts_nw_dop/tiles/nw_dop/EPSG_25832_16/1.0.0/WMTSCapabilities.xml
I had a look at the methods, which rviz-satellite seems to use to calculate the x and y, which is something like this:
// in Coordinates.h:
int const n = 1 << zoom;
double x = n * ((coord.lon + 180) / 360.0);
double y = n * (1 - (std::log(std::tan(lat_rad) + 1 / std::cos(lat_rad)) / M_PI)) / 2;
But I think I need to do something like this, because of the EPSG25832/UTM projection:
https://en.wikipedia.org/wiki/Transverse_Mercator_projection
I already had a look at https://josm.openstreetmap.de/doc/org/openstreetmap/gui/jmapviewer/Tile.htm to see how openstreetmap does it, but I didn't find anything.
So all in all: How to calculate the x,y-tile-coordinates from lat,long if given images in EPSG25832-projection method (which josm/osm does succesfully)?
When trying out the plugin for a location I'm interested in, I noticed that it only properly downloads map data from level 1 to 11. All others show grey image tiles with a crossed out camera. When viewing the same location on map quest, it is obvious higher resolution data than level 11 is available: http://mapq.st/29F0sQV
It seems that MapQuest did some API changes (the old URL says something that in July 2016 they switch to a new site). So maybe what I observe is related to that. Any hints are appreciated, at map level 11 is basically unusable.
Here's a bagfile with NavSatFix data that can be used to reproduce the issue:
2016-07-11-20-27-13.bag.zip
.. or should we rather stick with the ROS buildfarm hooks?
However, we should incorporate basic CI checks, linting and unit-testing.
Dear all,
First of all, thank you for the development of this plugin that I've found very handy.
I upgraded to the latest version yesterday to make it work in 18.04. I have found that now the satellite images are no longer in the proper placed. Instead, they appear with a small shift to the South and East.
I attach an example with the representation of coordinates 41.38738993 N 2.183433017 E in google maps and with your plugin in rviz to help to understand the differences.
Compared with Google,OpenStreetMap and MapBox are updated slowly.So I found the URI of Google tiles Maps on the Internet. Then I directly replaced the object uri with the uri of Google Maps on AerialMapDisplay.
In the end, although Google Maps can be displayed on the rviz, the scale of the map is incorrect, so some people know how to modify the scale?
Thank you.
To make the life of the user easier, we should add default map providers via a select-property, along with the tile-url field.
Non exhaustive list:
Potentially free usage/license (to be checked)
when I try to load the display it segfaults on ubuntu 16.04 with kinetic
If AerialMapDisplay/Status/Transform shows the error Fixed Frame [map] does not exist
then the map shouldn't be drawn at all. This leads to confusing results, see #48
We have a wild mixture of camelCase and under_score notation. We should stick to the convention of RViz (under_score).
Due to an internal company shift, my colleagues and I will sadly no longer have the resources to maintain this repository.
If you want to adopt the maintenance of this repo, please contact @gareth-cross.
Tile is always positioning with left bottom corner in (0, 0)
ROS version:
foxy/noetic
Steps to reproduce:
Publish gps position with rqt and open plugin in rviz
p.s. got this bug on foxy but reproduced at noetic
p.p.s. if i will increase latitude for example position in rviz not changing. Only loaded tile may be changed
I have been trying to get this package to work on my machine but I'm getting an error when the tiles are being downloaded. I have tried poking around to see what's wrong but I'm not familiar with Qt so I've hit a bit of a wall.
I am running Ubuntu 14.04 with a full desktop install of ROS Indigo.
The issue is here: https://github.com/gareth-cross/rviz_satellite/blob/master/src/tileloader.cpp#L139
The QImagereader object throws a Reading ras files from sequential devices not supported
error from within the if statement. (btw the if statement was still returning true) This stack overflow topic seems to be the same issue but I wasn't able to emulate the fix. He only needed to install the libjpeg.so.62 library to fix his problem. I checked and only had version 8 installed on my machine so I installed 6.2 on top. I have no idea if it worked however.
http://stackoverflow.com/questions/11926840/qt-jpg-image-display-with-qlabel
I tried this as well which would prevent the error but the program still wouldn't work. It would flip frantically between "tiles fully loaded" and "loading tiles"
https://code.google.com/p/qimagegrabber/issues/detail?id=2
Let me know if you need any more info or if you have any ideas.
Mike Hosmar
Hi,
I try to launch the demo.launch and this is what happen :
SUMMARY
PARAMETERS
- /rosdistro: melodic
- /rosversion: 1.14.3
NODES
/
fake_gps_fix (rostopic/rostopic)
rviz (rviz/rviz)
static_tf_fake (tf2_ros/static_transform_publisher)ROS_MASTER_URI=http://localhost:11311
process[fake_gps_fix-1]: started with pid [27967]
process[rviz-2]: started with pid [27968]
process[static_tf_fake-3]: started with pid [27969]
/opt/ros/melodic/lib/python2.7/dist-packages/rostopic/init.py:1826: YAMLLoadWarning: calling > yavml.load_all() without Loader=... is deprecated, as the default Loader is unsafe. Please read > https://msg.pyyaml.org/load for full details.
for d in data:
terminate called after throwing an instance of 'std::invalid_argument'
what(): The number of blocks has to be positive
I'm using only source of ROS because I'm on 19.10 Ubuntu.
How can I fix this ?
I have Ubuntu 12.04 - gcc version 4.6.4 - ROS Hydro
I don't know how to solve this error:
cc1plus: error: unrecognized command line option ‘-std=c++11’
To fix #62, support for Qt4 should be dropped.
Also refer to ros-visualization/rviz#1314
We have a lot of unused and historic includes in the main files.
Hello Gareth,
great work, I really like this plugin!
Concerning the robot frame
property, I misunderstood the plugin:
I expected the plugin to read the frame that corresponds to the (lat,lon)-coordinates from the NavSatFix message, as the latter contains that information (NavSatFix).
With this, I thought the robot frame was there to load tiles around an area where no GPS-coordinates are explicitely available, such as in simulation, where only Cartesian x and y (using UTM as in ROS geodesy for example) are at hand.
Therefore, I would suggest adding this feature, using the upper ROS library, or set the robot frame property read-only (and read it from the NavSatFix message). I could do either and open a merge request, just let me know what you prefer.
Cheers
Max
I did the initial port to Dashing.
https://github.com/blacksoul000/rviz_satellite
Some problems with console output but it compiles and works.
Thanks
The cmake setup has some errors, and flaws:
Hello,
I am trying to use this plugin with rviz.
I have GPS coordinates at 100hz from sensor fusion. They are in the ENU frame (true east north and up frame).
In this case, what is the definition of the map frame? Will setting ENU to map frame as Identity suffice?
FYI, in my case I do not use base_link. Is the base_link needed for this plugin?
Any insights please?
In rviz
when I have the AerialMapDisplay
running with Draw Behind
set to true and then I add a Map
display type with Draw Behind
also set to true the two layers swap which is on top. It seems that this is based on the height of the data in the Map
topic. I was able to make the AerialMapDisplay
always be behind the Map
display type by changing obj->setRenderQueueGroup(Ogre::RENDER_QUEUE_4);
to obj->setRenderQueueGroup(Ogre::RENDER_QUEUE_3);
.
I believe the reason the display types fight each other is that the Map
display type also uses the value of 4
(seen here).
Hi, is it possible to load geotiffs currently stored on the computer as opposed to getting them from a URI?
Thank you. Regards, Andres
I'm trying to add a feature to this plugin that will force it to only utilize cached data, but it appears that the saved images expire extremely quickly. How should this be addressed?
I have Ubuntu 16.04 and my ROS is kinetic. I just typed 'catkin_make' to compile rviz_satellite after copying to my workspace. I got follow errors.
[ 9%] Generating src/moc_aerialmap_display.cpp
[ 18%] Generating src/moc_position_reference_property.cpp
[ 27%] Generating src/detail/moc_tile_downloader.cpp
Scanning dependencies of target rviz_satellite
[ 36%] Building CXX object rviz_satellite/CMakeFiles/rviz_satellite.dir/src/aerialmap_display.cpp.o
[ 54%] Building CXX object rviz_satellite/CMakeFiles/rviz_satellite.dir/src/moc_position_reference_property.cpp.o
[ 54%] Building CXX object rviz_satellite/CMakeFiles/rviz_satellite.dir/src/tile_id.cpp.o
[ 63%] Building CXX object rviz_satellite/CMakeFiles/rviz_satellite.dir/src/position_reference_property.cpp.o
[ 72%] Building CXX object rviz_satellite/CMakeFiles/rviz_satellite.dir/src/detail/moc_tile_downloader.cpp.o
[ 81%] Building CXX object rviz_satellite/CMakeFiles/rviz_satellite.dir/src/ogre_tile.cpp.o
[ 90%] Building CXX object rviz_satellite/CMakeFiles/rviz_satellite.dir/src/moc_aerialmap_display.cpp.o
In file included from /home/shengshi/catkin_ws/build/rviz_satellite/src/moc_position_reference_property.cpp:9:0:
/home/shengshi/catkin_ws/build/rviz_satellite/src/../../../src/rviz_satellite/src/position_reference_property.h:27:45: error: expected initializer before ‘:’ token
class RVIZ_EXPORT PositionReferenceProperty : public TfFrameProperty
^
/home/shengshi/catkin_ws/build/rviz_satellite/src/../../../src/rviz_satellite/src/position_reference_property.h:29:20: error: expected ‘}’ before end of line
/home/shengshi/catkin_ws/build/rviz_satellite/src/../../../src/rviz_satellite/src/position_reference_property.h:29:20: error: expected declaration before end of line
In file included from /home/shengshi/catkin_ws/src/rviz_satellite/src/position_reference_property.cpp:15:0:
/home/shengshi/catkin_ws/src/rviz_satellite/src/position_reference_property.h:27:45: error: expected initializer before ‘:’ token
class RVIZ_EXPORT PositionReferenceProperty : public TfFrameProperty
^
/home/shengshi/catkin_ws/src/rviz_satellite/src/position_reference_property.h:29:20: error: expected ‘}’ before end of line
/home/shengshi/catkin_ws/src/rviz_satellite/src/position_reference_property.h:29:20: error: expected declaration before end of line
rviz_satellite/CMakeFiles/rviz_satellite.dir/build.make:155: recipe for target 'rviz_satellite/CMakeFiles/rviz_satellite.dir/src/moc_position_reference_property.cpp.o' failed
make[2]: *** [rviz_satellite/CMakeFiles/rviz_satellite.dir/src/moc_position_reference_property.cpp.o] Error 1
make[2]: *** 正在等待未完成的任务....
rviz_satellite/CMakeFiles/rviz_satellite.dir/build.make:103: recipe for target 'rviz_satellite/CMakeFiles/rviz_satellite.dir/src/position_reference_property.cpp.o' failed
make[2]: *** [rviz_satellite/CMakeFiles/rviz_satellite.dir/src/position_reference_property.cpp.o] Error 1
In file included from /home/shengshi/catkin_ws/src/rviz_satellite/src/aerialmap_display.cpp:39:0:
/home/shengshi/catkin_ws/src/rviz_satellite/src/position_reference_property.h:27:45: error: expected initializer before ‘:’ token
class RVIZ_EXPORT PositionReferenceProperty : public TfFrameProperty
^
/home/shengshi/catkin_ws/src/rviz_satellite/src/position_reference_property.h:29:20: error: expected ‘}’ before end of line
/home/shengshi/catkin_ws/src/rviz_satellite/src/position_reference_property.h:29:20: error: expected declaration before end of line
rviz_satellite/CMakeFiles/rviz_satellite.dir/build.make:77: recipe for target 'rviz_satellite/CMakeFiles/rviz_satellite.dir/src/aerialmap_display.cpp.o' failed
make[2]: *** [rviz_satellite/CMakeFiles/rviz_satellite.dir/src/aerialmap_display.cpp.o] Error 1
CMakeFiles/Makefile2:1877: recipe for target 'rviz_satellite/CMakeFiles/rviz_satellite.dir/all' failed
make[1]: *** [rviz_satellite/CMakeFiles/rviz_satellite.dir/all] Error 2
Makefile:143: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed
Anyone knows how to solve this problem ?
Would you mind doing an indigo release, please?
Hey guys! So I'm trying to set up rviz_satellite on ubuntu 20.04 on WSL1 with ros noetic... I'm getting this error when launching the demo.launch file:
'[ERROR] [1665163798.105047200]: PluginlibFactory: The plugin for class 'rviz_plugins/AerialMapDisplay' failed to load. Error: Could not find library corresponding to plugin rviz_plugins/AerialMapDisplay. Make sure the plugin description XML file has the correct name of the library and that the library actually exists.'
I've checked the default library path and it's: "lib/librviz_satellite", I've checked the opt/ros/noetic/lib folder and can't find a library associated with librviz_satellite? Does anyone know how to install this?
Rviz opens up when the demo.launch is launched with odom and map frames... the only output not showing is the AerialMapDisplay plugin which does not respond!
Any help is of course much appreciated, Thanks!
What we did:
We selected a traffic circle as a prominent location and walked along the edge of a patch of grass with an rtk module.
We have recorded the GPS topic and we perform a Navsat to ENU conversion. We broadcast the ENU conversion from "map"->"gps_link" (gps_link is the frame_id we get from our ublox f9p driver)
What we expect:
That the trajectory matches the satellite image.
What we get
Hey,
i am using the transform method in robot_localization to get XY from LL. I take the same origin for the transform of GeoPoints and for rviz_satellite. i set "map" as frame_id for the navsat message.
why do i get this offset? do you use different transform functions? Are the Map-Tiles generated by a different method?
The AerialMapDisplay plugin sets the fixed frame in rviz to map
[1]. As a user I would expect that I can select the fixed frame in rviz. The fact that this plugin resets the fixed frame back to map
every time I try to change the fixed frame is confusing.
The AerialMapDisplay ensures that the visualization will be drawn with the right position and orientation after changing the fixed frame to map
. However, I think it would be really useful to be able to visualize the AerialMapDisplay with the right position and orientation, for any other fixed frame as well. This would mean that the additional transformations have to be applied between map
and fixed_frame_
to get the AerialMapDisplay on the right place.
[1] https://github.com/gareth-cross/rviz_satellite/blob/master/src/aerialmap_display.cpp#L515
Placeholder issue.
If anyone is interested in picking this up, let me know!
Seems some initial work has been done here: https://github.com/blacksoul000/rviz_satellite/tree/dashing
Some more work here it seems: https://github.com/Kettenhoax/rviz_satellite
I have been looking at various drone trajectory planners and they expect either a GPS or xyz coordinates to functions. Since this plugin supports visualizing map on rviz, would it be possible to convert/improve "2D nav goal" functionality on rviz to output GPS coordinates of the selected location? i can assume that the calculation depend on zoom level, (some thing like 2D nav goal -> scaled up distance -> GPS coordinate) but cannot wrap around my head a way to implement it.
Hi @gareth-cross Thanks for sharing this meaningful package.
How can I rotate the map image in the Rviz ? for example rotate 45 degrees with z axis.
Best,
Welson,
I tried to run the demo and was shown the following location:
If I enter the same coordinates into a different site, I am shown a different location, which appears to be further in the south.
https://www.latlong.net/c/?lat=39.951121&long=-75.189930
It looks like, rviz_satellite is misreporting the position. Am I missing something here?
Best regards,
Martin Oehler
Hello! Thanks for this great plugin.
I'm trying to visualize the changing GPS position of a robot in real-time. I added the AerialMap plugin to rviz, and added an "axes" object to mark the base_link frame of the robot.
Unfortunately, I am not able to visualize the position of base_link changing in real-time. When I press the "reset" button at the bottom of rviz, the position is updated; but otherwise it is sort of "stuck" in the same position.
May I know if this behaviour is intentional, or is there a way to get the map updated in real time?
Thank you!
Hi Gareth,
For my application I need to be able to reconfigure the zoom value by a topic instead of using the field in RViz. The way to solve that could be a modification of the NavSatFix msg for adding this parameter, or create a new one which will have just all the fields needed for your plugin. I want to ask you if there is any reason to not include this feature, or just nobody has need this before.
Great work!
Regards,
Jose
Hey there,
I just want to plot gps points with markers on a map. Therefore I want to use your rviz_satellite package.
To do that I launched your demo file and also played the sample.bag file. Next I tried to create a marker that subscribes to topic /gps/fix. This however did not work for me .....
question:
How to use the bagfile correctely and display gps data as markers?
Hope you can help me.
Best
Markus
When I run:
[WARN] [1646817382.360607]: Could not process inbound connection: topic types do not match: [nav_msgs/OccupancyGrid] vs. [sensor_msgs/NavSatFix]{'topic': '/gps/fix', 'tcp_nodelay': '0', 'md5sum': '3381f2d731d4076ec5c71b0759edbe4e', 'type': 'nav_msgs/OccupancyGrid', 'callerid': '/rviz'}
How can I solve it?
Thanks!
From #72:
I found that if you just put something like "sdf" in the object uri input, that there will be no error visible in the GUI. However, this is probably not from this PR and also a minor issue anyway.
and:
There is a specific error in the console.
Compiling with catkin build on Kubuntu 18.04+Melodic:
Found unsuitable Qt version "5.9.5" from /usr/bin/qmake, this code requires Qt 4.x
Any plans to adapt to Qt 5?
Currently the map jitters/ jumps around a bit. Here #35 (comment) are thoughts on the current situation.
I'm trying to intergrade satellite images to Linorobot and display them with rviz, but I keeps getting error.
roslaunch rviz_satellite demo.launch
shows this error message:
[gps_fix-1] process has died [pid 17298, exit code 64, cmd /opt/ros/melodic/lib/rostopic/rostopic /gps/fix __name:=gps_fix __log:=/home/eilidar/.ros/log/c4f23c6a-00e4-11ed-b27c-60a4b7c94bc5/gps_fix-1.log].
log file: /home/eilidar/.ros/log/c4f23c6a-00e4-11ed-b27c-60a4b7c94bc5/gps_fix-1*.log
[ERROR] [1657525401.857090717]: PluginlibFactory: The plugin for class 'rviz_plugins/AerialMapDisplay' failed to load. Error: According to the loaded plugin descriptions the class rviz_plugins/AerialMapDisplay with base class type rviz::Display does not exist. Declared types are rviz/Axes rviz/Camera rviz/DepthCloud rviz/Effort rviz/FluidPressure rviz/Grid rviz/GridCells rviz/Illuminance rviz/Image rviz/InteractiveMarkers rviz/LaserScan rviz/Map rviz/Marker rviz/MarkerArray rviz/Odometry rviz/Path rviz/PointCloud rviz/PointCloud2 rviz/PointStamped rviz/Polygon rviz/Pose rviz/PoseArray rviz/PoseWithCovariance rviz/Range rviz/RelativeHumidity rviz/RobotModel rviz/TF rviz/Temperature rviz/WrenchStamped rviz_plugin/AerialMapDisplay rviz_plugin_tutorials/Imu
Hi,
Are there any plans to migrate to ROS2?
Thanks
Launching the demo.launch should not produce errors.
It's complaining about missing frames. Generating two frames (e.g. "map" and "gps_sensor") by adding a tf-publisher in the launch-file should fix that.
I've noticed a lot of refactoring being done. Glad to see this code is maintained!
Would you also be interested in creating a release for melodic so we don't need to build from source?
Thanks for considering!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.