MIRA
Domain MapCropper


This package provides (Micro)units that subscribe to a map channel and republish a certain region of the map to another channel. Different unit types are implemented each for a specific map type, at the moment these are OccupancyGrid (static and dynamic occupancy maps), GridMap<double, 1> (CostMapper maps), GridMap<uint8, 3> (NavStatus published by Pilot). This is done via a templated implementation and specializations for the mentioned types.

The purpose of selecting and publishing a region of the map separately is to save network bandwidth when viewing a map from a remote framework. With large maps at high update rates (e.g. CostMapper costmap), subscribing to the original map can be very demanding on network bandwidth. Even though the user may only be interested in the region around the robot, the entire channel content (map) must be transferred with each update. By publishing a cropped map region (in the remote framework!), only a fraction of the data must be transferred to view the region of interest.

How to instantiate it:

Of course it is possible to include MapCropper(s) with the original application configuration. However, since its purpose is to make remote monitoring more efficient, it will not always be clear beforehand for which channels it will be required, and it does not make much sense to include a MapCropper for any channel it might support (i.e., that just has the right type). Instead, MapCropper is meant to be instantiated by the (remotely connected) user on demand.

Obviously, the MapCropper must run in the original framework with the map to be cropped, not in a remote framework. This can be achieved by loading a MapCropper configuration into the original framework using the framework's 'loadConfig' RPC method.

Do NOT: miracenter MapCropper.xml -k <ip:port>
this will instantiate the MapCropper on the wrong end of the network

Do: mirainspect rpc call <RemoteFrameworkID>.loadConfig("<map cropper config>") -k <ip:port>
but this requires writing the config on one line and escaping quotes, whitespaces, etc. for bash

Do better: miracenter -k <ip:port>
–> use Configuration Editor to edit and load the config

MapCroppers

There are 3 specific units, named OccupancyGridCropper, CostMapCropper, NavStatusCropper. Each of them can crop one specific map type.

Channels

The MapType for the channels below depends on the individual unit:

Subscribed

Published

Transforms

Parameters