Map Processing

For clients of the graph_nav map processing service.

exception bosdyn.client.map_processing.MapProcessingServiceResponseError(response, error_message=None)[source]

Bases: ResponseError

General class of errors for the GraphNav map processing service.

exception bosdyn.client.map_processing.MissingSnapshotsError(response, error_message=None)[source]

Bases: MapProcessingServiceResponseError

The uploaded map has missing waypoint snapshots.

exception bosdyn.client.map_processing.OptimizationFailureError(response, error_message=None)[source]

Bases: MapProcessingServiceResponseError

The anchoring optimization failed.

exception bosdyn.client.map_processing.InvalidGraphError(response, error_message=None)[source]

Bases: MapProcessingServiceResponseError

The graph is invalid topologically, for example containing missing waypoints referenced by edges.

exception bosdyn.client.map_processing.InvalidParamsError(response, error_message=None)[source]

Bases: MapProcessingServiceResponseError

The parameters passed to the optimizer do not make sense (e.g. negative weights).

exception bosdyn.client.map_processing.MaxIterationsError(response, error_message=None)[source]

Bases: MapProcessingServiceResponseError

The optimizer reached the maximum number of iterations before converging.

exception bosdyn.client.map_processing.MaxTimeError(response, error_message=None)[source]

Bases: MapProcessingServiceResponseError

The optimizer timed out before converging.

exception bosdyn.client.map_processing.InvalidHintsError(response, error_message=None)[source]

Bases: MapProcessingServiceResponseError

One or more of the hints passed in to the optimizer are invalid (do not correspond to real waypoints or objects).

exception bosdyn.client.map_processing.InvalidGravityAlignmentError(response, error_message=None)[source]

Bases: MapProcessingServiceResponseError

One or more anchoring hints disagrees with gravity. Ensure the orientation of any hints is correct.

exception bosdyn.client.map_processing.ConstraintViolationError(response, error_message=None)[source]

Bases: MapProcessingServiceResponseError

One or more anchors were moved outside of the desired constraints.

exception bosdyn.client.map_processing.MapModifiedError(response, error_message=None)[source]

Bases: MapProcessingServiceResponseError

The map was modified on the server by another client during processing. Please try again.

class bosdyn.client.map_processing.MapProcessingServiceClient[source]

Bases: BaseClient

Client for the GraphNav map processing service.

default_service_name = 'map-processing-service'
service_type = 'bosdyn.api.graph_nav.MapProcessingService'
process_topology(params, modify_map_on_server, **kwargs)[source]
Process the topology of the map on the server, closing loops and producing a

consistent topology.

Parameters:
  • params – a ProcessTopologyRequest.Params object

  • modify_map_on_server – if true, the map will be modified on the server. If false,

  • it (the subgraph returned by this function should be uploaded back to the server if) –

  • reused. (is to be) –

Returns:

The ProcessTopologyResponse containing new edges to add to the map.

Raises:

RpcError – Problem communicating with the robot

process_anchoring(params, modify_anchoring_on_server, stream_intermediate_results, initial_hint=None, apply_gps_results=False, **kwargs)[source]

Process the anchoring of the map on the server, producing a metrically consistent anchoring.

Parameters:
  • params – a ProcessAnchoringRequest.Params object

  • modify_anchoring_on_server – if true, the map will be modified on the server. If false,

  • it (the anchoring returned by this function should be uploaded back to the server if) –

  • reused. (is to be) –

  • stream_intermediate_results – if true, anchorings from earlier optimizer

  • false (iterations may be included in the response. If) –

  • returned. (only the last iteration will be) –

  • initial_hint – Initial guess at some number of waypoints and world objects and their anchorings.

  • object (This field is an AnchoringHint) –

  • apply_gps_results – if true, the annotations of waypoints in the graph will be modified to include

  • frame (the pose of each waypoint in a GPS centered) –

  • GPS (if the map has) –

Returns:

The ProcessAnchoringResponse containing a new optimized anchoring.

Raises:

RpcError – Problem communicating with the robot