A ScanGraph is a collection of ScanNodes, connected by ScanEdges.
Each ScanNode contains a 3D scan performed from a pose.
Definition at line 129 of file ScanGraph.h.
#include <mrpt/otherlibs/octomap/ScanGraph.h>
Public Types | |
typedef std::vector< ScanNode * >::iterator | iterator |
typedef std::vector< ScanNode * >::const_iterator | const_iterator |
typedef std::vector< ScanEdge * >::iterator | edge_iterator |
typedef std::vector< ScanEdge * >::const_iterator | const_edge_iterator |
Public Member Functions | |
ScanGraph () | |
~ScanGraph () | |
void | clear () |
Clears all nodes and edges, and will delete the corresponding objects. More... | |
ScanNode * | addNode (Pointcloud *scan, pose6d pose) |
Creates a new ScanNode in the graph from a Pointcloud. More... | |
ScanEdge * | addEdge (ScanNode *first, ScanNode *second, pose6d constraint) |
Creates an edge between two ScanNodes. More... | |
ScanEdge * | addEdge (uint64_t first_id, uint64_t second_id) |
ScanNode * | getNodeByID (uint64_t id) |
will return NULL if node was not found More... | |
bool | edgeExists (uint64_t first_id, uint64_t second_id) |
void | connectPrevious () |
Connect previously added ScanNode to the one before that. More... | |
std::vector< uint64_t > | getNeighborIDs (uint64_t id) |
std::vector< ScanEdge * > | getOutEdges (ScanNode *node) |
std::vector< ScanEdge * > | getInEdges (ScanNode *node) |
void | exportDot (std::string filename) |
void | transformScans () |
Transform every scan according to its pose. More... | |
void | crop (point3d lowerBound, point3d upperBound) |
Cut graph (all containing Pointclouds) to given BBX in global coords. More... | |
void | cropEachScan (point3d lowerBound, point3d upperBound) |
Cut Pointclouds to given BBX in local coords. More... | |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
size_t | size () const |
size_t | getNumPoints (uint64_t max_id=-1) const |
edge_iterator | edges_begin () |
edge_iterator | edges_end () |
const_edge_iterator | edges_begin () const |
const_edge_iterator | edges_end () const |
std::ostream & | writeBinary (std::ostream &s) const |
std::istream & | readBinary (std::ifstream &s) |
bool | writeBinary (const std::string &filename) const |
bool | readBinary (const std::string &filename) |
std::ostream & | writeEdgesASCII (std::ostream &s) const |
std::istream & | readEdgesASCII (std::istream &s) |
std::ostream & | writeNodePosesASCII (std::ostream &s) const |
std::istream & | readNodePosesASCII (std::istream &s) |
std::istream & | readPlainASCII (std::istream &s) |
Reads in a ScanGraph from a "plain" ASCII file of the form NODE x y z R P Y x y z x y z x y z NODE x y z R P Y x y z. More... | |
void | readPlainASCII (const std::string &filename) |
Protected Attributes | |
std::vector< ScanNode * > | nodes |
std::vector< ScanEdge * > | edges |
typedef std::vector<ScanEdge*>::const_iterator octomap::ScanGraph::const_edge_iterator |
Definition at line 199 of file ScanGraph.h.
typedef std::vector<ScanNode*>::const_iterator octomap::ScanGraph::const_iterator |
Definition at line 189 of file ScanGraph.h.
typedef std::vector<ScanEdge*>::iterator octomap::ScanGraph::edge_iterator |
Definition at line 198 of file ScanGraph.h.
typedef std::vector<ScanNode*>::iterator octomap::ScanGraph::iterator |
Definition at line 188 of file ScanGraph.h.
|
inline |
Definition at line 133 of file ScanGraph.h.
octomap::ScanGraph::~ScanGraph | ( | ) |
ScanEdge* octomap::ScanGraph::addEdge | ( | uint64_t | first_id, |
uint64_t | second_id | ||
) |
ScanNode* octomap::ScanGraph::addNode | ( | Pointcloud * | scan, |
pose6d | pose | ||
) |
Creates a new ScanNode in the graph from a Pointcloud.
scan | Pointer to a pointcloud to be added to the ScanGraph. ScanGraph will delete the object when it's no longer needed, don't delete it yourself. |
pose | 6D pose of the origin of the Pointcloud |
|
inline |
Definition at line 190 of file ScanGraph.h.
References nodes.
|
inline |
Definition at line 192 of file ScanGraph.h.
References nodes.
void octomap::ScanGraph::clear | ( | ) |
Clears all nodes and edges, and will delete the corresponding objects.
void octomap::ScanGraph::connectPrevious | ( | ) |
Connect previously added ScanNode to the one before that.
Cut graph (all containing Pointclouds) to given BBX in global coords.
Cut Pointclouds to given BBX in local coords.
bool octomap::ScanGraph::edgeExists | ( | uint64_t | first_id, |
uint64_t | second_id | ||
) |
|
inline |
Definition at line 200 of file ScanGraph.h.
References edges.
|
inline |
Definition at line 202 of file ScanGraph.h.
References edges.
|
inline |
Definition at line 201 of file ScanGraph.h.
References edges.
|
inline |
Definition at line 203 of file ScanGraph.h.
References edges.
|
inline |
Definition at line 191 of file ScanGraph.h.
References nodes.
|
inline |
Definition at line 193 of file ScanGraph.h.
References nodes.
void octomap::ScanGraph::exportDot | ( | std::string | filename | ) |
std::vector<uint64_t> octomap::ScanGraph::getNeighborIDs | ( | uint64_t | id | ) |
ScanNode* octomap::ScanGraph::getNodeByID | ( | uint64_t | id | ) |
will return NULL if node was not found
size_t octomap::ScanGraph::getNumPoints | ( | uint64_t | max_id = -1 | ) | const |
std::istream& octomap::ScanGraph::readBinary | ( | std::ifstream & | s | ) |
bool octomap::ScanGraph::readBinary | ( | const std::string & | filename | ) |
std::istream& octomap::ScanGraph::readEdgesASCII | ( | std::istream & | s | ) |
std::istream& octomap::ScanGraph::readNodePosesASCII | ( | std::istream & | s | ) |
std::istream& octomap::ScanGraph::readPlainASCII | ( | std::istream & | s | ) |
Reads in a ScanGraph from a "plain" ASCII file of the form NODE x y z R P Y x y z x y z x y z NODE x y z R P Y x y z.
Lines starting with the NODE keyword contain the 6D pose of a scan node, all 3D point following until the next NODE keyword (or end of file) are inserted into that scan node as pointcloud in its local coordinate frame
input | stream to read from |
void octomap::ScanGraph::readPlainASCII | ( | const std::string & | filename | ) |
|
inline |
Definition at line 195 of file ScanGraph.h.
References nodes.
void octomap::ScanGraph::transformScans | ( | ) |
Transform every scan according to its pose.
std::ostream& octomap::ScanGraph::writeBinary | ( | std::ostream & | s | ) | const |
bool octomap::ScanGraph::writeBinary | ( | const std::string & | filename | ) | const |
std::ostream& octomap::ScanGraph::writeEdgesASCII | ( | std::ostream & | s | ) | const |
std::ostream& octomap::ScanGraph::writeNodePosesASCII | ( | std::ostream & | s | ) | const |
|
protected |
Definition at line 240 of file ScanGraph.h.
Referenced by edges_begin(), and edges_end().
Page generated by Doxygen 1.8.9.1 for MRPT 1.3.2 SVN:Unversioned directory at Tue Dec 8 09:49:21 UTC 2015 |