RosActionServer.h
Go to the documentation of this file.
1 /*
2  * Copyright 2020 <copyright holder> <email>
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef ROSACTIONSERVER_H
18 #define ROSACTIONSERVER_H
19 
20 #include <string>
21 #include <ros/ros.h>
22 #include <ros/console.h>
24 #include <rosee_msg/ROSEECommandAction.h>
25 
26 #define DEFAULT_ERROR_NORM 0.01
27 
28 namespace ROSEE {
33 
34 public:
37 
38  rosee_msg::ROSEEActionControl getGoal();
39  bool hasGoal() const;
40  bool hasNewGoal() const;
41 
46  double getWantedNormError() const;
47 
57  void sendFeedback(double completation_percentage, std::string currentAction) ;
58  void sendComplete () ;
59  void abortGoal(std::string errorMsg = "");
60 
61 
62 protected:
64  std::string topicForAction;
66  rosee_msg::ROSEEActionControl actionControlMsg;
68  bool newGoal;
70 
71  void goalReceivedCallback ();
73 
74 
75 };
76 
77 }
78 
79 #endif // ROSACTIONSERVER_H
ROSEE::RosActionServer::goalInExecution
bool goalInExecution
Definition: RosActionServer.h:67
ROSEE::RosActionServer
Definition: RosActionServer.h:32
ros.h
ROSEE::RosActionServer::RosActionServer
RosActionServer(std::string topicForAction, ros::NodeHandle *nh)
Definition: RosActionServer.cpp:19
ROSEE::RosActionServer::_actionServer
actionlib::SimpleActionServer< rosee_msg::ROSEECommandAction > _actionServer
Definition: RosActionServer.h:65
ROSEE::RosActionServer::sendFeedback
void sendFeedback(double completation_percentage, std::string currentAction)
send Feedback to the client who has requested the goal.
Definition: RosActionServer.cpp:95
ROSEE::RosActionServer::goalReceivedCallback
void goalReceivedCallback()
Definition: RosActionServer.cpp:58
ROSEE
Definition: EEInterface.h:30
ROSEE::RosActionServer::nh
ros::NodeHandle * nh
Definition: RosActionServer.h:63
simple_action_server.h
ROSEE::RosActionServer::abortGoal
void abortGoal(std::string errorMsg="")
Definition: RosActionServer.cpp:83
console.h
ROSEE::RosActionServer::getGoal
rosee_msg::ROSEEActionControl getGoal()
Definition: RosActionServer.cpp:46
ROSEE::RosActionServer::hasNewGoal
bool hasNewGoal() const
Definition: RosActionServer.cpp:38
ROSEE::RosActionServer::sendComplete
void sendComplete()
Definition: RosActionServer.cpp:111
ROSEE::RosActionServer::wantedNormError
double wantedNormError
Definition: RosActionServer.h:69
ROSEE::RosActionServer::topicForAction
std::string topicForAction
Definition: RosActionServer.h:64
ROSEE::RosActionServer::~RosActionServer
~RosActionServer()
Definition: RosActionServer.h:36
actionlib::SimpleActionServer< rosee_msg::ROSEECommandAction >
ROSEE::RosActionServer::preemptReceivedCallback
void preemptReceivedCallback()
Definition: RosActionServer.cpp:72
ROSEE::RosActionServer::actionControlMsg
rosee_msg::ROSEEActionControl actionControlMsg
Definition: RosActionServer.h:66
ROSEE::RosActionServer::getWantedNormError
double getWantedNormError() const
in message there is a field where norm error of joint position can be set If it is not present in the...
Definition: RosActionServer.cpp:42
ROSEE::RosActionServer::newGoal
bool newGoal
Definition: RosActionServer.h:68
ros::NodeHandle
ROSEE::RosActionServer::hasGoal
bool hasGoal() const
Definition: RosActionServer.cpp:34


end-effector
Author(s): Luca Muratore , Davide Torielli , Liana Bertoni
autogenerated on Sat Dec 14 2024 03:49:26