9 #ifndef BODY_SURFACE_SAMPLING_H
10 #define BODY_SURFACE_SAMPLING_H
13 #include "environment.h"
15 #include "API/Device/robot.hpp"
16 #include "API/Grids/PointCloud.hpp"
18 #include "CollisionPoint.hpp"
34 void computeStaticObjectsPointCloud();
35 void computeRobotBodiesPointCloud(
Robot* rob);
36 void computeAllRobotsBodiesPointCloud();
38 bool isPointInEnvironment(
const Eigen::Vector3d& point );
39 bool isPointOverGround(
const Eigen::Vector3d& point );
45 return *m_objectToPointCloudMap[o];
62 std::vector<CollisionPoint>& getCollisionPoints(
Joint* jnt)
64 return m_jointToCollisionPoint[jnt];
67 double getDefaultClearance() {
return m_collision_clearance_default; }
75 std::map<obj*,PointCloud*> m_objectToPointCloudMap;
78 std::vector<PointCloud*> m_robotsPoints;
80 std::map<obj*,BoundingCylinder*> m_objectToBoCylinderMap;
81 std::map<Joint*, std::vector<CollisionPoint> > m_jointToCollisionPoint;
83 double m_collision_clearance_default;
std::vector< CollisionPoint > generateRobotCollisionPoints(Robot *robot, const std::vector< int > &active_joints, const std::vector< int > &planner_joints)
Generate the collision points for links associated to the active joints It computes the parent joints...
Definition: BodySurfaceSampler.cpp:379
std::vector< CollisionPoint > generateAllRobotCollisionPoints(Robot *robot)
Generate the collision points for links associated to the active joints It computes the parent joints...
Definition: BodySurfaceSampler.cpp:351
void draw()
Draw the sampled points Sampled points are points on the surface of static obstacles collision points...
Definition: BodySurfaceSampler.cpp:414
void computeObjectPointCloud(obj *obj, PointCloud &pointCloud, bool isRobot=false)
Computes a point cloud for an object.
Definition: BodySurfaceSampler.cpp:55
Definition: CollisionPoint.hpp:22
This class holds a the robot represented by a kinematic chain.
Definition: robot.hpp:42
double generateRobotBoudingCylinder(Robot *rob, const std::vector< Joint * > &activeJoints)
returns the max radius
Definition: BodySurfaceSampler.cpp:233
std::vector< CollisionPoint > getLinksCollisionPoints(Joint *jnt, int segment_number, const std::vector< int > &parent_joints)
Generates the collision point for a given link Stores the segment number (the id of the joint for pla...
Definition: BodySurfaceSampler.cpp:262
This class holds a Joint and is associated with a Body (Link) It's the basic element of a kinematic c...
Definition: joint.hpp:27
std::vector< CollisionPoint > generateJointCollisionPoints(Robot *robot, int id, const std::vector< int > &active_joints, const std::vector< int > &planner_joints)
Computes the parent joints, the segment of the joint and generate the collision point for the joint s...
Definition: BodySurfaceSampler.cpp:311
! Vector of 3d points that can be ploted in the 3d viewer as cubes very fast ! the points are stored ...
Definition: PointCloud.hpp:15
void generateAllRobotsBoundingCylinders()
Computes collision points for all bodies.
Definition: BodySurfaceSampler.cpp:296
Definition: BodySurfaceSampler.hpp:27