Conscience Core
CommandPathCutEntityDeplacements.h
Go to the documentation of this file.
1 #ifndef CommandPathCutEntityDeplacements_h
2 #define CommandPathCutEntityDeplacements_h
3 
4 #include "CommandCommons.h"
5 
7 
17 
19 
21 
23 
26 };
27 
40  PathSegmentCommandDataType *right) : left(left), right(right) {};
41 
42  ~SegmentMargins();
43 
46 };
47 
52 public:
53  inline static const CommandTypeId COMMAND_ID = "PATH_CUT_ENTITY_DEPLACEMENTS";
54 
61  CommandPathCutEntityDeplacements(vector<PathSegmentCommandDataType *> *paths);
63 
64 protected:
65  const double WIDTH_OFFSET_IN_CENTIMETER = 25;
66  const double LENGTH_END_OFFSET_FOR_PATH_IN_CENTIMETER = 40;
67  const double LENGTH_START_OFFSET_FOR_IN_CENTIMETER = 10;
68  const double LENGTH_OFFSET_FOR_TRANSITION_IN_CENTIMETER = 100;
69  const double MIN_DISTANCE_FOR_SAME_POINT_IN_CM = 2;
70  const double MAX_ANGLE_FOR_TRANSITION_IN_DEGREES = 20;
71 
73 
74  ptr<CscEntityReflexion> getEntityReflexion() const override;
75 
76  vector<PathSegmentCommandDataType *> *paths;
77  std::unique_ptr<CscLogger> logger = CscLogger::getForCategory("CommandPathCutEntityDeplacements");
78 
79  CscPoint3d *findIntersection(PathSegmentCommandDataType *pathA, PathSegmentCommandDataType *pathB);
80  SegmentMargins getOffsetPath(PathSegmentCommandDataType &path, double width, double extensionStart = 0, double extensionEnd = 0);
81 
82  vector<PathSegmentCommandDataType *> cutPathsWithOffset(const vector<PathSegmentCommandDataType *> &pathsToCut, PathSegmentCommandDataType *offsetLeft, PathSegmentCommandDataType *offsetRight);
83 
84  bool isBetweenPath(PathSegmentCommandDataType *segment, PathSegmentCommandDataType *leftBound, PathSegmentCommandDataType *rightBound, double maxDistance);
85  double signedAngleBetweenPaths(const PathSegmentCommandDataType *path1, const PathSegmentCommandDataType *path2);
86  double calculateAngleBetweenTwoPosition(CscPoint3d *firstPosition, CscPoint3d *secondPosition);
87 };
88 
91 COMMAND_REGISTER(CommandPathCutEntityDeplacements, vector<PathSegmentCommandDataType *> *)
93 
94 }
95 
96 #endif
conscience_core::bridging::commands::PathSegmentCommandDataType
Represents a path segment defined by two 3D points ( start and end ).
Definition: CommandPathCutEntityDeplacements.h:12
conscience_core::axiomes::CscPoint3d
The CscPoint3d class represents a point in three-dimensional space. It is primarily used to denote a ...
Definition: Csc3dTypes.h:24
CSC_DLL_IMPORTEXPORT
#define CSC_DLL_IMPORTEXPORT
Definition: os.h:34
conscience_core::bridging::commands::SegmentMargins
Represents a pair of segments offset to the left and right of a central segment.
Definition: CommandPathCutEntityDeplacements.h:37
conscience_core::bridging::commands::SegmentMargins::left
PathSegmentCommandDataType * left
Definition: CommandPathCutEntityDeplacements.h:44
conscience_core::bridging::commands::CommandTypeId
string CommandTypeId
Definition: Command.h:29
right
T2 right
Definition: unit-test.h:121
conscience_core::bridging::commands::CommandPathCutEntityDeplacements::paths
vector< PathSegmentCommandDataType * > * paths
Definition: CommandPathCutEntityDeplacements.h:76
conscience_core::bridging::commands::PathSegmentCommandDataType::start
CscPoint3d * start
Definition: CommandPathCutEntityDeplacements.h:24
conscience_utils::geom::calculateAngleBetweenTwoPosition
double calculateAngleBetweenTwoPosition(CscPoint3d *secondPosition, CscPoint3d *firstPosition)
Definition: geom.cpp:117
conscience_core::bridging::commands::SegmentMargins::right
PathSegmentCommandDataType * right
Definition: CommandPathCutEntityDeplacements.h:45
conscience_core::bridging::commands
Definition: cartographyCommands.cpp:4
COMMAND_RESULT_JSON_SERIALIZER
#define COMMAND_RESULT_JSON_SERIALIZER(TClass,...)
Definition: CommandExecutionResult.h:10
conscience_core::bridging::commands::CscCommand
Definition: Command.h:40
COMMAND_TYPE_BUILDER
#define COMMAND_TYPE_BUILDER(PREFIX, COMMAND_REGISTER_className,...)
Definition: CscCommandAutoParse.h:515
CscEnvironmentSimulator
Definition: CscEnvironmentSimulator.h:31
conscience_core::bridging::commands::CommandPathCutEntityDeplacements
Definition: CommandPathCutEntityDeplacements.h:51
conscience_core::bridging::commands::COMMAND_REGISTER
COMMAND_REGISTER(CommandFollowKinematicTrajectory, ptr< CscEntityReflexion >, int, const CscState *, string, string, string, string, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float)
CommandCommons.h
conscience_core::bridging::commands::SegmentMargins::SegmentMargins
SegmentMargins(PathSegmentCommandDataType *left, PathSegmentCommandDataType *right)
Definition: CommandPathCutEntityDeplacements.h:38
conscience_core::bridging::commands::logger
std::unique_ptr< CscLogger > logger
Definition: Command.cpp:7
conscience_core::bridging::commands::PathSegmentCommandDataType::end
CscPoint3d * end
Definition: CommandPathCutEntityDeplacements.h:25
conscience_core::bridging::commands::result::CscCommandExecutionResultList
Definition: CommandExecutionResult.h:118
ptr
std::shared_ptr< T > ptr
Definition: CscCommon.h:29