Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ObjectConfigurationGenerator Class Reference

Public Member Functions

 ObjectConfigurationGenerator ()
 
 ~ObjectConfigurationGenerator ()
 

Private Types

enum  SelectEntity { Previous = -1, Next = 1 }
 

Private Member Functions

void getNodeParameters (std::vector< std::string > &patternNames, std::string &configFilePath)
 Read node parameters. More...
 
void initFromDatabase (std::vector< std::string > &patternNames)
 Read tracks from the scenes specified by patternNames from database and store them in the appropriate members. More...
 
void initInteractiveControl ()
 Sets up keyboard control. More...
 
bool isMarked (const ISM::ObjectPtr &obj)
 Checks if object is marked. More...
 
void keyboardInputCallback (const ros::TimerEvent &e)
 Function that handles user keyboard input and calls the appropriate functions. More...
 
void loadConstellationFromConfigFile (const std::string &configFilePath)
 Loads a configuration from an xml file located at configFilePath;mDbFilename. More...
 
void markOrUnmark ()
 If the currently selected pose is marked, it gets unmarked, else it gets marked. More...
 
bool parsePoseString (std::string pose_string, ISM::PosePtr &pose, std::string delim, std::string angles)
 Creates a ISM::PosePtr from a pose_string. More...
 
void printEditModeHelpText ()
 
void printMarkedObjects ()
 
void printNormalHelpText ()
 
void rotate (double alpha, double beta, double gamma, ISM::PosePtr pose)
 Rotates the given pose by the values specified by the arguments. More...
 
void runEditMode ()
 Start and run edit mode in which the pose of the selected object can be manipulated. More...
 
void switchObject (SelectEntity neighbor)
 Switch to the neighbor object. More...
 
void switchPose (SelectEntity neighbor)
 Switch to the neighbor pose in the trajectory. More...
 
void translate (double x, double y, double z, ISM::PosePtr pose)
 Translates the given pose by the values specified by the arguments. More...
 
void visualize ()
 Visulize the currently selected pose, all poses that are in the same trajectory and one pose of each other object. More...
 
void writeMarkedPosesToFile ()
 Writes the type, observedId, path to the mesh and its pose to an xml file. More...
 

Private Attributes

std::string baseFrame
 
std::vector< bool > editFlags
 
const std_msgs::ColorRGBA IN_CURRENT_TRACK = VIZ::VizHelperRVIZ::createColorRGBA(0, 1.0, 0, 1)
 
ros::Timer keyboardTimer
 
bool keyPressed
 
const std_msgs::ColorRGBA MARKED = VIZ::VizHelperRVIZ::createColorRGBA(1.0, 0.0, 0.0, 1.0)
 
std::set< std::string > markedObjects
 
visualization_msgs::MarkerArray markerArray
 
const double markerLifetime = 0.0
 
std::string markerNamespace = "object_configuration"
 
std::string mDbFilename
 
ros::NodeHandle nh
 
std::vector< std::pair< ISM::ObjectPtr, std::vector< ISM::PosePtr > > > objectAndPoses
 
unsigned int objectCounter = 0
 
std::string output_file_path
 
std::vector< unsigned int > poseCounters
 
const std_msgs::ColorRGBA SELECTED = VIZ::VizHelperRVIZ::createColorRGBA(1.0, 0.0, 1.0, 1.0)
 
float sphere_radius = 0.01
 
ISM::TableHelperPtr tableHandler
 
ros::Publisher visualization_pub
 
std::string visualizationTopic
 
const std_msgs::ColorRGBA X_AXIS = VIZ::VizHelperRVIZ::createColorRGBA(1.0, 0.0, 0.0, 0.5)
 
const std_msgs::ColorRGBA Y_AXIS = VIZ::VizHelperRVIZ::createColorRGBA(0.0, 1.0, 0.0, 0.5)
 
const std_msgs::ColorRGBA Z_AXIS = VIZ::VizHelperRVIZ::createColorRGBA(0.0, 0.0, 1.0, 0.5)
 

Detailed Description

Definition at line 66 of file object_configuration_generator.cpp.

Member Enumeration Documentation

Enumerator
Previous 
Next 

Definition at line 361 of file object_configuration_generator.cpp.

Constructor & Destructor Documentation

ObjectConfigurationGenerator::ObjectConfigurationGenerator ( )
inline

Definition at line 71 of file object_configuration_generator.cpp.

ObjectConfigurationGenerator::~ObjectConfigurationGenerator ( )
inline

Definition at line 127 of file object_configuration_generator.cpp.

Member Function Documentation

void ObjectConfigurationGenerator::getNodeParameters ( std::vector< std::string > &  patternNames,
std::string &  configFilePath 
)
inlineprivate

Read node parameters.

Parameters
patternNamethe name of the scene

Definition at line 138 of file object_configuration_generator.cpp.

void ObjectConfigurationGenerator::initFromDatabase ( std::vector< std::string > &  patternNames)
inlineprivate

Read tracks from the scenes specified by patternNames from database and store them in the appropriate members.

Parameters
patternNamesthe names of the scenes.

Definition at line 290 of file object_configuration_generator.cpp.

void ObjectConfigurationGenerator::initInteractiveControl ( )
inlineprivate

Sets up keyboard control.

Definition at line 406 of file object_configuration_generator.cpp.

bool ObjectConfigurationGenerator::isMarked ( const ISM::ObjectPtr &  obj)
inlineprivate

Checks if object is marked.

Definition at line 669 of file object_configuration_generator.cpp.

void ObjectConfigurationGenerator::keyboardInputCallback ( const ros::TimerEvent e)
inlineprivate

Function that handles user keyboard input and calls the appropriate functions.

Parameters
enot used

Definition at line 496 of file object_configuration_generator.cpp.

void ObjectConfigurationGenerator::loadConstellationFromConfigFile ( const std::string &  configFilePath)
inlineprivate

Loads a configuration from an xml file located at configFilePath;mDbFilename.

Parameters
configFilePaththe location of the config file

Definition at line 764 of file object_configuration_generator.cpp.

void ObjectConfigurationGenerator::markOrUnmark ( )
inlineprivate

If the currently selected pose is marked, it gets unmarked, else it gets marked.

Definition at line 271 of file object_configuration_generator.cpp.

bool ObjectConfigurationGenerator::parsePoseString ( std::string  pose_string,
ISM::PosePtr &  pose,
std::string  delim,
std::string  angles 
)
inlineprivate

Creates a ISM::PosePtr from a pose_string.

Parameters
pose_stringcontains x, y, z values and angles
posethe resulting pose is stored here
delimthe symbols that separate values in pose_string
Returns
if the ISM::PosePtr could successfully be created

Definition at line 831 of file object_configuration_generator.cpp.

void ObjectConfigurationGenerator::printEditModeHelpText ( )
inlineprivate

Print edit mode help text.

Definition at line 448 of file object_configuration_generator.cpp.

void ObjectConfigurationGenerator::printMarkedObjects ( )
inlineprivate

Print marked objects on console.

Definition at line 467 of file object_configuration_generator.cpp.

void ObjectConfigurationGenerator::printNormalHelpText ( )
inlineprivate

Print possible commands on console.

Definition at line 426 of file object_configuration_generator.cpp.

void ObjectConfigurationGenerator::rotate ( double  alpha,
double  beta,
double  gamma,
ISM::PosePtr  pose 
)
inlineprivate

Rotates the given pose by the values specified by the arguments.

Parameters
alpharotation angle in degree around the x-axis.
betarotation angle in degree around the y-axis.
gammarotation angle in degree around the z-axis.
posethe pose that is to be rotated.

Definition at line 722 of file object_configuration_generator.cpp.

void ObjectConfigurationGenerator::runEditMode ( )
inlineprivate

Start and run edit mode in which the pose of the selected object can be manipulated.

Definition at line 556 of file object_configuration_generator.cpp.

void ObjectConfigurationGenerator::switchObject ( SelectEntity  neighbor)
inlineprivate

Switch to the neighbor object.

Definition at line 366 of file object_configuration_generator.cpp.

void ObjectConfigurationGenerator::switchPose ( SelectEntity  neighbor)
inlineprivate

Switch to the neighbor pose in the trajectory.

Definition at line 388 of file object_configuration_generator.cpp.

void ObjectConfigurationGenerator::translate ( double  x,
double  y,
double  z,
ISM::PosePtr  pose 
)
inlineprivate

Translates the given pose by the values specified by the arguments.

Parameters
xthe offset in meters by which the pose is translated along the x-axis.
ythe offset in meters by which the pose is translated along the y-axis.
zthe offset in meters by which the pose is translated along the z-axis.
posethe pose that is to be translated.

Definition at line 743 of file object_configuration_generator.cpp.

void ObjectConfigurationGenerator::visualize ( )
inlineprivate

Visulize the currently selected pose, all poses that are in the same trajectory and one pose of each other object.

Definition at line 185 of file object_configuration_generator.cpp.

void ObjectConfigurationGenerator::writeMarkedPosesToFile ( )
inlineprivate

Writes the type, observedId, path to the mesh and its pose to an xml file.

Definition at line 677 of file object_configuration_generator.cpp.

Member Data Documentation

std::string ObjectConfigurationGenerator::baseFrame
private

Definition at line 889 of file object_configuration_generator.cpp.

std::vector<bool> ObjectConfigurationGenerator::editFlags
private

Definition at line 899 of file object_configuration_generator.cpp.

const std_msgs::ColorRGBA ObjectConfigurationGenerator::IN_CURRENT_TRACK = VIZ::VizHelperRVIZ::createColorRGBA(0, 1.0, 0, 1)
private

Definition at line 910 of file object_configuration_generator.cpp.

ros::Timer ObjectConfigurationGenerator::keyboardTimer
private

Definition at line 919 of file object_configuration_generator.cpp.

bool ObjectConfigurationGenerator::keyPressed
private

Definition at line 904 of file object_configuration_generator.cpp.

const std_msgs::ColorRGBA ObjectConfigurationGenerator::MARKED = VIZ::VizHelperRVIZ::createColorRGBA(1.0, 0.0, 0.0, 1.0)
private

Definition at line 909 of file object_configuration_generator.cpp.

std::set<std::string> ObjectConfigurationGenerator::markedObjects
private

Definition at line 886 of file object_configuration_generator.cpp.

visualization_msgs::MarkerArray ObjectConfigurationGenerator::markerArray
private

Definition at line 916 of file object_configuration_generator.cpp.

const double ObjectConfigurationGenerator::markerLifetime = 0.0
private

Definition at line 895 of file object_configuration_generator.cpp.

std::string ObjectConfigurationGenerator::markerNamespace = "object_configuration"
private

Definition at line 893 of file object_configuration_generator.cpp.

std::string ObjectConfigurationGenerator::mDbFilename
private

Definition at line 888 of file object_configuration_generator.cpp.

ros::NodeHandle ObjectConfigurationGenerator::nh
private

Definition at line 882 of file object_configuration_generator.cpp.

std::vector<std::pair<ISM::ObjectPtr, std::vector<ISM::PosePtr> > > ObjectConfigurationGenerator::objectAndPoses
private

Definition at line 885 of file object_configuration_generator.cpp.

unsigned int ObjectConfigurationGenerator::objectCounter = 0
private

Definition at line 897 of file object_configuration_generator.cpp.

std::string ObjectConfigurationGenerator::output_file_path
private

Definition at line 901 of file object_configuration_generator.cpp.

std::vector<unsigned int> ObjectConfigurationGenerator::poseCounters
private

Definition at line 898 of file object_configuration_generator.cpp.

const std_msgs::ColorRGBA ObjectConfigurationGenerator::SELECTED = VIZ::VizHelperRVIZ::createColorRGBA(1.0, 0.0, 1.0, 1.0)
private

Definition at line 908 of file object_configuration_generator.cpp.

float ObjectConfigurationGenerator::sphere_radius = 0.01
private

Definition at line 906 of file object_configuration_generator.cpp.

ISM::TableHelperPtr ObjectConfigurationGenerator::tableHandler
private

Definition at line 883 of file object_configuration_generator.cpp.

ros::Publisher ObjectConfigurationGenerator::visualization_pub
private

Definition at line 890 of file object_configuration_generator.cpp.

std::string ObjectConfigurationGenerator::visualizationTopic
private

Definition at line 892 of file object_configuration_generator.cpp.

const std_msgs::ColorRGBA ObjectConfigurationGenerator::X_AXIS = VIZ::VizHelperRVIZ::createColorRGBA(1.0, 0.0, 0.0, 0.5)
private

Definition at line 912 of file object_configuration_generator.cpp.

const std_msgs::ColorRGBA ObjectConfigurationGenerator::Y_AXIS = VIZ::VizHelperRVIZ::createColorRGBA(0.0, 1.0, 0.0, 0.5)
private

Definition at line 913 of file object_configuration_generator.cpp.

const std_msgs::ColorRGBA ObjectConfigurationGenerator::Z_AXIS = VIZ::VizHelperRVIZ::createColorRGBA(0.0, 0.0, 1.0, 0.5)
private

Definition at line 914 of file object_configuration_generator.cpp.


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


asr_ism
Author(s): Borella Jocelyn, Hanselmann Fabian, Heller Florian, Heizmann Heinrich, Kübler Marcel, Mehlhaus Jonas, Meißner Pascal, Qattan Mohamad, Reckling Reno, Stroh Daniel
autogenerated on Thu Jan 9 2020 07:20:58