utils.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 RobotAPI::ArmarXObjects::armem_objects
17  * @author Rainer Kartmann ( rainer dot kartmann at kit dot edu )
18  * @date 2022
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #include "utils.h"
24 
28 
29 
30 namespace armarx::armem
31 {
32 
33  MemoryID
35  {
36  armem::MemoryID id =
38  .withEntityName(objectPose.objectID.str())
39  .withTimestamp(objectPose.timestamp)
41  return id;
42  }
43 
44 
45 } // namespace armarx::armem
memory_ids.h
MemoryID.h
armarx::armem::objects::instaceSegmentID
const MemoryID instaceSegmentID
Definition: memory_ids.cpp:33
armarx::armem
Definition: LegacyRobotStateMemoryAdapter.cpp:31
armarx::objpose::ObjectPose::providerName
std::string providerName
Name of the providing component.
Definition: ObjectPose.h:61
armarx::armem::MemoryID::withProviderSegmentName
MemoryID withProviderSegmentName(const std::string &name) const
Definition: MemoryID.cpp:412
armarx::armem::MemoryID
A memory ID.
Definition: MemoryID.h:47
ObjectPose.h
armarx::objpose::ObjectPose::objectID
armarx::ObjectID objectID
The object ID, i.e. dataset, class name and instance name.
Definition: ObjectPose.h:58
armarx::armem::MemoryID::withEntityName
MemoryID withEntityName(const std::string &name) const
Definition: MemoryID.cpp:420
armarx::armem::MemoryID::withTimestamp
MemoryID withTimestamp(Time time) const
Definition: MemoryID.cpp:428
armarx::armem::objects::reconstructObjectInstanceID
armem::MemoryID reconstructObjectInstanceID(const objpose::ObjectPose &objectPose)
Definition: utils.cpp:34
armarx::armem::MemoryID::withInstanceIndex
MemoryID withInstanceIndex(int index) const
Definition: MemoryID.cpp:436
utils.h
armarx::objpose::ObjectPose
An object pose as stored by the ObjectPoseStorage.
Definition: ObjectPose.h:36
armarx::ObjectID::str
std::string str() const
Return "dataset/className" or "dataset/className/instanceName".
Definition: ObjectID.cpp:55
armarx::objpose::ObjectPose::timestamp
DateTime timestamp
Source timestamp.
Definition: ObjectPose.h:100
armarx::human::MemoryID
const armem::MemoryID MemoryID
Definition: memory_ids.cpp:29