Public Member Functions | Private Member Functions | Private Attributes | List of all members
rsm::ServiceProvider Class Reference

Establishes communication between the different states and the RSM's periphery including the GUI. It offers services and publishes topics based on the variables that need to be saved during state transitions. More...

#include <ServiceProvider.h>

Public Member Functions

void publishTopics ()
 
 ServiceProvider ()
 
 ~ServiceProvider ()
 

Private Member Functions

bool addWaypoint (rsm_msgs::AddWaypoint::Request &req, rsm_msgs::AddWaypoint::Response &res)
 
bool getExplorationMode (std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &res)
 
bool getNavigationGoal (rsm_msgs::GetNavigationGoal::Request &req, rsm_msgs::GetNavigationGoal::Response &res)
 
bool getReverseMode (std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &res)
 
bool getRobotPose (rsm_msgs::GetRobotPose::Request &req, rsm_msgs::GetRobotPose::Response &res)
 
bool getWaypointRoutines (rsm_msgs::GetWaypointRoutines::Request &req, rsm_msgs::GetWaypointRoutines::Response &res)
 
bool getWaypoints (rsm_msgs::GetWaypoints::Request &req, rsm_msgs::GetWaypoints::Response &res)
 
bool moveWaypoint (rsm_msgs::MoveWaypoint::Request &req, rsm_msgs::MoveWaypoint::Response &res)
 
bool NavigationGoalCompleted (rsm_msgs::GoalCompleted::Request &req, rsm_msgs::GoalCompleted::Response &res)
 
void publishExplorationGoalCompleted ()
 
void publishExplorationModes ()
 
void publishGoalObsolete ()
 
void publishReverseMode ()
 
void publishWaypoints ()
 
bool removeWaypoint (rsm_msgs::RemoveWaypoint::Request &req, rsm_msgs::RemoveWaypoint::Response &res)
 
bool resetWaypoints (std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &res)
 
bool setExplorationMode (std_srvs::SetBool::Request &req, std_srvs::SetBool::Response &res)
 
bool setNavigationGoal (rsm_msgs::SetNavigationGoal::Request &req, rsm_msgs::SetNavigationGoal::Response &res)
 
bool setReverseMode (std_srvs::SetBool::Request &req, std_srvs::SetBool::Response &res)
 
bool setWaypointFollowingMode (rsm_msgs::SetWaypointFollowingMode::Request &req, rsm_msgs::SetWaypointFollowingMode::Response &res)
 
bool setWaypointRoutine (rsm_msgs::SetWaypointRoutine::Request &req, rsm_msgs::SetWaypointRoutine::Response &res)
 
bool waypointUnreachable (rsm_msgs::WaypointUnreachable::Request &req, rsm_msgs::WaypointUnreachable::Response &res)
 
bool waypointVisited (rsm_msgs::WaypointVisited::Request &req, rsm_msgs::WaypointVisited::Response &res)
 

Private Attributes

ros::ServiceServer _add_waypoint_service
 
rsm_msgs::GoalStatus _exploration_goal_completed_msg
 
ros::Publisher _exploration_goal_publisher
 
bool _exploration_mode
 
ros::Publisher _exploration_mode_publisher
 
ros::ServiceServer _get_exploration_mode_service
 
ros::ServiceServer _get_navigation_goal_service
 
ros::ServiceServer _get_reverse_mode_service
 
ros::ServiceServer _get_robot_pose_service
 
ros::ServiceServer _get_waypoint_routines_service
 
ros::ServiceServer _get_waypoints_service
 
ros::ServiceServer _move_waypoint_service
 
geometry_msgs::Pose _navigation_goal
 
ros::ServiceServer _navigation_goal_completed_service
 
int _navigation_mode
 
ros::NodeHandle _nh
 
ros::ServiceServer _remove_waypoint_service
 
ros::ServiceServer _reset_waypoints_service
 
bool _reverse_mode_active
 
ros::Publisher _reverse_mode_publisher
 
std::string _robot_frame
 Robot frame id. More...
 
std::string _routine
 
ros::ServiceServer _set_exploration_mode_service
 
ros::ServiceServer _set_navigation_goal_service
 
ros::ServiceClient _set_navigation_to_reverse_client
 
ros::ServiceServer _set_reverse_mode_service
 
ros::ServiceServer _set_waypoint_following_mode_service
 
ros::ServiceServer _set_waypoint_routine_service
 
tf::StampedTransform _transform
 ROS transform from map to robot frame. More...
 
tf::TransformListener _transform_listener
 
rsm_msgs::WaypointArray _waypoint_array
 
int _waypoint_position
 
std::vector< std::string > _waypoint_routines
 
ros::ServiceServer _waypoint_unreachable_service
 
ros::ServiceServer _waypoint_visited_service
 
ros::Publisher _waypoints_publisher
 

Detailed Description

Establishes communication between the different states and the RSM's periphery including the GUI. It offers services and publishes topics based on the variables that need to be saved during state transitions.

Definition at line 39 of file ServiceProvider.h.

Constructor & Destructor Documentation

rsm::ServiceProvider::ServiceProvider ( )

Constructor

Definition at line 5 of file ServiceProvider.cpp.

rsm::ServiceProvider::~ServiceProvider ( )

Destructor

Definition at line 79 of file ServiceProvider.cpp.

Member Function Documentation

bool rsm::ServiceProvider::addWaypoint ( rsm_msgs::AddWaypoint::Request &  req,
rsm_msgs::AddWaypoint::Response &  res 
)
private

Definition at line 90 of file ServiceProvider.cpp.

bool rsm::ServiceProvider::getExplorationMode ( std_srvs::Trigger::Request &  req,
std_srvs::Trigger::Response &  res 
)
private

Definition at line 287 of file ServiceProvider.cpp.

bool rsm::ServiceProvider::getNavigationGoal ( rsm_msgs::GetNavigationGoal::Request &  req,
rsm_msgs::GetNavigationGoal::Response &  res 
)
private

Definition at line 227 of file ServiceProvider.cpp.

bool rsm::ServiceProvider::getReverseMode ( std_srvs::Trigger::Request &  req,
std_srvs::Trigger::Response &  res 
)
private

Definition at line 338 of file ServiceProvider.cpp.

bool rsm::ServiceProvider::getRobotPose ( rsm_msgs::GetRobotPose::Request &  req,
rsm_msgs::GetRobotPose::Response &  res 
)
private

Definition at line 271 of file ServiceProvider.cpp.

bool rsm::ServiceProvider::getWaypointRoutines ( rsm_msgs::GetWaypointRoutines::Request &  req,
rsm_msgs::GetWaypointRoutines::Response &  res 
)
private

Definition at line 201 of file ServiceProvider.cpp.

bool rsm::ServiceProvider::getWaypoints ( rsm_msgs::GetWaypoints::Request &  req,
rsm_msgs::GetWaypoints::Response &  res 
)
private

Definition at line 105 of file ServiceProvider.cpp.

bool rsm::ServiceProvider::moveWaypoint ( rsm_msgs::MoveWaypoint::Request &  req,
rsm_msgs::MoveWaypoint::Response &  res 
)
private

Definition at line 111 of file ServiceProvider.cpp.

bool rsm::ServiceProvider::NavigationGoalCompleted ( rsm_msgs::GoalCompleted::Request &  req,
rsm_msgs::GoalCompleted::Response &  res 
)
private

Definition at line 237 of file ServiceProvider.cpp.

void rsm::ServiceProvider::publishExplorationGoalCompleted ( )
private

Definition at line 308 of file ServiceProvider.cpp.

void rsm::ServiceProvider::publishExplorationModes ( )
private

Definition at line 302 of file ServiceProvider.cpp.

void rsm::ServiceProvider::publishGoalObsolete ( )
private
void rsm::ServiceProvider::publishReverseMode ( )
private

Definition at line 350 of file ServiceProvider.cpp.

void rsm::ServiceProvider::publishTopics ( )

Publish all topics (waypoints, goal obsolete, exploration and reverse mode)

Definition at line 83 of file ServiceProvider.cpp.

void rsm::ServiceProvider::publishWaypoints ( )
private

Definition at line 208 of file ServiceProvider.cpp.

bool rsm::ServiceProvider::removeWaypoint ( rsm_msgs::RemoveWaypoint::Request &  req,
rsm_msgs::RemoveWaypoint::Response &  res 
)
private

Definition at line 124 of file ServiceProvider.cpp.

bool rsm::ServiceProvider::resetWaypoints ( std_srvs::Trigger::Request &  req,
std_srvs::Trigger::Response &  res 
)
private

Definition at line 166 of file ServiceProvider.cpp.

bool rsm::ServiceProvider::setExplorationMode ( std_srvs::SetBool::Request &  req,
std_srvs::SetBool::Response &  res 
)
private

Definition at line 294 of file ServiceProvider.cpp.

bool rsm::ServiceProvider::setNavigationGoal ( rsm_msgs::SetNavigationGoal::Request &  req,
rsm_msgs::SetNavigationGoal::Response &  res 
)
private

Definition at line 212 of file ServiceProvider.cpp.

bool rsm::ServiceProvider::setReverseMode ( std_srvs::SetBool::Request &  req,
std_srvs::SetBool::Response &  res 
)
private

Definition at line 312 of file ServiceProvider.cpp.

bool rsm::ServiceProvider::setWaypointFollowingMode ( rsm_msgs::SetWaypointFollowingMode::Request &  req,
rsm_msgs::SetWaypointFollowingMode::Response &  res 
)
private

Definition at line 177 of file ServiceProvider.cpp.

bool rsm::ServiceProvider::setWaypointRoutine ( rsm_msgs::SetWaypointRoutine::Request &  req,
rsm_msgs::SetWaypointRoutine::Response &  res 
)
private

Definition at line 187 of file ServiceProvider.cpp.

bool rsm::ServiceProvider::waypointUnreachable ( rsm_msgs::WaypointUnreachable::Request &  req,
rsm_msgs::WaypointUnreachable::Response &  res 
)
private

Definition at line 152 of file ServiceProvider.cpp.

bool rsm::ServiceProvider::waypointVisited ( rsm_msgs::WaypointVisited::Request &  req,
rsm_msgs::WaypointVisited::Response &  res 
)
private

Definition at line 139 of file ServiceProvider.cpp.

Member Data Documentation

ros::ServiceServer rsm::ServiceProvider::_add_waypoint_service
private

Definition at line 57 of file ServiceProvider.h.

rsm_msgs::GoalStatus rsm::ServiceProvider::_exploration_goal_completed_msg
private

Message for completed exploration goal

Definition at line 132 of file ServiceProvider.h.

ros::Publisher rsm::ServiceProvider::_exploration_goal_publisher
private

Definition at line 79 of file ServiceProvider.h.

bool rsm::ServiceProvider::_exploration_mode
private

Mode of exploration (0=complete goal, 1=interrupt goal when exploration goals vanished)

Definition at line 124 of file ServiceProvider.h.

ros::Publisher rsm::ServiceProvider::_exploration_mode_publisher
private

Definition at line 78 of file ServiceProvider.h.

ros::ServiceServer rsm::ServiceProvider::_get_exploration_mode_service
private

Definition at line 77 of file ServiceProvider.h.

ros::ServiceServer rsm::ServiceProvider::_get_navigation_goal_service
private

Definition at line 70 of file ServiceProvider.h.

ros::ServiceServer rsm::ServiceProvider::_get_reverse_mode_service
private

Definition at line 82 of file ServiceProvider.h.

ros::ServiceServer rsm::ServiceProvider::_get_robot_pose_service
private

Definition at line 73 of file ServiceProvider.h.

ros::ServiceServer rsm::ServiceProvider::_get_waypoint_routines_service
private

Definition at line 66 of file ServiceProvider.h.

ros::ServiceServer rsm::ServiceProvider::_get_waypoints_service
private

Definition at line 58 of file ServiceProvider.h.

ros::ServiceServer rsm::ServiceProvider::_move_waypoint_service
private

Definition at line 59 of file ServiceProvider.h.

geometry_msgs::Pose rsm::ServiceProvider::_navigation_goal
private

Current navigation goal

Definition at line 89 of file ServiceProvider.h.

ros::ServiceServer rsm::ServiceProvider::_navigation_goal_completed_service
private

Definition at line 71 of file ServiceProvider.h.

int rsm::ServiceProvider::_navigation_mode
private

Mode of navigation (Exploration=0, Waypoint following=1 and Simple Goal=2)

Definition at line 97 of file ServiceProvider.h.

ros::NodeHandle rsm::ServiceProvider::_nh
private

Definition at line 56 of file ServiceProvider.h.

ros::ServiceServer rsm::ServiceProvider::_remove_waypoint_service
private

Definition at line 60 of file ServiceProvider.h.

ros::ServiceServer rsm::ServiceProvider::_reset_waypoints_service
private

Definition at line 63 of file ServiceProvider.h.

bool rsm::ServiceProvider::_reverse_mode_active
private

Is currently driving in reverse

Definition at line 128 of file ServiceProvider.h.

ros::Publisher rsm::ServiceProvider::_reverse_mode_publisher
private

Definition at line 84 of file ServiceProvider.h.

std::string rsm::ServiceProvider::_robot_frame
private

Robot frame id.

Definition at line 116 of file ServiceProvider.h.

std::string rsm::ServiceProvider::_routine
private

Routine to be executed when reaching the current waypoint

Definition at line 101 of file ServiceProvider.h.

ros::ServiceServer rsm::ServiceProvider::_set_exploration_mode_service
private

Definition at line 76 of file ServiceProvider.h.

ros::ServiceServer rsm::ServiceProvider::_set_navigation_goal_service
private

Definition at line 69 of file ServiceProvider.h.

ros::ServiceClient rsm::ServiceProvider::_set_navigation_to_reverse_client
private

Definition at line 83 of file ServiceProvider.h.

ros::ServiceServer rsm::ServiceProvider::_set_reverse_mode_service
private

Definition at line 81 of file ServiceProvider.h.

ros::ServiceServer rsm::ServiceProvider::_set_waypoint_following_mode_service
private

Definition at line 64 of file ServiceProvider.h.

ros::ServiceServer rsm::ServiceProvider::_set_waypoint_routine_service
private

Definition at line 65 of file ServiceProvider.h.

tf::StampedTransform rsm::ServiceProvider::_transform
private

ROS transform from map to robot frame.

Definition at line 115 of file ServiceProvider.h.

tf::TransformListener rsm::ServiceProvider::_transform_listener
private

Definition at line 74 of file ServiceProvider.h.

rsm_msgs::WaypointArray rsm::ServiceProvider::_waypoint_array
private

List of all waypoints

Definition at line 93 of file ServiceProvider.h.

int rsm::ServiceProvider::_waypoint_position
private

Position of the current waypoint in the waypoint list

Definition at line 105 of file ServiceProvider.h.

std::vector<std::string> rsm::ServiceProvider::_waypoint_routines
private

List of all available waypoint routines

Definition at line 110 of file ServiceProvider.h.

ros::ServiceServer rsm::ServiceProvider::_waypoint_unreachable_service
private

Definition at line 62 of file ServiceProvider.h.

ros::ServiceServer rsm::ServiceProvider::_waypoint_visited_service
private

Definition at line 61 of file ServiceProvider.h.

ros::Publisher rsm::ServiceProvider::_waypoints_publisher
private

Definition at line 67 of file ServiceProvider.h.


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


rsm_core
Author(s): Marco Steinbrink
autogenerated on Tue Mar 16 2021 02:44:31