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 () const
 
std::string getFrameId () const
 
std_msgs::Header getHeader () const
 
int getIndex () const
 
std::string getLocalGuidanceMode () const
 
intMarker_t getMarker () const
 
menuHandler_t getMenuConfig () const
 
std::string getName () const
 
bool getNodePassThrough () const
 
geometry_msgs::Pose getPose () const
 
ros::Time getStamp () const
 
void increaseScale (const double factor)
 
bool isMarkerPositionFixed () const
 
bool isMarkerOrientationFixed () const
 
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

◆ PathCreatorNode()

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 
)

◆ ~PathCreatorNode()

path_creator::PathCreatorNode::~PathCreatorNode ( )
default

Member Function Documentation

◆ createArrowMarker()

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

Create an arrow visualization marker.

Parameters
[out]markerThe visualization marker.

◆ createMeshMarker()

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

Create a custom mesh marker.

Parameters
[out]markerThe visualization marker.

◆ createSphereMarker()

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

Create a sphere visualization marker.

Parameters
[out]markerThe visualization marker.

◆ decreaseScale()

void path_creator::PathCreatorNode::decreaseScale ( const double  factor)

Decrease the Interactive Marker's size.

Parameters
[in]factorThe factor, by which the size is decreased.

◆ fixMarkerOrientation()

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.

◆ fixMarkerPosition()

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.

◆ getColor()

std_msgs::ColorRGBA path_creator::PathCreatorNode::getColor ( ) const

Get the node's color.

Returns
The color.

◆ getFrameId()

std::string path_creator::PathCreatorNode::getFrameId ( ) const

Get the node's frame id.

Returns
The frame id.

◆ getHeader()

std_msgs::Header path_creator::PathCreatorNode::getHeader ( ) const

Get the node's header.

Returns
The header.

◆ getIndex()

int path_creator::PathCreatorNode::getIndex ( ) const

Get the node's index.

Returns
The index.

◆ getLocalGuidanceMode()

std::string path_creator::PathCreatorNode::getLocalGuidanceMode ( ) const

Get the node's Local Guidance Mode.

Returns
The Local Guidance Mode.

◆ getMarker()

intMarker_t path_creator::PathCreatorNode::getMarker ( ) const

Get the node's interactive marker.

Returns
The interactive marker.

◆ getMenuConfig()

menuHandler_t path_creator::PathCreatorNode::getMenuConfig ( ) const

Get the node's interactive marker menu configuration.

Returns
The menu configuration.

◆ getName()

std::string path_creator::PathCreatorNode::getName ( ) const

Get the node's name.

Returns
The name.

◆ getNodePassThrough()

bool path_creator::PathCreatorNode::getNodePassThrough ( ) const

Get the node's pass-through value.

Returns
True, if the the node must be passed through, false otherwise.

◆ getPose()

geometry_msgs::Pose path_creator::PathCreatorNode::getPose ( ) const

Get the node's pose.

Returns
The pose.

◆ getStamp()

ros::Time path_creator::PathCreatorNode::getStamp ( ) const

Get the node's time stamp.

Returns
The stamp.

◆ increaseScale()

void path_creator::PathCreatorNode::increaseScale ( const double  factor)

Increase the Interactive Marker's size.

Parameters
[in]factorThe factor, by which the size is increased.

◆ initializeMarker()

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.

◆ isMarkerOrientationFixed()

bool path_creator::PathCreatorNode::isMarkerOrientationFixed ( ) const

Whether the node's orientation is fixed.

Returns
True, if the orientation is fixed, false otherwise.

◆ isMarkerPositionFixed()

bool path_creator::PathCreatorNode::isMarkerPositionFixed ( ) const

Whether the node's position is fixed.

Returns
True, if the position is fixed, false otherwise.

◆ reInitializeMarker()

void path_creator::PathCreatorNode::reInitializeMarker ( )
private

Reinitializes the marker.

◆ resetColor()

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).

◆ resetScale()

void path_creator::PathCreatorNode::resetScale ( )

Reset the interactive marker's size to default.

◆ setColor() [1/2]

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).

◆ setColor() [2/2]

void path_creator::PathCreatorNode::setColor ( std_msgs::ColorRGBA  color)

Set the Interactive Marker's color.

Parameters
[in]colorThe color.

◆ setDescription()

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.

◆ setFrame()

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.

◆ setIndex()

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.

◆ setLocalGuidanceMode()

void path_creator::PathCreatorNode::setLocalGuidanceMode ( const std::string &  localGuidanceMode)

Set the node's Local Guidance Mode.

Parameters
[in]localGuidanceModeThe Local Guidance Mode.

◆ setMenuConfig()

void path_creator::PathCreatorNode::setMenuConfig ( const menuHandler_t menuConfig)

Set the node's Interactive Marker Menu configuration.

Parameters
[in]menuConfigThe menu configuration.

◆ setMeshInfo()

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).

◆ setName()

void path_creator::PathCreatorNode::setName ( const std::string &  name)

Set the node's name.

Parameters
[in]nameThe name.

◆ setNodePassThrough()

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.

◆ setOrientation()

void path_creator::PathCreatorNode::setOrientation ( const geometry_msgs::Quaternion &  orientation)

Set the node's orientation.

Parameters
[in]orientationThe orientation.

◆ setPose()

void path_creator::PathCreatorNode::setPose ( const geometry_msgs::Pose &  pose)

Set the node's pose.

Parameters
[in]poseThe pose (i.e., position and orientation).

◆ setPosition()

void path_creator::PathCreatorNode::setPosition ( const geometry_msgs::Point &  position)

Set the node's position.

Parameters
[in]positionThe position.

◆ updateMarkerColor()

void path_creator::PathCreatorNode::updateMarkerColor ( )
private

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

◆ updateMarkerControl()

void path_creator::PathCreatorNode::updateMarkerControl ( )
private

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

Member Data Documentation

◆ color_

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

The node's color.

◆ index_

int path_creator::PathCreatorNode::index_
private

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

◆ localGuidanceMode_

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.

◆ marker_

intMarker_t path_creator::PathCreatorNode::marker_
private

The interactive marker.

◆ markerControlTypes_

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).

◆ menuConfig_

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

The interactive marker's menu configuration.

◆ mesh_

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).

◆ orientationFixed_

bool path_creator::PathCreatorNode::orientationFixed_
private

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

◆ passThrough_

bool path_creator::PathCreatorNode::passThrough_
private

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

◆ positionFixed_

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: