48 #ifndef OCTOMAP_SCANGRAPH_H
49 #define OCTOMAP_SCANGRAPH_H
79 return (
id == other.
id);
113 std::ostream&
writeASCII(std::ostream &s)
const;
166 bool edgeExists(uint64_t first_id, uint64_t second_id);
208 bool writeBinary(
const std::string& filename)
const;
void connectPrevious()
Connect previously added ScanNode to the one before that.
edge_iterator edges_begin()
This class represents a tree-dimensional pose of an object.
OctoMap: A probabilistic, flexible, and compact 3D mapping library for robotic systems.
std::vector< ScanEdge * > getInEdges(ScanNode *node)
std::ostream & writeBinary(std::ostream &s) const
std::istream & readASCII(std::istream &s, ScanGraph &graph)
std::vector< ScanNode * >::const_iterator const_iterator
uint64_t id
JLBC: Changed from "unsigned int" so binarized versions are platform-independent. ...
const Scalar * const_iterator
bool edgeExists(uint64_t first_id, uint64_t second_id)
std::vector< ScanNode * >::iterator iterator
ScanNode * getNodeByID(uint64_t id)
will return NULL if node was not found
const_iterator end() const
edge_iterator edges_end()
std::istream & readEdgesASCII(std::istream &s)
std::vector< uint64_t > getNeighborIDs(uint64_t id)
std::istream & readPoseASCII(std::istream &s)
std::istream & readBinary(std::istream &s)
A ScanGraph is a collection of ScanNodes, connected by ScanEdges.
bool operator==(const ScanEdge &other)
void exportDot(std::string filename)
ScanNode(Pointcloud *_scan, pose6d _pose, uint64_t _id)
std::istream & readBinary(std::istream &s, ScanGraph &graph)
std::ostream & writePoseASCII(std::ostream &s) const
A collection of 3D coordinates (point3d), which are regarded as endpoints of a 3D laser scan...
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 ...
std::vector< ScanEdge * > getOutEdges(ScanNode *node)
std::vector< ScanEdge * >::const_iterator const_edge_iterator
std::ostream & writeBinary(std::ostream &s) const
const_edge_iterator edges_begin() const
void transformScans()
Transform every scan according to its pose.
ScanEdge(ScanNode *_first, ScanNode *_second, pose6d _constraint)
const_iterator begin() const
std::ostream & writeNodePosesASCII(std::ostream &s) const
void crop(point3d lowerBound, point3d upperBound)
Cut graph (all containing Pointclouds) to given BBX in global coords.
std::istream & readBinary(std::ifstream &s)
ScanEdge * addEdge(ScanNode *first, ScanNode *second, pose6d constraint)
Creates an edge between two ScanNodes.
std::ostream & writeEdgesASCII(std::ostream &s) const
size_t getNumPoints(uint64_t max_id=-1) const
std::vector< ScanNode * > nodes
A 3D scan as Pointcloud, performed from a Pose6D.
bool operator==(const ScanNode &other)
std::vector< ScanEdge * > edges
const_edge_iterator edges_end() const
void clear()
Clears all nodes and edges, and will delete the corresponding objects.
void cropEachScan(point3d lowerBound, point3d upperBound)
Cut Pointclouds to given BBX in local coords.
std::istream & readNodePosesASCII(std::istream &s)
pose6d pose
6D pose from which the scan was performed
std::ostream & writeBinary(std::ostream &s) const
ScanNode * addNode(Pointcloud *scan, pose6d pose)
Creates a new ScanNode in the graph from a Pointcloud.
A connection between two ScanNodes.
std::vector< ScanEdge * >::iterator edge_iterator
std::ostream & writeASCII(std::ostream &s) const
This class represents a three-dimensional vector.