1 #ifndef SEM_PLANPARTS_H
2 #define SEM_PLANPARTS_H
4 #include <jsoncpp/json/json.h>
6 #include "API/Device/robot.hpp"
8 #include "Sem_AgentType.hpp"
19 std::string toString()
const;
20 bool isDefined()
const {
return _value >=0;}
27 static std::vector<PlanningType> currentlyDefinedPlanningTypes();
30 static std::vector<std::string> __strs;
50 std::vector<int> getAllJointIds()
const;
51 std::vector<int> getJointsOfArmId(
int armId)
const;
69 void setJointsIndices(
const std::vector<int> &jointsIndices);
73 void setAgentType(
const AgentType &agentType);
75 const std::vector<int> &armIds()
const;
76 void setArmIds(
const std::vector<int> &armIds);
86 std::vector<int> _jointsIndices;
87 std::vector<int> _armIds;
100 bool importJsonFile(std::string path);
104 bool getJsonRoot(Json::Value &root,std::string &file_path);
106 bool readJsonAgent(Json::Value &root,
const std::string &file);
108 bool parsePlanPart(
AgentType agn_type, std::string
const &plan_type_str, Json::Value
const &joint_set_json);
113 void appendJointsSetToJson(Json::Value &planning_parts_dict,
const PlanningPart *jointsset);
117 void addPlanPart(
AgentType agent_type,
PlanningType plan_type, std::vector<int>
const & joints, std::vector<int>
const & arm_ids);
136 void setProactive(
bool proactive);
143 std::string _global_json_path;
144 std::map<AgentType, std::map<PlanningType,std::vector<PlanningPart *> > > _planParts;
149 #endif // SEM_PLANPARTS_H
const std::vector< int > & jointsIndices() const
jointsIndices
Definition: Sem_PlanParts.cpp:636
Definition: Sem_AgentType.hpp:12
Definition: Sem_PlanParts.hpp:35
This class holds a the robot represented by a kinematic chain.
Definition: robot.hpp:42
Definition: Sem_PlanParts.hpp:90
This file implements macros to help with the logging, in a way similar to ROS, using log4cxx...
Definition: Sem_PlanParts.hpp:13
bool proactive() const
proactive means that json data will be loaded on creation, otherwise it is read on getPlanPart() call...
Definition: Sem_PlanParts.cpp:413
static PlanningPart * createFromActiveJoints(PlanningType plan_type)
use active robot active joints to create a new joint set
Definition: Sem_PlanParts.cpp:533