Debugging tools

Functions

template<class typeparams >
int sanity_check_tree (list< vertex_t * > &list_vertices_in)
 Checks whether the given list vertices is a tree structure.
template<class typeparams >
int sanity_check_monotonicty (list< vertex_t * > &list_vertices_in)
 Checks whether the given list vertices satisfies the monotonicity constraint.
template<class typeparams >
int sanity_check_additivity (list< vertex_t * > &list_vertices_in)
 Checks whether the given list vertices satisfies the additivity constraint.

Detailed Description

This module collects classes and functions that can be used to debug sampling-based motion planning code.


Function Documentation

template<class typeparams >
int sanity_check_additivity ( list< vertex_t * > &  list_vertices_in)

Checks whether the given list vertices satisfies the additivity constraint.

The additivity constraint can be described as follows. If a vertex v_i has cost c_i and it has an outgoing edge (v_i, v_j) with cost c_{i,j}, then the cost of v_j has to be exactly as c_i + c_{i,j}. That is, the cost of a vertex is the cost of its parent plus the cost along the edge connecting the vertex to its parent. This function will report an error if the given set of vertices does not contitute a tree structure.

Parameters:
list_vertices_inA list of all the vertices
Returns:
Returns 1 for success, a non-positive value to indicate an error
template<class typeparams >
int sanity_check_monotonicty ( list< vertex_t * > &  list_vertices_in)

Checks whether the given list vertices satisfies the monotonicity constraint.

The monotonicity constraint can be described as follows. If a vertex v_i has cost c_i and it has an outgoing edge (v_i, v_j), then the cost of v_j has to be at least as much as c_i. That is, the cost should not decrease as one moves down the edges of the tree towards the leaf vertices. This function will report an error if the given set of vertices does not contitute a tree structure.

Parameters:
list_vertices_inA list of all the vertices
Returns:
Returns 1 for success, a non-positive value to indicate an error
template<class typeparams >
int sanity_check_tree ( list< vertex_t * > &  list_vertices_in)

Checks whether the given list vertices is a tree structure.

This function can be used conveniently to check whether a given list of of vertices satisfies all constraints of being a tree structure. The function also checks whether the costs along the edges and those on the vertices satisfy the additiviy rule.

Parameters:
list_vertices_inA list of all the vertices
Returns:
Returns 1 for success, a non-positive value to indicate an error