-
Notifications
You must be signed in to change notification settings - Fork 5
/
HRM3DAblation.h
73 lines (59 loc) · 2.65 KB
/
HRM3DAblation.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/** \author Sipu Ruan */
#pragma once
#include "HRM3D.h"
#include "ProbHRM3D.h"
namespace hrm {
namespace planners {
/** \class HRM3DAblation
* \brief Ablated version of HRM3D. The "bridge C-slice" subroutine is
* substituted by interpolation and collision detection */
template <class Planner>
class HRM3DAblation : public Planner {
public:
/** \brief Constructor for rigid-body robot
* \param robot MultibodyTree type defining the robot
* \param arena vector of geometric types definint the planning arena
* \param obs vector of geometric types defining obstacles
* \param req PlanningRequest structure */
HRM3DAblation(const MultiBodyTree3D& robot,
const std::vector<SuperQuadrics>& arena,
const std::vector<SuperQuadrics>& obs,
const PlanningRequest& req);
/** \brief Constructor for articulated robot
* \param robot MultibodyTree type defining the robot
* \param urdfFile robot URDF file
* \param arena vector of geometric types definint the planning arena
* \param obs vector of geometric types defining obstacles
* \param req PlanningRequest structure */
HRM3DAblation(const MultiBodyTree3D& robot, const std::string urdfFile,
const std::vector<SuperQuadrics>& arena,
const std::vector<SuperQuadrics>& obs,
const PlanningRequest& req);
~HRM3DAblation() override;
protected:
/** \brief Check whether connection between v1 and v2 is valid through
* interpolation and explicit collision detection
* \param v1 The starting vertex
* \param v2 The goal vertex
* \return true if transition is valid, false otherwise */
bool isMultiSliceTransitionFree(const std::vector<Coordinate>& v1,
const std::vector<Coordinate>& v2) override;
/** \brief Clear any stored bridge C-slice information */
void bridgeSlice() override;
/** \brief Clear any computed TFE
* \param v1 Start orientation of the robot
* \param v2 Goal orientation of the robot
* \param tfe Resulting cleared vector of TFE */
void computeTFE(const Eigen::Quaterniond& v1, const Eigen::Quaterniond& v2,
std::vector<SuperQuadrics>& tfe) override;
/** \brief Setup FCL collision objects for geometric models */
void setCollisionObject();
protected:
/** \param FCL collision object for robot */
std::vector<fcl::CollisionObject<double>> objRobot_;
/** \param FCL collision object for obstacles */
std::vector<fcl::CollisionObject<double>> objObs_;
};
} // namespace planners
} // namespace hrm
#include "HRM3DAblation-inl.h"