Scene.h
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::ObjectMemory
17  * @author Rainer Kartmann ( rainer dot kartmann at kit dot edu )
18  * @date 2021
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 #pragma once
23 
24 #include <map>
25 #include <string>
26 #include <vector>
27 #include <optional>
28 
29 #include <Eigen/Core>
30 #include <Eigen/Geometry>
31 
32 #include "forward_declarations.h"
33 
34 
35 namespace armarx::objects
36 {
37 
38  struct SceneObject
39  {
40  std::string className;
41  std::string instanceName;
42  std::string collection;
43 
44  Eigen::Vector3f position = Eigen::Vector3f::Zero();
46 
47  std::optional<bool> isStatic;
48  std::map<std::string, float> jointValues;
49 
50  ObjectID getClassID() const;
51  ObjectID getClassID(ObjectFinder& finder) const;
52  ObjectID getObjectID() const;
53  ObjectID getObjectID(ObjectFinder& finder) const;
54  };
55 
56  struct Scene
57  {
58  std::vector<SceneObject> objects;
59  };
60 
61 }
armarx::ObjectID
A known object ID of the form "Dataset/ClassName" or "Dataset/ClassName/InstanceName".
Definition: ObjectID.h:11
armarx::objects::SceneObject::orientation
Eigen::Quaternionf orientation
Definition: Scene.h:45
armarx::objects::Scene::objects
std::vector< SceneObject > objects
Definition: Scene.h:58
armarx::objects::SceneObject::position
Eigen::Vector3f position
Definition: Scene.h:44
armarx::objects::SceneObject::jointValues
std::map< std::string, float > jointValues
Definition: Scene.h:48
armarx::objects::SceneObject
Definition: Scene.h:38
armarx::objects
Definition: forward_declarations.h:30
armarx::ObjectFinder
Used to find objects in the ArmarX objects repository [1] (formerly [2]).
Definition: ObjectFinder.h:23
GfxTL::Identity
void Identity(MatrixXX< N, N, T > *a)
Definition: MatrixXX.h:523
armarx::objects::SceneObject::getObjectID
ObjectID getObjectID() const
Definition: Scene.cpp:30
armarx::objects::SceneObject::isStatic
std::optional< bool > isStatic
Definition: Scene.h:47
armarx::objects::SceneObject::instanceName
std::string instanceName
Definition: Scene.h:41
armarx::objects::Scene
Definition: Scene.h:56
armarx::objects::SceneObject::collection
std::string collection
Definition: Scene.h:42
forward_declarations.h
armarx::Quaternion< float, 0 >
armarx::objects::SceneObject::className
std::string className
Definition: Scene.h:40
armarx::objects::SceneObject::getClassID
ObjectID getClassID() const
Definition: Scene.cpp:10