Runs a viewer using the Inventor package and allows to select and save markers on the model. More...
#include <MarkerSelector.h>
Classes | |
class | Marker |
represents a marker with x/y/z coordinates and a normal, associated with a link (and visual). More... | |
Public Types | |
typedef std::map< std::string, std::vector< Marker > > | MarkerMap |
Public Member Functions | |
MarkerMap | getMarkers () |
MarkerSelector (float _marker_size, bool _faces_ccw) | |
MarkerSelector (const MarkerSelector &o) | |
std::string | toString () |
bool | writeResults (const std::string &outputFile) |
~MarkerSelector () | |
Protected Member Functions | |
virtual void | onClickModel (const SoPickedPoint *pickPoint) |
virtual void | onMouseBtnClick (SoEventCallback *pNode) |
Private Types | |
typedef std::map< int, SoNode * > | MarkerNodeMap |
Static Private Member Functions | |
static bool | sortMarker (const Marker &i, const Marker &j) |
static bool | writeToFile (const std::string &content, const std::string &filename) |
Private Attributes | |
float | marker_size |
MarkerNodeMap | markerParentNodes |
std::vector< Marker > | markers |
Runs a viewer using the Inventor package and allows to select and save markers on the model.
Definition at line 43 of file MarkerSelector.h.
typedef std::map<std::string, std::vector<Marker> > urdf2graspit::markerselector::MarkerSelector::MarkerMap |
Definition at line 102 of file MarkerSelector.h.
typedef std::map<int, SoNode*> urdf2graspit::markerselector::MarkerSelector::MarkerNodeMap [private] |
Definition at line 147 of file MarkerSelector.h.
urdf2graspit::markerselector::MarkerSelector::MarkerSelector | ( | float | _marker_size, |
bool | _faces_ccw | ||
) | [inline, explicit] |
_marker_size | the size of the points displayed where marker is put |
_faces_ccw | faces are to be treated as counter-clockwise. Needed for normal calculations. |
Definition at line 109 of file MarkerSelector.h.
urdf2graspit::markerselector::MarkerSelector::MarkerSelector | ( | const MarkerSelector & | o | ) | [inline] |
Definition at line 113 of file MarkerSelector.h.
Definition at line 115 of file MarkerSelector.h.
returns the map of markers which have been generated during running runViewer(). the entries for each link name will be ordered by the visual numbers.
Definition at line 118 of file MarkerSelector.cpp.
void MarkerSelector::onClickModel | ( | const SoPickedPoint * | pickPoint | ) | [protected, virtual] |
Reimplemented from urdf_viewer::InventorViewer.
Definition at line 272 of file MarkerSelector.cpp.
virtual void urdf2graspit::markerselector::MarkerSelector::onMouseBtnClick | ( | SoEventCallback * | pNode | ) | [inline, protected, virtual] |
Reimplemented from urdf_viewer::InventorViewer.
Definition at line 136 of file MarkerSelector.h.
bool MarkerSelector::sortMarker | ( | const Marker & | i, |
const Marker & | j | ||
) | [static, private] |
Definition at line 155 of file MarkerSelector.cpp.
std::string MarkerSelector::toString | ( | ) |
Definition at line 136 of file MarkerSelector.cpp.
bool MarkerSelector::writeResults | ( | const std::string & | outputFile | ) |
Writes all markers selected while execution runViewer() in the following format, for all links with markers subsequently: link-name {newline} number-of-markers {newline} visual_number x y z nx ny nz{newline} (coordinates and normal, repeated for all number-of-markers markers)
Definition at line 84 of file MarkerSelector.cpp.
bool MarkerSelector::writeToFile | ( | const std::string & | content, |
const std::string & | filename | ||
) | [static, private] |
Definition at line 160 of file MarkerSelector.cpp.
float urdf2graspit::markerselector::MarkerSelector::marker_size [private] |
Definition at line 152 of file MarkerSelector.h.
Definition at line 149 of file MarkerSelector.h.
std::vector<Marker> urdf2graspit::markerselector::MarkerSelector::markers [private] |
Definition at line 144 of file MarkerSelector.h.