StopObjectLocalization.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package RobotSkillTemplates::ObjectLocalization
17  * @author Markus Grotz ( markus dot grotz at kit dot edu )
18  * @date 2016
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #include "StopObjectLocalization.h"
24 
25 
29 
30 
31 using namespace armarx;
32 using namespace ObjectLocalization;
33 
34 // DO NOT EDIT NEXT LINE
35 StopObjectLocalization::SubClassRegistry StopObjectLocalization::Registry(StopObjectLocalization::GetName(), &StopObjectLocalization::CreateInstance);
36 
37 
38 
40 {
41  if (in.isObjectInstanceChannelSet())
42  {
43  memoryx::ObjectMemoryObserverInterfacePrx objectMemoryObserver = getObjectMemoryObserver();
44  objectMemoryObserver->releaseObjectClass(in.getObjectInstanceChannel());
45  }
46  if (in.isObjectIDSet())
47  {
48  // TODO: Stop localizing the object in the ObjectPoseStorage?
49  ARMARX_INFO << "Stopping localization for object '" << in.getObjectID() << "'";
50  }
51 
52  emitSuccess();
53 }
54 
55 //void StopObjectLocalization::run()
56 //{
57 // // put your user code for the execution-phase here
58 // // runs in seperate thread, thus can do complex operations
59 // // should check constantly whether isRunningTaskStopped() returns true
60 //
61 //// uncomment this if you need a continous run function. Make sure to use sleep or use blocking wait to reduce cpu load.
62 // while (!isRunningTaskStopped()) // stop run function if returning true
63 // {
64 // // do your calculations
65 // }
66 //}
67 
68 //void StopObjectLocalization::onBreak()
69 //{
70 // // put your user code for the breaking point here
71 // // execution time should be short (<100ms)
72 //}
73 
75 {
76  // put your user code for the exit point here
77  // execution time should be short (<100ms)
78 }
79 
80 
81 // DO NOT EDIT NEXT FUNCTION
83 {
84  return XMLStateFactoryBasePtr(new StopObjectLocalization(stateData));
85 }
86 
armarx::ObjectLocalization::StopObjectLocalization::Registry
static SubClassRegistry Registry
Definition: StopObjectLocalization.h:46
armarx::XMLStateConstructorParams
Definition: XMLState.h:50
armarx::ObjectLocalization::StopObjectLocalization::onExit
void onExit() override
Definition: StopObjectLocalization.cpp:74
armarx::ObjectLocalization::StopObjectLocalization::CreateInstance
static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData)
Definition: StopObjectLocalization.cpp:82
IceInternal::Handle
Definition: forward_declarations.h:8
armarx::ObjectLocalization::StopObjectLocalization::StopObjectLocalization
StopObjectLocalization(const XMLStateConstructorParams &stateData)
Definition: StopObjectLocalization.h:33
StopObjectLocalization.h
armarx::ObjectLocalization::StopObjectLocalization::onEnter
void onEnter() override
Definition: StopObjectLocalization.cpp:39
MemoryXCoreObjectFactories.h
armarx::XMLStateFactoryBasePtr
IceInternal::Handle< XMLStateFactoryBase > XMLStateFactoryBasePtr
Definition: XMLState.h:65
ObjectInstance.h
ARMARX_INFO
#define ARMARX_INFO
Definition: Logging.h:174
MemoryXTypesObjectFactories.h
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28