1 #ifndef GEOMETRICTOOLS_HPP
2 #define GEOMETRICTOOLS_HPP
5 #include "API/Device/robot.hpp"
18 p3d_point getRandomPointInTriangle(p3d_point A, p3d_point B, p3d_point C);
50 double compute_triangle_area_x_y2(p3d_point a, p3d_point b, p3d_point c);
58 bool point_in_rect2(p3d_point a, p3d_point b, p3d_point c, p3d_point d, p3d_point x);
84 p3d_point x5, p3d_point x6, p3d_point x7, p3d_point x8,
85 p3d_point y1,p3d_point y2, p3d_point y3, p3d_point y4,
86 p3d_point y5, p3d_point y6, p3d_point y7, p3d_point y8);
96 p3d_point e, p3d_point f, p3d_point g, p3d_point h,
107 std::vector<p3d_point>
getRandomPointsInHexahedron(
double nbPoints, p3d_point a, p3d_point b, p3d_point c, p3d_point d, p3d_point e, p3d_point f, p3d_point g, p3d_point h);
109 p3d_point getClosestBBPointFromPoint(
Robot* e, p3d_point s);
116 double distConfs(confPtr_t q1, confPtr_t q2);
121 std::vector<p3d_point>
getSampled(std::vector<p3d_point> vp,
double sampleRate);
127 double computeCost(std::vector<p3d_point> vHP, std::vector<p3d_point> vp,
double angleWeight,
double distHWeight,
double distWeight);
134 std::vector<p3d_point>
smoothTraj(std::vector<p3d_point> origTraj, std::vector<p3d_point> vHP,
Robot *r,
int nbIterMax,
double gainLim,
double trajDistWeight,
double distToHWeight,
double angleWeight);
144 #endif // GEOMETRICTOOLS_HPP
bool hexahedron_in_hexahedron(p3d_point x1, p3d_point x2, p3d_point x3, p3d_point x4, p3d_point x5, p3d_point x6, p3d_point x7, p3d_point x8, p3d_point y1, p3d_point y2, p3d_point y3, p3d_point y4, p3d_point y5, p3d_point y6, p3d_point y7, p3d_point y8)
test if four points of hexahedron y are in hexahedron x
Definition: geometricComputations.cpp:349
std::vector< p3d_point > getLowerPointsInObject(Robot *obj, double steepness)
get lower BB points of the object
Definition: geometricComputations.cpp:51
double distConfs(confPtr_t q1, confPtr_t q2)
The euclidian distance between 2 confs.
Definition: geometricComputations.cpp:458
double compute_pyramid_area(p3d_point a, p3d_point b, p3d_point c, p3d_point d, p3d_point h)
a-—b | .h | c-—d b and c should be opposite
Definition: geometricComputations.cpp:295
p3d_point getRandomPointInRectangle(p3d_point A, p3d_point B, p3d_point C, p3d_point D)
a-—b | | c-—d .p b and c should be opposite
Definition: geometricComputations.cpp:41
double distBetweenPoints(p3d_point a, p3d_point b)
Definition: geometricComputations.cpp:264
double computeCost(std::vector< p3d_point > vHP, std::vector< p3d_point > vp, double angleWeight, double distHWeight, double distWeight)
vHP is the list of human positions (z is the orientation) and vp is the list of points to asses (can ...
Definition: geometricComputations.cpp:593
p3d_point getBotomCenterOfObj(Robot *obje, double threshhold)
Definition: geometricComputations.cpp:186
bool point_in_segment2d(p3d_point a, p3d_point b, p3d_point x)
a-—b .x
Definition: geometricComputations.cpp:258
p3d_point getCenterOfObj(Robot *obje)
Definition: geometricComputations.cpp:174
std::vector< p3d_point > getRandomPointsInHexahedron(double nbPoints, p3d_point a, p3d_point b, p3d_point c, p3d_point d, p3d_point e, p3d_point f, p3d_point g, p3d_point h)
b-—d / /| a-f–c h |/ |/ e-—g b and c should be opposite
Definition: geometricComputations.cpp:384
Definition: geometricComputations.hpp:12
This class holds a the robot represented by a kinematic chain.
Definition: robot.hpp:42
This file implements macros to help with the logging, in a way similar to ROS, using log4cxx...
std::vector< p3d_point > getUpperPointsInObject(Robot *obj, double steepness)
get higher BB points of the object
Definition: geometricComputations.cpp:102
double distBetweenPoints2D(p3d_point a, p3d_point b)
Definition: geometricComputations.cpp:283
std::vector< p3d_point > getSampled(std::vector< p3d_point > vp, double sampleRate)
sample more finely a list of points
Definition: geometricComputations.cpp:562
bool point_in_rect2(p3d_point a, p3d_point b, p3d_point c, p3d_point d, p3d_point x)
a-—b | | c-—d .x b and c should be opposite
Definition: geometricComputations.cpp:219
std::vector< p3d_point > smoothTraj(std::vector< p3d_point > origTraj, std::vector< p3d_point > vHP, Robot *r, int nbIterMax, double gainLim, double trajDistWeight, double distToHWeight, double angleWeight)
vHP is the list of human positions (z is the orientation) and origTraj is the list of points to smoot...
Definition: geometricComputations.cpp:640
bool point_in_hexahedron(p3d_point a, p3d_point b, p3d_point c, p3d_point d, p3d_point e, p3d_point f, p3d_point g, p3d_point h, p3d_point x)
c-—d /| /| a-—b h |/g |/ e-—f .x b and c should be opposite
Definition: geometricComputations.cpp:325
double distBetweenMatrix4(p3d_matrix4 a, p3d_matrix4 b)
distance between the points in the p3d_matrix4
Definition: geometricComputations.cpp:269