Skip to content

GISNode

This module contains GISNode, a ROS node that requests orthoimagery from the GIS and publishes it to ROS.

Classes:

GISNode(*args, **kwargs)Publishes the orthoimage, DEM, and their CRS as a single, atomic ROS message.

class gisnav.core.gis_node.GISNode(*args, **kwargs)

Bases: Node

Publishes the orthoimage, DEM, and their CRS as a single, atomic ROS message.

OWSLib exception handling

OWSLib, as of version 0.25.0, uses the Python requests library under the hood but does not document the various exceptions it raises that are passed through by OWSLib as part of its public API. The private method that calls the OWSLib method that implements the GetMap call is therefore expected to raise > errors and exceptions specific to the requests library.

These errors and exceptions are not handled by the GISNode to avoid a direct dependency on requests. They are therefore handled as unexpected errors.

Class initializer

  • Parameters:
    • args – Positional arguments to parent Node constructor
    • kwargs – Keyword arguments to parent Node constructor

Attributes:

ROS_D_DEM_LAYERSDefault value for wms_dem_layers
ROS_D_DEM_STYLESDefault value for wms_dem_styles
ROS_D_IMAGE_FORMATDefault value for wms_format
ROS_D_IMAGE_TRANSPARENCYDefault value for wms_transparency
ROS_D_LAYERSDefault value for wms_layers
ROS_D_MAP_OVERLAP_UPDATE_THRESHOLDThe default ROS parameter for the minimum required overlap ratio between the bounding boxes of the current and new orthoimages.
ROS_D_PUBLISH_RATEDefault value for publish_rate
ROS_D_SRSDefault value for wms_srs
ROS_D_STYLESDefault value for wms_styles
ROS_D_TIMEOUTDefault value for wms_timeout
ROS_D_URLDefault value for wms_url
ROS_D_VERSIONDefault value for wms_version
ROS_D_WMS_POLL_RATEDefault value for wms_poll_rate
bounding_boxSubscribed bounding box of the camera's ground-projected FOV, or None if unknown
camera_infoSubscribed camera info for determining appropriate orthoimage resolution, or None if unknown
min_map_overlap_update_thresholdROS parameter for the minimum required overlap ratio between the bounding boxes of the current and new orthoimages.
orthoimageOutgoing orthoimage and DEM raster
publish_ratePublish rate in Hz for the orthoimage message
wms_dem_layersROS WMS parameter for WMS request layers for DEM GetMap requests
wms_dem_stylesROS parameter for WMS request styles for :DEM GetMap requests
wms_formatROS parameter for WMS request format for all GetMap requests
wms_layersROS parameter for WMS request layers for orthoimagery GetMap requests
wms_poll_rateROS parameter for WMS connection status poll rate in Hz
wms_srsROS parameter for WMS request CRS for all GetMap requests
wms_stylesROS parameter for WMS request styles for orthoimegry GetMap requests
wms_timeoutROS WMS request timeout [seconds] parameter
wms_transparencyROS parameter for WMS request transparency for all GetMap requests
wms_urlROS WMS client endpoint URL parameter
wms_versionROS WMS protocol version parameter

ROS_D_DEM_LAYERS = ['dem']

Default value for wms_dem_layers

TIP

This is an optional elevation layer that makes the pose estimation more accurate especially when flying at low altitude. It should be a grayscale raster with pixel values corresponding meters relative to vertical datum. Vertical datum can be whatever system is used (e.g. USGS DEM uses NAVD 88), although it is assumed to be flat across the flight mission area.

ROS_D_DEM_STYLES = ['']

Default value for wms_dem_styles

TIP

Must be same length as ROS_D_DEM_LAYERS. Use empty strings for server default styles.

ROS_D_IMAGE_FORMAT = 'image/jpeg'

Default value for wms_format

ROS_D_IMAGE_TRANSPARENCY = False

Default value for wms_transparency

NOTE

This parameter is not supported by jpeg format

ROS_D_LAYERS = ['imagery']

Default value for wms_layers

TIP

The combined layers should cover the flight area of the vehicle at high resolution. Typically this list would have just one layer for high resolution aerial or satellite imagery.

ROS_D_MAP_OVERLAP_UPDATE_THRESHOLD = 0.85

The default ROS parameter for the minimum required overlap ratio between the bounding boxes of the current and new orthoimages. If the overlap is below this threshold, a new map request is triggered.

ROS_D_PUBLISH_RATE = 1.0

Default value for publish_rate

ROS_D_SRS = 'EPSG:4326'

Default value for wms_srs

ROS_D_STYLES = ['']

Default value for wms_styles

TIP

Must be same length as ROS_D_LAYERS. Use empty strings for server default styles.

ROS_D_TIMEOUT = 10

Default value for wms_timeout

ROS_D_URL = 'http://127.0.0.1:80/wms'

Default value for wms_url

When deploying Docker Compose services the Docker DNS host name of the MapServer container gisnav-mapserver-1 should be used in the URL. This should already be configured in the default launch parameter file which overrides this default value.

Alternatively, if the service is on a different network, use the Docker host URL, or the URL of the reverse proxy.

ROS_D_VERSION = '1.3.0'

Default value for wms_version

ROS_D_WMS_POLL_RATE = 0.1

Default value for wms_poll_rate

property bounding_box : BoundingBox | None

Subscribed bounding box of the camera’s ground-projected FOV, or None if unknown

property camera_info : CameraInfo | None

Subscribed camera info for determining appropriate orthoimage resolution, or None if unknown

property min_map_overlap_update_threshold : float | None

ROS parameter for the minimum required overlap ratio between the bounding boxes of the current and new orthoimages. If the overlap is below this threshold, a new map request is triggered.

old_bounding_box : BoundingBox | None

property orthoimage : OrthoImage | None

Outgoing orthoimage and DEM raster

property publish_rate : float | None

Publish rate in Hz for the orthoimage message

property wms_dem_layers : List[str] | None

ROS WMS parameter for WMS request layers for DEM GetMap requests

property wms_dem_styles : List[str] | None

ROS parameter for WMS request styles for :DEM GetMap requests

property wms_format : str | None

ROS parameter for WMS request format for all GetMap requests

property wms_layers : List[str] | None

ROS parameter for WMS request layers for orthoimagery GetMap requests

property wms_poll_rate : float | None

ROS parameter for WMS connection status poll rate in Hz

property wms_srs : str | None

ROS parameter for WMS request CRS for all GetMap requests

property wms_styles : List[str] | None

ROS parameter for WMS request styles for orthoimegry GetMap requests

property wms_timeout : int | None

ROS WMS request timeout [seconds] parameter

property wms_transparency : bool | None

ROS parameter for WMS request transparency for all GetMap requests

property wms_url : str | None

ROS WMS client endpoint URL parameter

property wms_version : str | None

ROS WMS protocol version parameter

GISNav v0.68.1-2-gf2c72641

Released under the MIT License.