Classes | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
rviz::AerialMapDisplay Class Reference

Displays a satellite map along the XY plane. More...

#include <aerialmap_display.h>

Inheritance diagram for rviz::AerialMapDisplay:
Inheritance graph
[legend]

Classes

struct  MapObject
 

Public Member Functions

 AerialMapDisplay ()
 
void reset () override
 
void update (float, float) override
 
 ~AerialMapDisplay () override
 
- Public Member Functions inherited from rviz::Display
virtual void deleteStatus (const QString &name)
 
void deleteStatusStd (const std::string &name)
 
 Display ()
 
void emitTimeSignal (ros::Time time)
 
QWidget * getAssociatedWidget () const
 
PanelDockWidgetgetAssociatedWidgetPanel ()
 
virtual QString getClassId () const
 
Ogre::SceneNode * getSceneNode () const
 
QVariant getViewData (int column, int role) const override
 
Qt::ItemFlags getViewFlags (int column) const override
 
uint32_t getVisibilityBits ()
 
void initialize (DisplayContext *context)
 
bool isEnabled () const
 
void load (const Config &config) override
 
void save (Config config) const override
 
void setAssociatedWidget (QWidget *widget)
 
virtual void setClassId (const QString &class_id)
 
void setFixedFrame (const QString &fixed_frame)
 
void setName (const QString &name) override
 
virtual void setStatus (StatusProperty::Level level, const QString &name, const QString &text)
 
void setStatusStd (StatusProperty::Level level, const std::string &name, const std::string &text)
 
virtual void setTopic (const QString &topic, const QString &datatype)
 
void setVisibilityBits (uint32_t bits)
 
void unsetVisibilityBits (uint32_t bits)
 
 ~Display () override
 
- Public Member Functions inherited from rviz::BoolProperty
 BoolProperty (const QString &name=QString(), bool default_value=false, const QString &description=QString(), Property *parent=nullptr, const char *changed_slot=nullptr, QObject *receiver=nullptr)
 
virtual bool getBool () const
 
bool getDisableChildren () override
 
bool getDisableChildrenIfFalse ()
 
void setDisableChildrenIfFalse (bool disable)
 
 ~BoolProperty () override
 
- Public Member Functions inherited from rviz::Property
virtual void addChild (Property *child, int index=-1)
 
PropertychildAt (int index) const
 
virtual PropertychildAtUnchecked (int index) const
 
virtual void collapse ()
 
bool contains (Property *possible_child) const
 
virtual QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option)
 
virtual void expand ()
 
virtual QString getDescription () const
 
virtual bool getHidden () const
 
virtual QIcon getIcon () const
 
PropertyTreeModelgetModel () const
 
virtual QString getName () const
 
std::string getNameStd () const
 
PropertygetParent () const
 
virtual bool getReadOnly ()
 
virtual QVariant getValue () const
 
void hide ()
 
void insertChildSorted (Property *child)
 
bool isAncestorOf (Property *possible_child) const
 
virtual void moveChild (int from_index, int to_index)
 
virtual int numChildren () const
 
virtual bool paint (QPainter *painter, const QStyleOptionViewItem &option) const
 
 Property (const QString &name=QString(), const QVariant default_value=QVariant(), const QString &description=QString(), Property *parent=nullptr, const char *changed_slot=nullptr, QObject *receiver=nullptr)
 
virtual void removeChildren (int start_index=0, int count=-1)
 
int rowNumberInParent () const
 
virtual void setDescription (const QString &description)
 
virtual void setHidden (bool hidden)
 
virtual void setIcon (const QIcon &icon)
 
void setModel (PropertyTreeModel *model)
 
void setParent (Property *new_parent)
 
virtual void setReadOnly (bool read_only)
 
void setShouldBeSaved (bool save)
 
virtual bool setValue (const QVariant &new_value)
 
bool shouldBeSaved () const
 
void show ()
 
virtual PropertysubProp (const QString &sub_name)
 
PropertytakeChild (Property *child)
 
virtual PropertytakeChildAt (int index)
 
 ~Property () override
 

Protected Slots

void updateAlpha ()
 
void updateBlocks ()
 
void updateDrawUnder ()
 
void updateMapFrame ()
 
void updateMapTransformType ()
 
void updateTileUrl ()
 
void updateTopic ()
 
void updateUtmFrame ()
 
void updateUtmZone ()
 
void updateXYReference ()
 
void updateZOffset ()
 
void updateZoom ()
 
void updateZReference ()
 

Protected Member Functions

void assembleScene ()
 
void checkRequestErrorRate ()
 
void clearAll ()
 
void createTileObjects ()
 
void destroyTileObjects ()
 
void navFixCallback (sensor_msgs::NavSatFixConstPtr const &msg)
 
void onDisable () override
 
void onEnable () override
 
void onInitialize () override
 
void requestTileTextures ()
 
virtual void subscribe ()
 
void tfReferencePeriodicUpdate (const ros::TimerEvent &)
 
void transformMapTileToFixedFrame ()
 
void transformTileToMapFrame ()
 
void transformTileToReferenceFrame ()
 
void transformTileToUtmFrame ()
 
void triggerSceneAssembly ()
 
virtual void unsubscribe ()
 
bool updateCenterTile (sensor_msgs::NavSatFixConstPtr const &msg)
 
- Protected Member Functions inherited from rviz::Display
virtual void clearStatuses ()
 
virtual void fixedFrameChanged ()
 
bool initialized () const
 
- Protected Member Functions inherited from rviz::Property
void loadValue (const Config &config)
 

Protected Attributes

float alpha_
 the alpha value of the tile's material More...
 
FloatPropertyalpha_property_
 
int blocks_
 the number of tiles loaded in each direction around the center tile More...
 
IntPropertyblocks_property_
 
boost::optional< TileIdcenter_tile_ { boost::none }
 Last request()ed tile id (which is the center tile) More...
 
geometry_msgs::PoseStamped center_tile_pose_
 translation of the center-tile w.r.t. the map/utm frame More...
 
bool dirty_ { false }
 whether we need to re-query and re-assemble the tiles More...
 
bool draw_under_
 determines which render queue to use More...
 
Propertydraw_under_property_
 
std::string map_frame_
 the map frame, rigidly attached to the world with ENU convention - see https://www.ros.org/reps/rep-0105.html#map More...
 
TfFramePropertymap_frame_property_
 
MapTransformType map_transform_type_
 Whether the tiles should be transformed via an intermediate map frame, or directly via a UTM frame. More...
 
EnumPropertymap_transform_type_property_
 
ros::Subscriber navsat_fix_sub_
 the subscriber for the NavSatFix topic More...
 
std::vector< MapObjectobjects_
 the tile scene objects More...
 
boost::optional< WGSCoordinateref_coords_
 lat/lon of the reference position that lead to updating the tiles More...
 
sensor_msgs::NavSatFixConstPtr ref_fix_ { nullptr }
 the last NavSatFix message that lead to updating the tiles More...
 
std::shared_ptr< tf2_ros::Buffer const > tf_buffer_ { nullptr }
 buffer for tf lookups not related to fixed-frame More...
 
ros::Duration tf_reference_update_duration_
 timeout for periodic TF_FRAME reference update More...
 
ros::Timer tf_reference_update_timer_
 timer that updates the reference position when using TF_FRAME references More...
 
TileCacheDelay< OgreTiletile_cache_
 caches tile images, hashed by their fetch URL More...
 
std::string tile_url_
 the URL of the tile server to use More...
 
StringPropertytile_url_property_
 
RosTopicPropertytopic_property_
 
std::string utm_frame_
 the utm frame, representing a UTM coordinate frame in a chosen zone More...
 
TfFramePropertyutm_frame_property_
 
int utm_zone_
 UTM zone to work in. More...
 
IntPropertyutm_zone_property_
 
std::string xy_reference_frame_
 XY position reference TF frame (if TF_FRAME type is used) More...
 
PositionReferencePropertyxy_reference_property_
 
PositionReferenceType xy_reference_type_
 Type of XY position reference. More...
 
double z_offset_
 Offset of the tiles in Z axis (relative to map/utm) More...
 
FloatPropertyz_offset_property_
 
std::string z_reference_frame_
 Z position reference TF frame (if TF_FRAME type is used) More...
 
PositionReferencePropertyz_reference_property_
 
PositionReferenceType z_reference_type_
 Type of Z position reference. More...
 
int zoom_
 the zoom to use (Mercator) More...
 
IntPropertyzoom_property_
 
- Protected Attributes inherited from rviz::Display
DisplayContextcontext_
 
QString fixed_frame_
 
Ogre::SceneManager * scene_manager_
 
Ogre::SceneNode * scene_node_
 
ros::NodeHandle threaded_nh_
 
ros::NodeHandle update_nh_
 
- Protected Attributes inherited from rviz::Property
bool child_indexes_valid_
 
QIcon icon_
 
PropertyTreeModelmodel_
 
QVariant value_
 

Additional Inherited Members

- Public Slots inherited from rviz::Display
virtual void onEnableChanged ()
 
void queueRender ()
 
void setEnabled (bool enabled)
 
void setIcon (const QIcon &icon) override
 
- Public Slots inherited from rviz::BoolProperty
bool setBool (bool value)
 
- Signals inherited from rviz::Display
void timeSignal (ros::Time time, QPrivateSignal)
 
- Signals inherited from rviz::Property
void aboutToChange ()
 
void changed ()
 
void childListChanged (Property *this_property)
 

Detailed Description

Displays a satellite map along the XY plane.

Definition at line 66 of file aerialmap_display.h.

Constructor & Destructor Documentation

◆ AerialMapDisplay()

rviz::AerialMapDisplay::AerialMapDisplay ( )

Definition at line 65 of file aerialmap_display.cpp.

◆ ~AerialMapDisplay()

rviz::AerialMapDisplay::~AerialMapDisplay ( )
override

Definition at line 160 of file aerialmap_display.cpp.

Member Function Documentation

◆ assembleScene()

void rviz::AerialMapDisplay::assembleScene ( )
protected

Generates the tile's render geometry and applies the requested textures

Definition at line 826 of file aerialmap_display.cpp.

◆ checkRequestErrorRate()

void rviz::AerialMapDisplay::checkRequestErrorRate ( )
protected

Checks how may tiles were loaded successfully, and sets the status accordingly.

Definition at line 801 of file aerialmap_display.cpp.

◆ clearAll()

void rviz::AerialMapDisplay::clearAll ( )
protected

Destroys the scene-object and all children and their textures, along with the center-tile memory

Definition at line 601 of file aerialmap_display.cpp.

◆ createTileObjects()

void rviz::AerialMapDisplay::createTileObjects ( )
protected

Creates the tile scene-objects and their materials

Definition at line 628 of file aerialmap_display.cpp.

◆ destroyTileObjects()

void rviz::AerialMapDisplay::destroyTileObjects ( )
protected

Destroys the tile scene-objects

Definition at line 611 of file aerialmap_display.cpp.

◆ navFixCallback()

void rviz::AerialMapDisplay::navFixCallback ( sensor_msgs::NavSatFixConstPtr const &  msg)
protected

GPS topic callback

Definition at line 678 of file aerialmap_display.cpp.

◆ onDisable()

void rviz::AerialMapDisplay::onDisable ( )
overrideprotectedvirtual

Reimplemented from rviz::Display.

Definition at line 182 of file aerialmap_display.cpp.

◆ onEnable()

void rviz::AerialMapDisplay::onEnable ( )
overrideprotectedvirtual

Reimplemented from rviz::Display.

Definition at line 176 of file aerialmap_display.cpp.

◆ onInitialize()

void rviz::AerialMapDisplay::onInitialize ( )
overrideprotectedvirtual

Reimplemented from rviz::Display.

Definition at line 166 of file aerialmap_display.cpp.

◆ requestTileTextures()

void rviz::AerialMapDisplay::requestTileTextures ( )
protected

Load images to cache (non-blocking)

Definition at line 769 of file aerialmap_display.cpp.

◆ reset()

void rviz::AerialMapDisplay::reset ( )
overridevirtual

Reimplemented from rviz::Display.

Definition at line 1248 of file aerialmap_display.cpp.

◆ subscribe()

void rviz::AerialMapDisplay::subscribe ( )
protectedvirtual

Definition at line 188 of file aerialmap_display.cpp.

◆ tfReferencePeriodicUpdate()

void rviz::AerialMapDisplay::tfReferencePeriodicUpdate ( const ros::TimerEvent )
protected

Called periodically to update TF_FRAME position references.

Definition at line 1150 of file aerialmap_display.cpp.

◆ transformMapTileToFixedFrame()

void rviz::AerialMapDisplay::transformMapTileToFixedFrame ( )
protected

Transforms the tile objects into the fixed frame.

Definition at line 1206 of file aerialmap_display.cpp.

◆ transformTileToMapFrame()

void rviz::AerialMapDisplay::transformTileToMapFrame ( )
protected

Transforms the tile objects into the map frame.

Definition at line 991 of file aerialmap_display.cpp.

◆ transformTileToReferenceFrame()

void rviz::AerialMapDisplay::transformTileToReferenceFrame ( )
protected

Transforms the tile objects into the reference (map/utm) frame.

Definition at line 978 of file aerialmap_display.cpp.

◆ transformTileToUtmFrame()

void rviz::AerialMapDisplay::transformTileToUtmFrame ( )
protected

Transforms the tile objects into the UTM frame.

Definition at line 1061 of file aerialmap_display.cpp.

◆ triggerSceneAssembly()

void rviz::AerialMapDisplay::triggerSceneAssembly ( )
protected

Triggers to (re-) assemble the scene

Definition at line 820 of file aerialmap_display.cpp.

◆ unsubscribe()

void rviz::AerialMapDisplay::unsubscribe ( )
protectedvirtual

Definition at line 212 of file aerialmap_display.cpp.

◆ update()

void rviz::AerialMapDisplay::update ( float  ,
float   
)
overridevirtual

Reimplemented from rviz::Display.

Definition at line 665 of file aerialmap_display.cpp.

◆ updateAlpha

void rviz::AerialMapDisplay::updateAlpha ( )
protectedslot

Definition at line 217 of file aerialmap_display.cpp.

◆ updateBlocks

void rviz::AerialMapDisplay::updateBlocks ( )
protectedslot

Definition at line 336 of file aerialmap_display.cpp.

◆ updateCenterTile()

bool rviz::AerialMapDisplay::updateCenterTile ( sensor_msgs::NavSatFixConstPtr const &  msg)
protected

Triggers texture update if the center-tile changed w.r.t. the current one. Returns true if the tile has been actually updated.

Definition at line 688 of file aerialmap_display.cpp.

◆ updateDrawUnder

void rviz::AerialMapDisplay::updateDrawUnder ( )
protectedslot

Definition at line 243 of file aerialmap_display.cpp.

◆ updateMapFrame

void rviz::AerialMapDisplay::updateMapFrame ( )
protectedslot

Definition at line 417 of file aerialmap_display.cpp.

◆ updateMapTransformType

void rviz::AerialMapDisplay::updateMapTransformType ( )
protectedslot

Definition at line 378 of file aerialmap_display.cpp.

◆ updateTileUrl

void rviz::AerialMapDisplay::updateTileUrl ( )
protectedslot

Definition at line 269 of file aerialmap_display.cpp.

◆ updateTopic

void rviz::AerialMapDisplay::updateTopic ( )
protectedslot

Definition at line 363 of file aerialmap_display.cpp.

◆ updateUtmFrame

void rviz::AerialMapDisplay::updateUtmFrame ( )
protectedslot

Definition at line 446 of file aerialmap_display.cpp.

◆ updateUtmZone

void rviz::AerialMapDisplay::updateUtmZone ( )
protectedslot

Definition at line 475 of file aerialmap_display.cpp.

◆ updateXYReference

void rviz::AerialMapDisplay::updateXYReference ( )
protectedslot

Definition at line 504 of file aerialmap_display.cpp.

◆ updateZOffset

void rviz::AerialMapDisplay::updateZOffset ( )
protectedslot

Definition at line 594 of file aerialmap_display.cpp.

◆ updateZoom

void rviz::AerialMapDisplay::updateZoom ( )
protectedslot

Definition at line 306 of file aerialmap_display.cpp.

◆ updateZReference

void rviz::AerialMapDisplay::updateZReference ( )
protectedslot

Definition at line 554 of file aerialmap_display.cpp.

Member Data Documentation

◆ alpha_

float rviz::AerialMapDisplay::alpha_
protected

the alpha value of the tile's material

Definition at line 208 of file aerialmap_display.h.

◆ alpha_property_

FloatProperty* rviz::AerialMapDisplay::alpha_property_
protected

Definition at line 197 of file aerialmap_display.h.

◆ blocks_

int rviz::AerialMapDisplay::blocks_
protected

the number of tiles loaded in each direction around the center tile

Definition at line 216 of file aerialmap_display.h.

◆ blocks_property_

IntProperty* rviz::AerialMapDisplay::blocks_property_
protected

Definition at line 196 of file aerialmap_display.h.

◆ center_tile_

boost::optional<TileId> rviz::AerialMapDisplay::center_tile_ { boost::none }
protected

Last request()ed tile id (which is the center tile)

Definition at line 246 of file aerialmap_display.h.

◆ center_tile_pose_

geometry_msgs::PoseStamped rviz::AerialMapDisplay::center_tile_pose_
protected

translation of the center-tile w.r.t. the map/utm frame

Definition at line 248 of file aerialmap_display.h.

◆ dirty_

bool rviz::AerialMapDisplay::dirty_ { false }
protected

whether we need to re-query and re-assemble the tiles

Definition at line 238 of file aerialmap_display.h.

◆ draw_under_

bool rviz::AerialMapDisplay::draw_under_
protected

determines which render queue to use

Definition at line 210 of file aerialmap_display.h.

◆ draw_under_property_

Property* rviz::AerialMapDisplay::draw_under_property_
protected

Definition at line 198 of file aerialmap_display.h.

◆ map_frame_

std::string rviz::AerialMapDisplay::map_frame_
protected

the map frame, rigidly attached to the world with ENU convention - see https://www.ros.org/reps/rep-0105.html#map

Definition at line 220 of file aerialmap_display.h.

◆ map_frame_property_

TfFrameProperty* rviz::AerialMapDisplay::map_frame_property_
protected

Definition at line 200 of file aerialmap_display.h.

◆ map_transform_type_

MapTransformType rviz::AerialMapDisplay::map_transform_type_
protected

Whether the tiles should be transformed via an intermediate map frame, or directly via a UTM frame.

Definition at line 218 of file aerialmap_display.h.

◆ map_transform_type_property_

EnumProperty* rviz::AerialMapDisplay::map_transform_type_property_
protected

Definition at line 199 of file aerialmap_display.h.

◆ navsat_fix_sub_

ros::Subscriber rviz::AerialMapDisplay::navsat_fix_sub_
protected

the subscriber for the NavSatFix topic

Definition at line 190 of file aerialmap_display.h.

◆ objects_

std::vector<MapObject> rviz::AerialMapDisplay::objects_
protected

the tile scene objects

Definition at line 187 of file aerialmap_display.h.

◆ ref_coords_

boost::optional<WGSCoordinate> rviz::AerialMapDisplay::ref_coords_
protected

lat/lon of the reference position that lead to updating the tiles

Definition at line 242 of file aerialmap_display.h.

◆ ref_fix_

sensor_msgs::NavSatFixConstPtr rviz::AerialMapDisplay::ref_fix_ { nullptr }
protected

the last NavSatFix message that lead to updating the tiles

Definition at line 240 of file aerialmap_display.h.

◆ tf_buffer_

std::shared_ptr<tf2_ros::Buffer const> rviz::AerialMapDisplay::tf_buffer_ { nullptr }
protected

buffer for tf lookups not related to fixed-frame

Definition at line 251 of file aerialmap_display.h.

◆ tf_reference_update_duration_

ros::Duration rviz::AerialMapDisplay::tf_reference_update_duration_
protected

timeout for periodic TF_FRAME reference update

Definition at line 254 of file aerialmap_display.h.

◆ tf_reference_update_timer_

ros::Timer rviz::AerialMapDisplay::tf_reference_update_timer_
protected

timer that updates the reference position when using TF_FRAME references

Definition at line 256 of file aerialmap_display.h.

◆ tile_cache_

TileCacheDelay<OgreTile> rviz::AerialMapDisplay::tile_cache_
protected

caches tile images, hashed by their fetch URL

Definition at line 244 of file aerialmap_display.h.

◆ tile_url_

std::string rviz::AerialMapDisplay::tile_url_
protected

the URL of the tile server to use

Definition at line 212 of file aerialmap_display.h.

◆ tile_url_property_

StringProperty* rviz::AerialMapDisplay::tile_url_property_
protected

Definition at line 194 of file aerialmap_display.h.

◆ topic_property_

RosTopicProperty* rviz::AerialMapDisplay::topic_property_
protected

Definition at line 193 of file aerialmap_display.h.

◆ utm_frame_

std::string rviz::AerialMapDisplay::utm_frame_
protected

the utm frame, representing a UTM coordinate frame in a chosen zone

Definition at line 222 of file aerialmap_display.h.

◆ utm_frame_property_

TfFrameProperty* rviz::AerialMapDisplay::utm_frame_property_
protected

Definition at line 201 of file aerialmap_display.h.

◆ utm_zone_

int rviz::AerialMapDisplay::utm_zone_
protected

UTM zone to work in.

Definition at line 224 of file aerialmap_display.h.

◆ utm_zone_property_

IntProperty* rviz::AerialMapDisplay::utm_zone_property_
protected

Definition at line 202 of file aerialmap_display.h.

◆ xy_reference_frame_

std::string rviz::AerialMapDisplay::xy_reference_frame_
protected

XY position reference TF frame (if TF_FRAME type is used)

Definition at line 228 of file aerialmap_display.h.

◆ xy_reference_property_

PositionReferenceProperty* rviz::AerialMapDisplay::xy_reference_property_
protected

Definition at line 203 of file aerialmap_display.h.

◆ xy_reference_type_

PositionReferenceType rviz::AerialMapDisplay::xy_reference_type_
protected

Type of XY position reference.

Definition at line 226 of file aerialmap_display.h.

◆ z_offset_

double rviz::AerialMapDisplay::z_offset_
protected

Offset of the tiles in Z axis (relative to map/utm)

Definition at line 234 of file aerialmap_display.h.

◆ z_offset_property_

FloatProperty* rviz::AerialMapDisplay::z_offset_property_
protected

Definition at line 205 of file aerialmap_display.h.

◆ z_reference_frame_

std::string rviz::AerialMapDisplay::z_reference_frame_
protected

Z position reference TF frame (if TF_FRAME type is used)

Definition at line 232 of file aerialmap_display.h.

◆ z_reference_property_

PositionReferenceProperty* rviz::AerialMapDisplay::z_reference_property_
protected

Definition at line 204 of file aerialmap_display.h.

◆ z_reference_type_

PositionReferenceType rviz::AerialMapDisplay::z_reference_type_
protected

Type of Z position reference.

Definition at line 230 of file aerialmap_display.h.

◆ zoom_

int rviz::AerialMapDisplay::zoom_
protected

the zoom to use (Mercator)

Definition at line 214 of file aerialmap_display.h.

◆ zoom_property_

IntProperty* rviz::AerialMapDisplay::zoom_property_
protected

Definition at line 195 of file aerialmap_display.h.


The documentation for this class was generated from the following files:


rviz_satellite
Author(s): Gareth Cross , Andre Schröder
autogenerated on Thu May 4 2023 02:31:43