Public Types | Public Member Functions | Private Attributes
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 ()
 Default constructor creates empty graph.
 Roadmap (const Roadmap &r)
 Copy constructor.

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 77 of file roadmap.h.


Member Typedef Documentation

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

Definition at line 82 of file roadmap.h.

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

Definition at line 81 of file roadmap.h.

Definition at line 83 of file roadmap.h.


Constructor & Destructor Documentation

Default constructor creates empty graph.

Definition at line 68 of file roadmap.cpp.

Copy constructor.

Definition at line 72 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:
Idof newly added edge.
Exceptions:
UnknownNodeIdException
DuplicateEdgeIdException

Definition at line 165 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:
Idof newly added node.

Definition at line 146 of file roadmap.cpp.

Delete an edge.

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

Definition at line 186 of file roadmap.cpp.

Get edge descriptor for id.

Exceptions:
UnknownEdgeIdException

Definition at line 116 of file roadmap.cpp.

Convenience function to get edge info.

Exceptions:
UnknownEdgeIdException

Definition at line 129 of file roadmap.cpp.

Return values:
Setof nodes defined wrt this grid. If this grid has never been mentioned by any node, will just return the empty set.

Definition at line 134 of file roadmap.cpp.

Get node descriptor for id.

Exceptions:
UnknownNodeIdException

Definition at line 108 of file roadmap.cpp.

Convenience function to get node info.

Exceptions:
UnknownNodeIdException

Definition at line 124 of file roadmap.cpp.

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

Assignment.

Definition at line 78 of file roadmap.cpp.

Recompute indexing info from the underlying graph.

Definition at line 87 of file roadmap.cpp.


Member Data Documentation

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

Definition at line 138 of file roadmap.h.

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

Definition at line 139 of file roadmap.h.

Definition at line 145 of file roadmap.h.

Definition at line 142 of file roadmap.h.

Definition at line 137 of file roadmap.h.


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


topological_roadmap
Author(s): Bhaskara Marthi
autogenerated on Sun Jan 5 2014 11:39:33