smp::collision_checker_mu_calculus< typeparams, NUM_DIMENSIONS > Class Template Reference

mu-calculus collision checker More...

#include <mu_calculus.h>

Inheritance diagram for smp::collision_checker_mu_calculus< typeparams, NUM_DIMENSIONS >:
smp::collision_checker_base< typeparams >

List of all members.

Public Member Functions

int cc_update_insert_vertex (vertex_t *vertex_in)
 Update function for vertex insertion.
int cc_update_insert_edge (edge_t *edge_in)
 Update function for edge insertion.
int cc_update_delete_vertex (vertex_t *vertex_in)
 Update function for vertex deletion.
int cc_update_delete_edge (edge_t *edge_in)
 Update function for edge insertion.
int check_collision_state (state_t *state_in)
 Checks whether a given state is collision free.
int check_collision_trajectory (trajectory_t *trajectory_in)
 Checks whether a given trajectory is collision free.
int set_discretization_steps (int num_discretization_steps_in)
 Sets the number of discretization steps.
int set_discretization_length (double discretization_length_in)
 Sets the length for the discretization.
int add_region (region_t &region_in)
 Adds a new region to the list of regions.

Detailed Description

template<class typeparams, int NUM_DIMENSIONS>
class smp::collision_checker_mu_calculus< typeparams, NUM_DIMENSIONS >

mu-calculus collision checker

This class implements a standard collision checker for the mu-calculus model checker. The mu-calculus model checer requires each trajectory to traverse from one region to another at most twice. This collision checker ensures that this property holds as an invariant.

Examples:

libbot_rrg_single_integrator_mu_calculus.cpp, and standalone_rrg_single_integrator_mu_calculus.cpp.


Member Function Documentation

template<class typeparams , int NUM_DIMENSIONS>
int smp::collision_checker_mu_calculus< typeparams, NUM_DIMENSIONS >::add_region ( region_t region_in)

Adds a new region to the list of regions.

This function adds a new region to the list of regions. Note that the NUM_DIMENSIONS template argument of the region and this class must match. Otherwise, compuilation errors will occur.

Parameters:
region_inThe reference to the new obstacle
Returns:
Returns 1 for success, a non-positive value to indicate error.
template<class typeparams , int NUM_DIMENSIONS>
int smp::collision_checker_mu_calculus< typeparams, NUM_DIMENSIONS >::cc_update_delete_edge ( edge_t edge_in) [virtual]

Update function for edge insertion.

This function is called by the planner whenever an edge is delete from the graph. A pointer to the edge is given as an argument.

Parameters:
edge_inA pointer to deleted edge.
Returns:
Return 1 for success, a non-positive value to indiacate error.

Implements smp::collision_checker_base< typeparams >.

template<class typeparams , int NUM_DIMENSIONS>
int smp::collision_checker_mu_calculus< typeparams, NUM_DIMENSIONS >::cc_update_delete_vertex ( vertex_t vertex_in) [virtual]

Update function for vertex deletion.

This function is called by the planner whenever a vertex is deleted from the graph. A pointer to the vertex is given as an argument.

Parameters:
vertex_inA pointer to deleted vertex.
Returns:
Return 1 if success, a non-positive value to indiacate error.

Implements smp::collision_checker_base< typeparams >.

template<class typeparams , int NUM_DIMENSIONS>
int smp::collision_checker_mu_calculus< typeparams, NUM_DIMENSIONS >::cc_update_insert_edge ( edge_t edge_in) [virtual]

Update function for edge insertion.

This function is called by the planner whenever a new edge is added to the graph. A pointer to the new edge is given as an argument.

Parameters:
edge_inA pointer to the new edge.
Returns:
Return 1 for success, a non-positive value to indiacate error.

Implements smp::collision_checker_base< typeparams >.

template<class typeparams , int NUM_DIMENSIONS>
int smp::collision_checker_mu_calculus< typeparams, NUM_DIMENSIONS >::cc_update_insert_vertex ( vertex_t vertex_in) [virtual]

Update function for vertex insertion.

This function is called by the planner whenever a new vertex is added to the graph. A pointer to the new vertex is given as an argument.

Parameters:
vertex_inA pointer to the new vertex.
Returns:
Return 1 if success, a non-positive value to indiacate error.

Implements smp::collision_checker_base< typeparams >.

template<class typeparams , int NUM_DIMENSIONS>
int smp::collision_checker_mu_calculus< typeparams, NUM_DIMENSIONS >::check_collision_state ( state_t *  state_in) [virtual]

Checks whether a given state is collision free.

Parameters:
state_inThe state that will be checked for collision.
Returns:
Returns 1 if the trajectory is collision-free, 0 if the trajectory collides with an obstacle, and a non-positive if error.

Implements smp::collision_checker_base< typeparams >.

template<class typeparams , int NUM_DIMENSIONS>
int smp::collision_checker_mu_calculus< typeparams, NUM_DIMENSIONS >::check_collision_trajectory ( trajectory_t trajectory_in) [virtual]

Checks whether a given trajectory is collision free.

Parameters:
trajectory_inThe trajectory that will be checked for collision.
Returns:
Returns 1 if the trajectory is collision-free, 0 if the trajectory collides with an obstacle, and a non-positive if error.

Implements smp::collision_checker_base< typeparams >.

template<class typeparams , int NUM_DIMENSIONS>
int smp::collision_checker_mu_calculus< typeparams, NUM_DIMENSIONS >::set_discretization_length ( double  discretization_length_in)

Sets the length for the discretization.

This function can be used to set the length of the discretization. In this case, the trajectory between two states is approximated by a line connecting them, and discretized in such a way that the maximum length of any segment is at most the parameter provided to this function.

Parameters:
discretization_length_inLength of the discretization.
Returns:
Returns 1 for success, a non-positive value to indicate error.
template<class typeparams , int NUM_DIMENSIONS>
int smp::collision_checker_mu_calculus< typeparams, NUM_DIMENSIONS >::set_discretization_steps ( int  num_discretization_steps_in)

Sets the number of discretization steps.

This function can be used to set the number of intermediate states in the discretization process. In this case, the trajectory between two consecutive states is approximated by a straight line. And this line is discretized in such a way that the line includes number of states exactly equal to that provided to this function.

Parameters:
num_discretization_steps_inNumber of discretization steps.
Returns:
Returns 1 for success, a non-positive value to indicate error.

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