From e45ce2356db24e44f6d6566166be08e0643109c9 Mon Sep 17 00:00:00 2001 From: Fabian Paus <fabian.paus@kit.edu> Date: Thu, 21 May 2020 20:52:54 +0200 Subject: [PATCH] Optimize includes --- SimDynamics/DynamicsEngine/BulletEngine/BulletObject.cpp | 1 + SimDynamics/DynamicsEngine/BulletEngine/BulletObject.h | 1 + VirtualRobot/BoundingBox.h | 7 ++++++- VirtualRobot/Dynamics/tests/DynamicsRBDLTest.cpp | 1 + VirtualRobot/Grasping/Grasp.cpp | 1 + VirtualRobot/IK/CoMIK.cpp | 1 + VirtualRobot/IK/HierarchicalIK.cpp | 3 +++ VirtualRobot/IK/HierarchicalIKSolver.cpp | 3 +++ VirtualRobot/IK/JacobiProvider.cpp | 2 ++ VirtualRobot/IK/PoseQualityExtendedManipulability.cpp | 2 ++ VirtualRobot/IK/StackedIK.cpp | 2 ++ VirtualRobot/Nodes/CameraSensor.cpp | 2 ++ VirtualRobot/Nodes/PositionSensor.cpp | 2 ++ VirtualRobot/Nodes/RobotNode.cpp | 1 + VirtualRobot/Nodes/RobotNode.h | 2 +- VirtualRobot/Nodes/RobotNodePrismatic.cpp | 1 + VirtualRobot/Nodes/Sensor.cpp | 1 + VirtualRobot/Robot.cpp | 1 + VirtualRobot/Robot.h | 1 + VirtualRobot/RobotFactory.cpp | 1 + VirtualRobot/SceneObject.cpp | 1 + VirtualRobot/Tools/Gravity.cpp | 1 + VirtualRobot/Trajectory.cpp | 1 + VirtualRobot/XML/BaseIO.cpp | 1 + VirtualRobot/XML/BaseIO.h | 1 + VirtualRobot/XML/RobotIO.cpp | 1 + VirtualRobot/XML/mujoco/RobotMjcf.cpp | 1 + 27 files changed, 41 insertions(+), 2 deletions(-) diff --git a/SimDynamics/DynamicsEngine/BulletEngine/BulletObject.cpp b/SimDynamics/DynamicsEngine/BulletEngine/BulletObject.cpp index edf0cae4b..30d760797 100644 --- a/SimDynamics/DynamicsEngine/BulletEngine/BulletObject.cpp +++ b/SimDynamics/DynamicsEngine/BulletEngine/BulletObject.cpp @@ -7,6 +7,7 @@ #include <VirtualRobot/Obstacle.h> #include <VirtualRobot/CollisionDetection/CollisionModel.h> #include <VirtualRobot/Visualization/TriMeshModel.h> +#include <VirtualRobot/Visualization/VisualizationNode.h> #include <VirtualRobot/Primitive.h> diff --git a/SimDynamics/DynamicsEngine/BulletEngine/BulletObject.h b/SimDynamics/DynamicsEngine/BulletEngine/BulletObject.h index 10e20c571..e48c8ebae 100644 --- a/SimDynamics/DynamicsEngine/BulletEngine/BulletObject.h +++ b/SimDynamics/DynamicsEngine/BulletEngine/BulletObject.h @@ -24,6 +24,7 @@ #include "../DynamicsObject.h" #include "SimoxMotionState.h" +#include <VirtualRobot/Primitive.h> #include "btBulletDynamicsCommon.h" diff --git a/VirtualRobot/BoundingBox.h b/VirtualRobot/BoundingBox.h index ddb808862..65d00b99d 100644 --- a/VirtualRobot/BoundingBox.h +++ b/VirtualRobot/BoundingBox.h @@ -22,13 +22,18 @@ */ #pragma once -#include "MathTools.h" +#include <VirtualRobot/VirtualRobotImportExport.h> #include <Eigen/Core> #include <vector> namespace VirtualRobot { + namespace MathTools + { + struct Plane; + } + class CollisionChecker; /*! An axis oriented bounding box. diff --git a/VirtualRobot/Dynamics/tests/DynamicsRBDLTest.cpp b/VirtualRobot/Dynamics/tests/DynamicsRBDLTest.cpp index 040ef6cae..6362809a7 100644 --- a/VirtualRobot/Dynamics/tests/DynamicsRBDLTest.cpp +++ b/VirtualRobot/Dynamics/tests/DynamicsRBDLTest.cpp @@ -12,6 +12,7 @@ #include <VirtualRobot/XML/RobotIO.h> #include <VirtualRobot/Robot.h> #include <VirtualRobot/RobotNodeSet.h> +#include <VirtualRobot/MathTools.h> #include <Eigen/Core> diff --git a/VirtualRobot/Grasping/Grasp.cpp b/VirtualRobot/Grasping/Grasp.cpp index e016a3713..2566b9b4d 100644 --- a/VirtualRobot/Grasping/Grasp.cpp +++ b/VirtualRobot/Grasping/Grasp.cpp @@ -3,6 +3,7 @@ #include "../RobotConfig.h" #include "..//Robot.h" #include "../VirtualRobotException.h" +#include <VirtualRobot/MathTools.h> #include <Eigen/Dense> diff --git a/VirtualRobot/IK/CoMIK.cpp b/VirtualRobot/IK/CoMIK.cpp index 49305a979..85d80e7f7 100644 --- a/VirtualRobot/IK/CoMIK.cpp +++ b/VirtualRobot/IK/CoMIK.cpp @@ -4,6 +4,7 @@ #include "../Nodes/RobotNodePrismatic.h" #include "../VirtualRobotException.h" #include "../Robot.h" +#include <VirtualRobot/MathTools.h> #include <Eigen/Geometry> diff --git a/VirtualRobot/IK/HierarchicalIK.cpp b/VirtualRobot/IK/HierarchicalIK.cpp index 233c0ba70..2f7405b51 100644 --- a/VirtualRobot/IK/HierarchicalIK.cpp +++ b/VirtualRobot/IK/HierarchicalIK.cpp @@ -1,4 +1,7 @@ #include "HierarchicalIK.h" + +#include <VirtualRobot/MathTools.h> + using namespace VirtualRobot; using namespace std; diff --git a/VirtualRobot/IK/HierarchicalIKSolver.cpp b/VirtualRobot/IK/HierarchicalIKSolver.cpp index 3dfec0767..b98642239 100644 --- a/VirtualRobot/IK/HierarchicalIKSolver.cpp +++ b/VirtualRobot/IK/HierarchicalIKSolver.cpp @@ -1,4 +1,7 @@ #include "HierarchicalIKSolver.h" + +#include <VirtualRobot/MathTools.h> + //#define DEBUG HierarchicalIKSolver::HierarchicalIKSolver(RobotNodeSetPtr allRobotNodes) : HierarchicalIK(allRobotNodes) diff --git a/VirtualRobot/IK/JacobiProvider.cpp b/VirtualRobot/IK/JacobiProvider.cpp index c8be128c7..ec464538d 100644 --- a/VirtualRobot/IK/JacobiProvider.cpp +++ b/VirtualRobot/IK/JacobiProvider.cpp @@ -1,6 +1,8 @@ #include <Eigen/Geometry> #include "JacobiProvider.h" +#include <VirtualRobot/MathTools.h> + #include <Eigen/Dense> #include <algorithm> diff --git a/VirtualRobot/IK/PoseQualityExtendedManipulability.cpp b/VirtualRobot/IK/PoseQualityExtendedManipulability.cpp index 0b230abc8..0ecb2e85a 100644 --- a/VirtualRobot/IK/PoseQualityExtendedManipulability.cpp +++ b/VirtualRobot/IK/PoseQualityExtendedManipulability.cpp @@ -1,6 +1,8 @@ #include "PoseQualityExtendedManipulability.h" +#include <VirtualRobot/MathTools.h> + #include <boost/math/special_functions/fpclassify.hpp> #include <Eigen/Geometry> diff --git a/VirtualRobot/IK/StackedIK.cpp b/VirtualRobot/IK/StackedIK.cpp index 2ab7969f1..f6c8549a0 100644 --- a/VirtualRobot/IK/StackedIK.cpp +++ b/VirtualRobot/IK/StackedIK.cpp @@ -23,6 +23,8 @@ #include "StackedIK.h" +#include <VirtualRobot/MathTools.h> + using namespace VirtualRobot; namespace VirtualRobot diff --git a/VirtualRobot/Nodes/CameraSensor.cpp b/VirtualRobot/Nodes/CameraSensor.cpp index 4d5132d2a..41138ee69 100644 --- a/VirtualRobot/Nodes/CameraSensor.cpp +++ b/VirtualRobot/Nodes/CameraSensor.cpp @@ -2,6 +2,8 @@ #include "CameraSensor.h" #include "CameraSensorFactory.h" +#include <VirtualRobot/Visualization/VisualizationNode.h> + namespace VirtualRobot { diff --git a/VirtualRobot/Nodes/PositionSensor.cpp b/VirtualRobot/Nodes/PositionSensor.cpp index bb9e21656..1773e94f6 100644 --- a/VirtualRobot/Nodes/PositionSensor.cpp +++ b/VirtualRobot/Nodes/PositionSensor.cpp @@ -3,6 +3,8 @@ #include "PositionSensorFactory.h" #include "../XML/BaseIO.h" +#include <VirtualRobot/Visualization/VisualizationNode.h> + namespace VirtualRobot { diff --git a/VirtualRobot/Nodes/RobotNode.cpp b/VirtualRobot/Nodes/RobotNode.cpp index e54c52a2d..94c42229a 100644 --- a/VirtualRobot/Nodes/RobotNode.cpp +++ b/VirtualRobot/Nodes/RobotNode.cpp @@ -15,6 +15,7 @@ #include <algorithm> #include <filesystem> #include "../math/Helpers.h" +#include "../Visualization/VisualizationNode.h" #include <Eigen/Core> diff --git a/VirtualRobot/Nodes/RobotNode.h b/VirtualRobot/Nodes/RobotNode.h index 88f6acf96..83e1835be 100644 --- a/VirtualRobot/Nodes/RobotNode.h +++ b/VirtualRobot/Nodes/RobotNode.h @@ -26,13 +26,13 @@ #include "../VirtualRobotException.h" #include "../SceneObject.h" #include "../Transformation/DHParameter.h" -#include "../Visualization/VisualizationNode.h" #include "Sensor.h" #include <Eigen/Core> #include <string> #include <vector> +#include <map> namespace VirtualRobot diff --git a/VirtualRobot/Nodes/RobotNodePrismatic.cpp b/VirtualRobot/Nodes/RobotNodePrismatic.cpp index 88c958948..c1cd484ec 100644 --- a/VirtualRobot/Nodes/RobotNodePrismatic.cpp +++ b/VirtualRobot/Nodes/RobotNodePrismatic.cpp @@ -3,6 +3,7 @@ #include "../Robot.h" #include "../VirtualRobotException.h" #include "../CollisionDetection/CollisionModel.h" +#include "../Visualization/VisualizationNode.h" #include <cmath> #include <algorithm> diff --git a/VirtualRobot/Nodes/Sensor.cpp b/VirtualRobot/Nodes/Sensor.cpp index 43fba9283..249f93ac4 100644 --- a/VirtualRobot/Nodes/Sensor.cpp +++ b/VirtualRobot/Nodes/Sensor.cpp @@ -5,6 +5,7 @@ #include "../XML/BaseIO.h" #include "../Visualization/TriMeshModel.h" #include "RobotNode.h" +#include <VirtualRobot/Visualization/VisualizationNode.h> #include <Eigen/Core> diff --git a/VirtualRobot/Robot.cpp b/VirtualRobot/Robot.cpp index 7c550309c..b6ab8d9cc 100644 --- a/VirtualRobot/Robot.cpp +++ b/VirtualRobot/Robot.cpp @@ -4,6 +4,7 @@ #include "Trajectory.h" #include "VirtualRobotException.h" #include "Nodes/Sensor.h" +#include "Visualization/VisualizationNode.h" #include "CollisionDetection/CollisionChecker.h" #include "CollisionDetection/CollisionModel.h" #include "EndEffector/EndEffector.h" diff --git a/VirtualRobot/Robot.h b/VirtualRobot/Robot.h index b494bfe93..1a860c12b 100644 --- a/VirtualRobot/Robot.h +++ b/VirtualRobot/Robot.h @@ -26,6 +26,7 @@ #include "SceneObject.h" #include "Nodes/RobotNode.h" #include "Nodes/ConditionedLock.h" +#include "BoundingBox.h" #include <type_traits> #include <string> diff --git a/VirtualRobot/RobotFactory.cpp b/VirtualRobot/RobotFactory.cpp index 175c815cc..34e03e14e 100644 --- a/VirtualRobot/RobotFactory.cpp +++ b/VirtualRobot/RobotFactory.cpp @@ -9,6 +9,7 @@ #include "Nodes/RobotNodeFixedFactory.h" #include "CollisionDetection/CollisionModel.h" #include "EndEffector/EndEffector.h" +#include "Visualization/VisualizationNode.h" #include "Visualization//VisualizationFactory.h" #include "VirtualRobotException.h" diff --git a/VirtualRobot/SceneObject.cpp b/VirtualRobot/SceneObject.cpp index f7386decb..16c2fe396 100644 --- a/VirtualRobot/SceneObject.cpp +++ b/VirtualRobot/SceneObject.cpp @@ -4,6 +4,7 @@ #include "CollisionDetection/CollisionChecker.h" #include "Visualization/TriMeshModel.h" #include "Visualization/VisualizationFactory.h" +#include "Visualization/VisualizationNode.h" #include "Visualization/Visualization.h" #include "VirtualRobotException.h" #include "Robot.h" diff --git a/VirtualRobot/Tools/Gravity.cpp b/VirtualRobot/Tools/Gravity.cpp index 448b6afa7..4c43755f4 100644 --- a/VirtualRobot/Tools/Gravity.cpp +++ b/VirtualRobot/Tools/Gravity.cpp @@ -4,6 +4,7 @@ #include "../Nodes/RobotNodeRevolute.h" #include "../RobotNodeSet.h" #include "../Robot.h" +#include <VirtualRobot/MathTools.h> #include <Eigen/Geometry> diff --git a/VirtualRobot/Trajectory.cpp b/VirtualRobot/Trajectory.cpp index 8cf4dfc59..8ff0825c3 100644 --- a/VirtualRobot/Trajectory.cpp +++ b/VirtualRobot/Trajectory.cpp @@ -1,6 +1,7 @@ #include "Trajectory.h" #include "Robot.h" #include "VirtualRobotException.h" +#include <VirtualRobot/Visualization/VisualizationFactory.h> #include <iostream> #include <sstream> diff --git a/VirtualRobot/XML/BaseIO.cpp b/VirtualRobot/XML/BaseIO.cpp index b01e929d5..2c80d079a 100644 --- a/VirtualRobot/XML/BaseIO.cpp +++ b/VirtualRobot/XML/BaseIO.cpp @@ -13,6 +13,7 @@ #include "../Nodes/RobotNodeFixedFactory.h" #include "../Transformation/DHParameter.h" #include "../Visualization/VisualizationFactory.h" +#include "../Visualization/VisualizationNode.h" #include "rapidxml.hpp" #include <filesystem> diff --git a/VirtualRobot/XML/BaseIO.h b/VirtualRobot/XML/BaseIO.h index 91a67de5a..601eed223 100644 --- a/VirtualRobot/XML/BaseIO.h +++ b/VirtualRobot/XML/BaseIO.h @@ -26,6 +26,7 @@ #include "../Units.h" #include "../RobotConfig.h" #include "../Nodes/RobotNode.h" +#include "../Primitive.h" #include <string> #include <vector> diff --git a/VirtualRobot/XML/RobotIO.cpp b/VirtualRobot/XML/RobotIO.cpp index 37cf9a81b..ffd601195 100644 --- a/VirtualRobot/XML/RobotIO.cpp +++ b/VirtualRobot/XML/RobotIO.cpp @@ -12,6 +12,7 @@ #include "../Nodes/RobotNodePrismatic.h" #include "../Transformation/DHParameter.h" #include "../Visualization/VisualizationFactory.h" +#include "../Visualization/VisualizationNode.h" #include "../Visualization/TriMeshModel.h" #include "../RobotConfig.h" #include "../RuntimeEnvironment.h" diff --git a/VirtualRobot/XML/mujoco/RobotMjcf.cpp b/VirtualRobot/XML/mujoco/RobotMjcf.cpp index e25aee3e3..039a9e493 100644 --- a/VirtualRobot/XML/mujoco/RobotMjcf.cpp +++ b/VirtualRobot/XML/mujoco/RobotMjcf.cpp @@ -6,6 +6,7 @@ #include <VirtualRobot/Nodes/RobotNodePrismatic.h> #include <VirtualRobot/Nodes/RobotNodeRevolute.h> +#include <VirtualRobot/Visualization/VisualizationNode.h> #include "MeshConverter.h" -- GitLab