src/stringPublisherNode.cpp
/**
 * @brief A change of string function which is called when a service is called 
 *        to change the publishing message
 * @param req It is the reference to the argument which the client
 *            requests the service which is the used as new publish message
 * @param resp It is the reference to the string that the service replies   
 * @return bool It returns true is the service is called successfully
 */
@brief A change of string function which is called when a service is called
to change the publishing message
@param req It is the reference to the argument which the client
requests the service which is the used as new publish message
@param resp It is the reference to the string that the service replies
@return bool It returns true is the service is called successfully
@brief A change of string function which is called when a service is called to change the publishing message @param req It is the reference to the argument which the client requests the service which is the used as new publish message @param resp It is the reference to the string that the service replies @return bool It returns true is the service is called successfully
bool changeString(beginner_tutorials::changeString::Request &req,
                  beginner_tutorials::changeString::Response &resp) {
        resp.output = str;
        if (resp.output == req.a) {
                ROS_ERROR_STREAM("Change in String Not Achieved");
        } else {
                str = req.a;
                ROS_WARN_STREAM("The String is Modified");
        }
        return true;
}
bool changeString ( beginner_tutorials :: changeString :: Request & req , beginner_tutorials :: changeString :: Response & resp ) { resp . output = str ; if ( resp . output == req . a ) { ROS_ERROR_STREAM ( " " ) ; } else { str = req . a ; ROS_WARN_STREAM ( " " ) ; } return true ; }
@brief A change of string function which is called when a service is called
        to change the publishing message
 @param req It is the reference to the argument which the client
            requests the service which is the used as new publish message
 @param resp It is the reference to the string that the service replies
 @return bool It returns true is the service is called successfully
@brief A change of string function which is called when a service is called to change the publishing message @param req It is the reference to the argument which the client requests the service which is the used as new publish message @param resp It is the reference to the string that the service replies @return bool It returns true is the service is called successfully
/**
	  * Condition check for checking if the string passed to the service is 
	  * same as the current publishing string
	  */