topological_roadmap::Roadmap Class Reference

#include <roadmap.h>

List of all members.

Public Types

typedef msg::RoadmapEdge EdgeInfo
typedef msg::RoadmapNode NodeInfo
typedef std::set< unsigned > Nodes

Public Member Functions

unsigned addEdge (const EdgeInfo &info)
 Add an edge. If the id field of the info is 0, it is filled in by this function.
unsigned addNode (const NodeInfo &info)
 Add a node. If the id of the info field is 0, it is filled in by this function.
void deleteEdge (unsigned id)
 Delete an edge.
GraphEdge edge (unsigned id) const
 Get edge descriptor for id.
const EdgeInfoedgeInfo (unsigned id) const
 Convenience function to get edge info.
Nodes gridNodes (const unsigned g) const
GraphVertex node (unsigned id) const
 Get node descriptor for id.
const NodeInfonodeInfo (unsigned id) const
 Convenience function to get node info.
Roadmapoperator= (const Roadmap &r)
 Assignment.
void recomputeIndexes ()
 Recompute indexing info from the underlying graph.
 Roadmap (const Roadmap &r)
 Copy constructor.
 Roadmap ()
 Default constructor creates empty graph.

Private Attributes

std::map< unsigned, GraphEdgeedge_map_
std::map< unsigned, Nodesgrid_nodes_
unsigned next_edge_id_
unsigned next_node_id_
std::map< unsigned, GraphVertexvertex_map_

Detailed Description

A topological roadmap is overlaid over a topological_map_2d::TopologicalMap and used for navigation. Each roadmap node is a navigation waypoint and refers to some specific position in one of the local grids of the topological map. Each edge represents a navigable path between two waypoints on the same grid. Apart from the grid wrt which it is defined, each waypoint may also be on other grids, and this is what allows navigating across grids.

The class inherits from boost::adjacency_list with some additional indexing information that allows nodes and edges to be referred to using integer ids rather than boost graph descriptors. To maintain this information, all modifying operations on the graph should use {add,remove}{Node,Edge} rather than boost::add_vertex, etc. For other ops use the boost::adjacency_list ops, though some are wrapped for convenience, e.g., node/edgeInfo.

Definition at line 73 of file roadmap.h.


Member Typedef Documentation

typedef msg::RoadmapEdge topological_roadmap::Roadmap::EdgeInfo

Definition at line 78 of file roadmap.h.

typedef msg::RoadmapNode topological_roadmap::Roadmap::NodeInfo

Definition at line 77 of file roadmap.h.

typedef std::set<unsigned> topological_roadmap::Roadmap::Nodes

Definition at line 79 of file roadmap.h.


Constructor & Destructor Documentation

topological_roadmap::Roadmap::Roadmap (  ) 

Default constructor creates empty graph.

Definition at line 63 of file roadmap.cpp.

topological_roadmap::Roadmap::Roadmap ( const Roadmap r  ) 

Copy constructor.

Definition at line 67 of file roadmap.cpp.


Member Function Documentation

unsigned topological_roadmap::Roadmap::addEdge ( const EdgeInfo info  ) 

Add an edge. If the id field of the info is 0, it is filled in by this function.

Return values:
Id of newly added edge.
Exceptions:
UnknownNodeIdException 
DuplicateEdgeIdException 

Definition at line 160 of file roadmap.cpp.

unsigned topological_roadmap::Roadmap::addNode ( const NodeInfo info  ) 

Add a node. If the id of the info field is 0, it is filled in by this function.

Return values:
Id of newly added node.

Definition at line 141 of file roadmap.cpp.

void topological_roadmap::Roadmap::deleteEdge ( unsigned  id  ) 

Delete an edge.

Postcondition:
There's no edge with id id in graph
Exceptions:
UnknownEdgeIdException 

Definition at line 181 of file roadmap.cpp.

GraphEdge topological_roadmap::Roadmap::edge ( unsigned  id  )  const

Get edge descriptor for id.

Exceptions:
UnknownEdgeIdException 

Definition at line 111 of file roadmap.cpp.

const Roadmap::EdgeInfo & topological_roadmap::Roadmap::edgeInfo ( unsigned  id  )  const

Convenience function to get edge info.

Exceptions:
UnknownEdgeIdException 

Definition at line 124 of file roadmap.cpp.

Roadmap::Nodes topological_roadmap::Roadmap::gridNodes ( const unsigned  g  )  const
Return values:
Set of nodes defined wrt this grid. If this grid has never been mentioned by any node, will just return the empty set.

Definition at line 129 of file roadmap.cpp.

GraphVertex topological_roadmap::Roadmap::node ( unsigned  id  )  const

Get node descriptor for id.

Exceptions:
UnknownNodeIdException 

Definition at line 103 of file roadmap.cpp.

const Roadmap::NodeInfo & topological_roadmap::Roadmap::nodeInfo ( unsigned  id  )  const

Convenience function to get node info.

Exceptions:
UnknownNodeIdException 

Definition at line 119 of file roadmap.cpp.

Roadmap & topological_roadmap::Roadmap::operator= ( const Roadmap r  ) 

Assignment.

Definition at line 73 of file roadmap.cpp.

void topological_roadmap::Roadmap::recomputeIndexes (  ) 

Recompute indexing info from the underlying graph.

Definition at line 82 of file roadmap.cpp.


Member Data Documentation

std::map<unsigned, GraphEdge> topological_roadmap::Roadmap::edge_map_ [private]

Definition at line 134 of file roadmap.h.

std::map<unsigned, Nodes> topological_roadmap::Roadmap::grid_nodes_ [private]

Definition at line 135 of file roadmap.h.

Definition at line 141 of file roadmap.h.

Definition at line 138 of file roadmap.h.

Definition at line 133 of file roadmap.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs


topological_roadmap
Author(s): Bhaskara Marthi
autogenerated on Fri Jan 11 09:11:38 2013