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

#include <PathCreatorRos.hpp>

Inheritance diagram for path_creator::PathCreatorRos:
Inheritance graph

Public Member Functions

 PathCreatorRos ()=delete
 
 PathCreatorRos (any_node::Node::NodeHandlePtr nh)
 
 ~PathCreatorRos () override=default
 
bool init () override
 
void cleanup () override
 
bool updatePathCreatorRos (const any_worker::WorkerEvent &event)
 

Protected Member Functions

void initMarkerMenu ()
 
void initRosInterfaces ()
 
void insertMarkerToServer (const intMarker_t &marker)
 
void toggleMenuEntryCheckState (entryHandle_t handle, checkState_t &state)
 
void updateNode (const int index)
 
void updateVisualization ()
 
void updateVisualizationByIndex (const int index)
 
void changeModeMenuCb (const intMarkerFeedbackConstPtr_t &feedback)
 
void fixMarkerAtBaseCb (const intMarkerFeedbackConstPtr_t &feedback)
 
void fixMarkerOrientationMenuCb (const intMarkerFeedbackConstPtr_t &feedback)
 
void fixMarkerPoseMenuCb (const intMarkerFeedbackConstPtr_t &feedback)
 
void fixMarkerPositionMenuCb (const intMarkerFeedbackConstPtr_t &feedback)
 
void printPoseMenuCb (const intMarkerFeedbackConstPtr_t &feedback)
 
void removeThisMarkerMenuCb (const intMarkerFeedbackConstPtr_t &feedback)
 
void passThroughNodeCb (const intMarkerFeedbackConstPtr_t &feedback)
 
void processFeedbackMultipleMarkers (const intMarkerFeedbackConstPtr_t &feedback)
 
void processFeedbackSingleMarker (const intMarkerFeedbackConstPtr_t &feedback)
 
bool addInitialNodePairCallback (path_creator_msgs::AddNode::Request &req, path_creator_msgs::AddNode::Response &res)
 
bool addNodeCallback (path_creator_msgs::AddNode::Request &req, path_creator_msgs::AddNode::Response &res)
 
bool addNumNodesCallback (path_creator_msgs::AddNumNodes::Request &req, path_creator_msgs::AddNumNodes::Response &res)
 
bool autoSetOrientationCallback (std_srvs::Empty::Request &req, std_srvs::Empty::Response &res)
 
bool exportToFileCallback (path_creator_msgs::SaveTxtFile::Request &req, path_creator_msgs::SaveTxtFile::Response &res)
 
bool getLocalGuidanceModeColorMapCallback (path_creator_msgs::GetModeColorMap::Request &req, path_creator_msgs::GetModeColorMap::Response &res)
 
bool getNodePoseCallback (path_creator_msgs::GetNodePose::Request &req, path_creator_msgs::GetNodePose::Response &res)
 
bool loadFromFileCallback (path_creator_msgs::SaveTxtFile::Request &req, path_creator_msgs::SaveTxtFile::Response &res)
 
bool removeAllNodesCallback (std_srvs::Empty::Request &req, std_srvs::Empty::Response &res)
 
bool removeNodeByIndexCallback (path_creator_msgs::RemoveNode::Request &req, path_creator_msgs::RemoveNode::Response &res)
 
bool resetNodeHeightCallback (std_srvs::Empty::Request &req, std_srvs::Empty::Response &res)
 
bool setGlobalModeCallback (path_creator_msgs::SetGlobalMode::Request &req, path_creator_msgs::SetGlobalMode::Response &res)
 
bool setNewPathCallback (path_creator_msgs::SetNewPath::Request &req, path_creator_msgs::SetNewPath::Response &res)
 
bool snapToMapCallback (std_srvs::Empty::Request &req, std_srvs::Empty::Response &res)
 
bool toggleMarkerProcessFeedbackCallback (std_srvs::SetBool::Request &req, std_srvs::SetBool::Response &res)
 
bool undoLastChangeCallback (std_srvs::Empty::Request &req, std_srvs::Empty::Response &res)
 

Protected Attributes

ros::ServiceServer addInitialNodePairService_
 
ros::ServiceServer addNodeService_
 
ros::ServiceServer addNumNodesService_
 
ros::ServiceServer autoSetOrientationService_
 
ros::ServiceServer exportToFileService_
 
ros::ServiceServer getLocalGuidanceModeColorMapService_
 
ros::ServiceServer getNodePoseService_
 
ros::ServiceServer loadPathFromFileService_
 
ros::ServiceServer removeAllNodesService_
 
ros::ServiceServer removeNodeService_
 
ros::ServiceServer resetNodeHeightService_
 
ros::ServiceServer setGlobalModeService_
 
ros::ServiceServer setNewPathGuiRequestService_
 
ros::ServiceServer snapToMapService_
 
ros::ServiceServer toggleMarkerProcessFeedbackService_
 
ros::ServiceServer undoLastChangeService_
 
ros::ServiceClient getElevationMapService_
 
ros::Publisher edgePublisher_
 
double timeStep_
 
std::string workerName_
 
PathCreatorCore path_
 
boost::shared_ptr< intMarkerServer_tserver_
 
menuHandler_t menuHandler_
 
menuHandler_t initialMenuConfig_
 
std::map< std::string, menuHandler_t::EntryHandle > menuEntryModeHandles_
 
std::map< std::string, menuHandler_t::EntryHandle > menuEntryFixStatusHandles_
 
std::string edgePublisherTopic_
 
std::string getElevationMapServiceTopic_
 
bool singleMarkerCallbackActive_
 

Constructor & Destructor Documentation

path_creator::PathCreatorRos::PathCreatorRos ( )
delete
path_creator::PathCreatorRos::PathCreatorRos ( any_node::Node::NodeHandlePtr  nh)
inlineexplicit
path_creator::PathCreatorRos::~PathCreatorRos ( )
overridedefault

Member Function Documentation

bool path_creator::PathCreatorRos::addInitialNodePairCallback ( path_creator_msgs::AddNode::Request req,
path_creator_msgs::AddNode::Response res 
)
protected
bool path_creator::PathCreatorRos::addNodeCallback ( path_creator_msgs::AddNode::Request req,
path_creator_msgs::AddNode::Response res 
)
protected
bool path_creator::PathCreatorRos::addNumNodesCallback ( path_creator_msgs::AddNumNodes::Request req,
path_creator_msgs::AddNumNodes::Response res 
)
protected
bool path_creator::PathCreatorRos::autoSetOrientationCallback ( std_srvs::Empty::Request &  req,
std_srvs::Empty::Response &  res 
)
protected
void path_creator::PathCreatorRos::changeModeMenuCb ( const intMarkerFeedbackConstPtr_t feedback)
protected
void path_creator::PathCreatorRos::cleanup ( )
override
bool path_creator::PathCreatorRos::exportToFileCallback ( path_creator_msgs::SaveTxtFile::Request req,
path_creator_msgs::SaveTxtFile::Response res 
)
protected
void path_creator::PathCreatorRos::fixMarkerAtBaseCb ( const intMarkerFeedbackConstPtr_t feedback)
protected
void path_creator::PathCreatorRos::fixMarkerOrientationMenuCb ( const intMarkerFeedbackConstPtr_t feedback)
protected
void path_creator::PathCreatorRos::fixMarkerPoseMenuCb ( const intMarkerFeedbackConstPtr_t feedback)
protected
void path_creator::PathCreatorRos::fixMarkerPositionMenuCb ( const intMarkerFeedbackConstPtr_t feedback)
protected
bool path_creator::PathCreatorRos::getLocalGuidanceModeColorMapCallback ( path_creator_msgs::GetModeColorMap::Request req,
path_creator_msgs::GetModeColorMap::Response res 
)
protected
bool path_creator::PathCreatorRos::getNodePoseCallback ( path_creator_msgs::GetNodePose::Request req,
path_creator_msgs::GetNodePose::Response res 
)
protected
bool path_creator::PathCreatorRos::init ( )
override
void path_creator::PathCreatorRos::initMarkerMenu ( )
protected

Initialize the Interactive Marker menu.

void path_creator::PathCreatorRos::initRosInterfaces ( )
protected

Initialize ROS interfaces (e.g., services, publishers, etc.).

void path_creator::PathCreatorRos::insertMarkerToServer ( const intMarker_t marker)
protected

Insert an InteractiveMarker to the marker server.

Parameters
[in]markerThe Interactive Marker to be inserted to the server.
bool path_creator::PathCreatorRos::loadFromFileCallback ( path_creator_msgs::SaveTxtFile::Request req,
path_creator_msgs::SaveTxtFile::Response res 
)
protected
void path_creator::PathCreatorRos::passThroughNodeCb ( const intMarkerFeedbackConstPtr_t feedback)
protected
void path_creator::PathCreatorRos::printPoseMenuCb ( const intMarkerFeedbackConstPtr_t feedback)
protected
void path_creator::PathCreatorRos::processFeedbackMultipleMarkers ( const intMarkerFeedbackConstPtr_t feedback)
protected
void path_creator::PathCreatorRos::processFeedbackSingleMarker ( const intMarkerFeedbackConstPtr_t feedback)
protected
bool path_creator::PathCreatorRos::removeAllNodesCallback ( std_srvs::Empty::Request &  req,
std_srvs::Empty::Response &  res 
)
protected
bool path_creator::PathCreatorRos::removeNodeByIndexCallback ( path_creator_msgs::RemoveNode::Request req,
path_creator_msgs::RemoveNode::Response res 
)
protected
void path_creator::PathCreatorRos::removeThisMarkerMenuCb ( const intMarkerFeedbackConstPtr_t feedback)
protected
bool path_creator::PathCreatorRos::resetNodeHeightCallback ( std_srvs::Empty::Request &  req,
std_srvs::Empty::Response &  res 
)
protected
bool path_creator::PathCreatorRos::setGlobalModeCallback ( path_creator_msgs::SetGlobalMode::Request req,
path_creator_msgs::SetGlobalMode::Response res 
)
protected
bool path_creator::PathCreatorRos::setNewPathCallback ( path_creator_msgs::SetNewPath::Request req,
path_creator_msgs::SetNewPath::Response res 
)
protected
bool path_creator::PathCreatorRos::snapToMapCallback ( std_srvs::Empty::Request &  req,
std_srvs::Empty::Response &  res 
)
protected
bool path_creator::PathCreatorRos::toggleMarkerProcessFeedbackCallback ( std_srvs::SetBool::Request &  req,
std_srvs::SetBool::Response &  res 
)
protected
void path_creator::PathCreatorRos::toggleMenuEntryCheckState ( entryHandle_t  handle,
checkState_t state 
)
protected

Toggle Check State of 'handle' to 'state' and all others to the other state (e.g., CHECKED vs UNCHECKED).

Parameters
[in]handleThe handle whose Check State should be adapted.
[in]stateThe desired Check State of the handle (i.e., CHECKED or UNCHECKED).
bool path_creator::PathCreatorRos::undoLastChangeCallback ( std_srvs::Empty::Request &  req,
std_srvs::Empty::Response &  res 
)
protected
void path_creator::PathCreatorRos::updateNode ( const int  index)
protected

Updates all relevant information of a node (e.g., color, menu, etc.)

Parameters
[in]indexThe index of the node to update.
bool path_creator::PathCreatorRos::updatePathCreatorRos ( const any_worker::WorkerEvent &  event)
void path_creator::PathCreatorRos::updateVisualization ( )
protected

Update the visualization.

void path_creator::PathCreatorRos::updateVisualizationByIndex ( const int  index)
protected

Update the visualization for a single node.

Parameters
[in]indexThe index of the node to update.

Member Data Documentation

ros::ServiceServer path_creator::PathCreatorRos::addInitialNodePairService_
protected
ros::ServiceServer path_creator::PathCreatorRos::addNodeService_
protected
ros::ServiceServer path_creator::PathCreatorRos::addNumNodesService_
protected
ros::ServiceServer path_creator::PathCreatorRos::autoSetOrientationService_
protected
ros::Publisher path_creator::PathCreatorRos::edgePublisher_
protected
std::string path_creator::PathCreatorRos::edgePublisherTopic_
protected

The topic on which edges are published.

ros::ServiceServer path_creator::PathCreatorRos::exportToFileService_
protected
ros::ServiceClient path_creator::PathCreatorRos::getElevationMapService_
protected
std::string path_creator::PathCreatorRos::getElevationMapServiceTopic_
protected

The topic on which to retrieve an elevation map.

ros::ServiceServer path_creator::PathCreatorRos::getLocalGuidanceModeColorMapService_
protected
ros::ServiceServer path_creator::PathCreatorRos::getNodePoseService_
protected
menuHandler_t path_creator::PathCreatorRos::initialMenuConfig_
protected

The initial menu configuration of each interactive marker.

ros::ServiceServer path_creator::PathCreatorRos::loadPathFromFileService_
protected
std::map<std::string, menuHandler_t::EntryHandle> path_creator::PathCreatorRos::menuEntryFixStatusHandles_
protected

A map to refer marker fix status' entries (key) to their respective handle (value).

std::map<std::string, menuHandler_t::EntryHandle> path_creator::PathCreatorRos::menuEntryModeHandles_
protected

A map to refer Local Guidance menu entries (key) to their respective handle (value).

menuHandler_t path_creator::PathCreatorRos::menuHandler_
protected

The handler to manage the interactive markers' menus

PathCreatorCore path_creator::PathCreatorRos::path_
protected

The created path.

ros::ServiceServer path_creator::PathCreatorRos::removeAllNodesService_
protected
ros::ServiceServer path_creator::PathCreatorRos::removeNodeService_
protected
ros::ServiceServer path_creator::PathCreatorRos::resetNodeHeightService_
protected
boost::shared_ptr<intMarkerServer_t> path_creator::PathCreatorRos::server_
protected

The interactive marker server.

ros::ServiceServer path_creator::PathCreatorRos::setGlobalModeService_
protected
ros::ServiceServer path_creator::PathCreatorRos::setNewPathGuiRequestService_
protected
bool path_creator::PathCreatorRos::singleMarkerCallbackActive_
protected

Flag to handle, whether single marker or multiple marker callback is active.

ros::ServiceServer path_creator::PathCreatorRos::snapToMapService_
protected
double path_creator::PathCreatorRos::timeStep_
protected

The any_node::Node's worker frequency.

ros::ServiceServer path_creator::PathCreatorRos::toggleMarkerProcessFeedbackService_
protected
ros::ServiceServer path_creator::PathCreatorRos::undoLastChangeService_
protected
std::string path_creator::PathCreatorRos::workerName_
protected

The any_node::Node's worker name.


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