PathCreator
A path creator tool for teleoperated navigation.
path_creator::PathCreatorNode Class Reference

#include <PathCreatorNode.hpp>

Public Member Functions

 PathCreatorNode (const int index, const std::string &frameId, const geometry_msgs::Pose &pose, std::string localGuidanceMode, const std::pair< std::string, double > &meshInfo)
 
 ~PathCreatorNode ()=default
 
void decreaseScale (const double factor)
 
void fixMarkerOrientation (const bool fixOrientation)
 
void fixMarkerPosition (const bool fixPosition)
 
std_msgs::ColorRGBA getColor ()
 
std::string getFrameId ()
 
std_msgs::Header getHeader ()
 
int getIndex ()
 
std::string getLocalGuidanceMode ()
 
intMarker_t getMarker ()
 
menuHandler_t getMenuConfig ()
 
std::string getName ()
 
bool getNodePassThrough ()
 
geometry_msgs::Pose getPose ()
 
ros::Time getStamp ()
 
void increaseScale (const double factor)
 
bool isMarkerPositionFixed ()
 
bool isMarkerOrientationFixed ()
 
void resetColor ()
 
void resetScale ()
 
void setColor (const double r, const double g, const double b, const double a)
 
void setColor (std_msgs::ColorRGBA color)
 
void setDescription (const std::string &description)
 
void setFrame (const std::string &frameId)
 
void setIndex (const int index)
 
void setLocalGuidanceMode (const std::string &localGuidanceMode)
 
void setMenuConfig (const menuHandler_t &menuConfig)
 
void setMeshInfo (const std::pair< std::string, double > &meshInfo)
 
void setName (const std::string &name)
 
void setNodePassThrough (const bool passThrough)
 
void setOrientation (const geometry_msgs::Quaternion &orientation)
 
void setPose (const geometry_msgs::Pose &pose)
 
void setPosition (const geometry_msgs::Point &position)
 

Private Member Functions

void createArrowMarker (marker_t &marker)
 
void createMeshMarker (marker_t &marker)
 
void createSphereMarker (marker_t &marker)
 
void initializeMarker (const std::string &markerControlType, const std::string &menuControlType, const std::string &frame, const geometry_msgs::Pose &pose)
 
void reInitializeMarker ()
 
void updateMarkerColor ()
 
void updateMarkerControl ()
 

Private Attributes

int index_
 
intMarker_t marker_
 
std::string localGuidanceMode_
 
bool positionFixed_
 
bool orientationFixed_
 
std::unordered_map< std::string, unsigned char > markerControlTypes_
 
interactive_markers::MenuHandler menuConfig_
 
std_msgs::ColorRGBA color_
 
NodeMesh mesh_
 
bool passThrough_
 

Constructor & Destructor Documentation

path_creator::PathCreatorNode::PathCreatorNode ( const int  index,
const std::string &  frameId,
const geometry_msgs::Pose &  pose,
std::string  localGuidanceMode,
const std::pair< std::string, double > &  meshInfo 
)
path_creator::PathCreatorNode::~PathCreatorNode ( )
default

Member Function Documentation

void path_creator::PathCreatorNode::createArrowMarker ( marker_t marker)
private

Create an arrow visualization marker.

Parameters
[out]markerThe visualization marker.
void path_creator::PathCreatorNode::createMeshMarker ( marker_t marker)
private

Create a custom mesh marker.

Parameters
[out]markerThe visualization marker.
void path_creator::PathCreatorNode::createSphereMarker ( marker_t marker)
private

Create a sphere visualization marker.

Parameters
[out]markerThe visualization marker.
void path_creator::PathCreatorNode::decreaseScale ( const double  factor)

Decrease the Interactive Marker's size.

Parameters
[in]factorThe factor, by which the size is decreased.
void path_creator::PathCreatorNode::fixMarkerOrientation ( const bool  fixOrientation)

Fix the node's orientation (i.e., orientation cannot be changed anymore).

Parameters
[in]fixOrientationWhether the orientation should be fixed or not.
void path_creator::PathCreatorNode::fixMarkerPosition ( const bool  fixPosition)

Fix the node's position (i.e., position cannot be changed anymore).

Parameters
[in]fixPositionWhether the position should be fixed or not.
std_msgs::ColorRGBA path_creator::PathCreatorNode::getColor ( )

Get the node's color.

Returns
The color.
std::string path_creator::PathCreatorNode::getFrameId ( )

Get the node's frame id.

Returns
The frame id.
std_msgs::Header path_creator::PathCreatorNode::getHeader ( )

Get the node's header.

Returns
The header.
int path_creator::PathCreatorNode::getIndex ( )

Get the node's index.

Returns
The index.
std::string path_creator::PathCreatorNode::getLocalGuidanceMode ( )

Get the node's Local Guidance Mode.

Returns
The Local Guidance Mode.
intMarker_t path_creator::PathCreatorNode::getMarker ( )

Get the node's interactive marker.

Returns
The interactive marker.
menuHandler_t path_creator::PathCreatorNode::getMenuConfig ( )

Get the node's interactive marker menu configuration.

Returns
The menu configuration.
std::string path_creator::PathCreatorNode::getName ( )

Get the node's name.

Returns
The name.
bool path_creator::PathCreatorNode::getNodePassThrough ( )

Get the node's pass-through value.

Returns
True, if the the node must be passed through, false otherwise.
geometry_msgs::Pose path_creator::PathCreatorNode::getPose ( )

Get the node's pose.

Returns
The pose.
ros::Time path_creator::PathCreatorNode::getStamp ( )

Get the node's time stamp.

Returns
The stamp.
void path_creator::PathCreatorNode::increaseScale ( const double  factor)

Increase the Interactive Marker's size.

Parameters
[in]factorThe factor, by which the size is increased.
void path_creator::PathCreatorNode::initializeMarker ( const std::string &  markerControlType,
const std::string &  menuControlType,
const std::string &  frame,
const geometry_msgs::Pose &  pose 
)
private

Create a default marker

Parameters
[in]markerControlTypeThe marker control type (i.e., 'move_xz_yaw', 'move_xz', 'rotate_yaw', 'fixed').
[in]menuControlTypeThe marker menu's control type (i.e., 'button').
[in]frameThe frame id of the marker's pose.
[in]poseThe marker's pose.
bool path_creator::PathCreatorNode::isMarkerOrientationFixed ( )

Whether the node's orientation is fixed.

Returns
True, if the orientation is fixed, false otherwise.
bool path_creator::PathCreatorNode::isMarkerPositionFixed ( )

Whether the node's position is fixed.

Returns
True, if the position is fixed, false otherwise.
void path_creator::PathCreatorNode::reInitializeMarker ( )
private

Reinitializes the marker.

void path_creator::PathCreatorNode::resetColor ( )

Reset the interactive marker's color to default (i.e., gray, rgba 0.7, 0.7, 0.7, 1.0).

void path_creator::PathCreatorNode::resetScale ( )

Reset the interactive marker's size to default.

void path_creator::PathCreatorNode::setColor ( const double  r,
const double  g,
const double  b,
const double  a 
)

Set the Interactive Marker's color.

Parameters
[in]rThe r value (i.e., red).
[in]gThe g value (i.e., green).
[in]bThe b value (i.e., blue).
[in]aThe a value (i.e., alpha / transparency).
void path_creator::PathCreatorNode::setColor ( std_msgs::ColorRGBA  color)

Set the Interactive Marker's color.

Parameters
[in]colorThe color.
void path_creator::PathCreatorNode::setDescription ( const std::string &  description)

Set the Interactive Marker's description.

Parameters
[in]descriptionThe description visible in rviz hovering over the marker.
void path_creator::PathCreatorNode::setFrame ( const std::string &  frameId)

Set the node's frame id.

Parameters
[in]frameIdThe frame id, i.e., the frame in which the node's pose is expressed.
void path_creator::PathCreatorNode::setIndex ( const int  index)

Set the node's index.

Parameters
[in]indexThe index, i.e., the index-th node of a path.
void path_creator::PathCreatorNode::setLocalGuidanceMode ( const std::string &  localGuidanceMode)

Set the node's Local Guidance Mode.

Parameters
[in]localGuidanceModeThe Local Guidance Mode.
void path_creator::PathCreatorNode::setMenuConfig ( const menuHandler_t menuConfig)

Set the node's Interactive Marker Menu configuration.

Parameters
[in]menuConfigThe menu configuration.
void path_creator::PathCreatorNode::setMeshInfo ( const std::pair< std::string, double > &  meshInfo)

Updates the marker's mesh information.

Parameters
[in]meshInfoA pair containing info about the mesh file (first) and its scale (second).
void path_creator::PathCreatorNode::setName ( const std::string &  name)

Set the node's name.

Parameters
[in]nameThe name.
void path_creator::PathCreatorNode::setNodePassThrough ( const bool  passThrough)

Set the node's passThrough value (i.e., whether a node's pose must be visited exactly or not).

Parameters
passThroughThe pass-through value.
void path_creator::PathCreatorNode::setOrientation ( const geometry_msgs::Quaternion &  orientation)

Set the node's orientation.

Parameters
[in]orientationThe orientation.
void path_creator::PathCreatorNode::setPose ( const geometry_msgs::Pose &  pose)

Set the node's pose.

Parameters
[in]poseThe pose (i.e., position and orientation).
void path_creator::PathCreatorNode::setPosition ( const geometry_msgs::Point &  position)

Set the node's position.

Parameters
[in]positionThe position.
void path_creator::PathCreatorNode::updateMarkerColor ( )
private

Update the marker's color according to its Local Guidance Mode.

void path_creator::PathCreatorNode::updateMarkerControl ( )
private

Update the marker's control mode according to its position and orientation fix status.

Member Data Documentation

std_msgs::ColorRGBA path_creator::PathCreatorNode::color_
private

The node's color.

int path_creator::PathCreatorNode::index_
private

The index of the node (Note: this corresponds to the interactive marker's name).

std::string path_creator::PathCreatorNode::localGuidanceMode_
private

The node's Local Guidance Mode. Note: This Local Guidance Mode is used on the node's subsequent edge.

intMarker_t path_creator::PathCreatorNode::marker_
private

The interactive marker.

std::unordered_map<std::string, unsigned char> path_creator::PathCreatorNode::markerControlTypes_
private

A map, associating marker control type names (key) to their respective controls (value).

interactive_markers::MenuHandler path_creator::PathCreatorNode::menuConfig_
private

The interactive marker's menu configuration.

NodeMesh path_creator::PathCreatorNode::mesh_
private

The node's mesh information (i.e., whether it is a default mesh or not, and the corresponding mesh file).

bool path_creator::PathCreatorNode::orientationFixed_
private

Whether the marker's orientation is fixed or not (i.e., whether orientation is controllable or not).

bool path_creator::PathCreatorNode::passThrough_
private

Whether a node has to be passed through exactly (e.g., no "pure pursuit" smoothing over this node).

bool path_creator::PathCreatorNode::positionFixed_
private

Whether the marker's position is fixed or not (i.e., whether position is controllable or not).


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