1 #ifndef CONFGENERATOR_H
2 #define CONFGENERATOR_H
4 #include "API/Device/robot.hpp"
5 #include "planner/planner.hpp"
7 #include "utils/OtpUtils.hpp"
8 #include "utils/ConfGenerator.h"
10 #include "LightPlanner-pkg.h"
11 #include "planner/TrajectoryOptim/plannarTrajectorySmoothing.hpp"
12 #include "HRI_costspace/HRICS_Natural.hpp"
17 #include <Eigen/StdVector>
24 constrainedLink(
Robot* first, std::vector<std::vector<double> > matrixRot, std::vector<double> vectTrans);
26 void addRange(std::pair<
int,std::vector<std::pair<double,double> > > range);
31 std::vector<std::vector<double> > matrixRotation;
32 std::vector<double> vectTranslation;
34 std::map<int,std::vector<std::pair<double,double> > > rangeList;
61 void setRobot(
Robot* rob);
63 std::vector<Eigen::Vector3d> getOTPList(){
return m_OTPList;}
91 bool sortConfig(std::vector<HRICS::ConfigHR>& configList,
int nbNode,
bool isStanding,
bool isSlice,
HRICS::Natural* reachableSpace);
101 Eigen::Vector3d
setCurOTP( Eigen::Vector3d WSPoint);
141 std::vector<HRICS::ConfigHR>
loadFromXml(std::string filename);
152 bool generateConfiguration(
int nbConfs);
163 std::pair<confPtr_t,confPtr_t> setRobotsToConf(
const HRICS::ConfigHR& handover_conf);
168 std::vector<Eigen::Vector3d> m_OTPList;
173 std::vector<HRICS::ConfigHR> m_configList;
183 std::vector<constrainedLink> linkList;
184 std::map<std::string,constrainedLink> linkListFiltred;
187 #endif // CONFGENERATOR_H
Definition: ConfGenerator.h:20
bool initialize(std::string filename, HRICS::Natural *reachableSpace)
Initializes the list config generator.
Definition: ConfGenerator.cpp:43
bool computeRobotIkForGrabing(configPt &q)
Compute a configuration for hand-over.
Definition: ConfGenerator.cpp:54
bool sortConfig(std::vector< HRICS::ConfigHR > &configList, int nbNode, bool isStanding, bool isSlice, HRICS::Natural *reachableSpace)
load and return configs stored in filename
Definition: ConfGenerator.cpp:229
std::vector< HRICS::ConfigHR > addConfToList()
Adding the actual configuration to m_configList.
Definition: ConfGenerator.cpp:393
void saveToXml(std::string filename)
save what's in m_configList to the filename file.
Definition: ConfGenerator.cpp:441
std::vector< HRICS::ConfigHR > loadFromXml(std::string filename)
load and return configs stored in filename
Definition: ConfGenerator.cpp:481
Natural Motion and Arm Confort.
Definition: HRICS_Natural.hpp:33
bool computeHandoverConfigFromList(std::pair< confPtr_t, confPtr_t > &best_handover_conf, double &best_cost)
Compute a handover configuration by iterating through the set of configurations that has been pre-loa...
Definition: ConfGenerator.cpp:165
This class holds a the robot represented by a kinematic chain.
Definition: robot.hpp:42
void drawOTPList(bool value)
draw the OTP list
Definition: ConfGenerator.cpp:156
std::vector< HRICS::ConfigHR > getConfList()
return m_configList
Definition: ConfGenerator.cpp:136
void removeLastConf()
removing the last configuration of m_configList
Definition: ConfGenerator.cpp:429
void clearConfList()
Clear m_configList;.
Definition: ConfGenerator.cpp:435
bool placeRobot()
Compute GIK and place robot base.
Definition: ConfGenerator.cpp:330
void setHuman(Robot *human)
Setters.
Definition: ConfGenerator.cpp:33
Definition: OtpUtils.hpp:55
Eigen::Vector3d setCurOTP(Eigen::Vector3d WSPoint)
Change the current OTP.
Definition: ConfGenerator.cpp:141
void addToList(Eigen::Vector3d WSPoint)
Adding a 3D point to the OTP list This function is used when loading a set of OTPs in order to test t...
Definition: ConfGenerator.cpp:126
Definition: ConfGenerator.h:51
double getConfigCost(HRICS::Natural *reachableSpace)
compute the configuration cost
Definition: ConfGenerator.cpp:284