3 #ifndef SE2EZ_CORE_ROBOT_ 4 #define SE2EZ_CORE_ROBOT_ 7 #include <unordered_map> 11 #include <kdl/tree.hpp> 12 #include <kdl/treejnttojacsolver.hpp> 53 Eigen::Isometry2d pose{Eigen::Isometry2d::Identity()};
64 FrameMap(
const Robot &robot);
72 FrameMap(
const FrameMap &) =
delete;
73 FrameMap(FrameMap &&) =
delete;
87 void insert(FrameMapPtr other);
155 FrameData(
const FrameData &) =
delete;
156 FrameData(FrameData &&) =
delete;
168 Eigen::Ref<Eigen::VectorXd> getValues(Eigen::Ref<Eigen::VectorXd> data)
const;
175 const Eigen::Ref<const Eigen::VectorXd>
176 getValuesConst(
const Eigen::Ref<const Eigen::VectorXd> &data)
const;
184 unsigned int depth{0};
186 unsigned int index{0};
187 unsigned int size{0};
211 void attachFrame(
const FramePtr &frame);
231 void detachFrame(
const FramePtr &frame);
250 void addActiveRobot(
const RobotPtr &arobot);
269 void fk(
const Eigen::Ref<const Eigen::VectorXd> &q, FrameMapPtr frames)
const;
279 const Eigen::Ref<const Eigen::VectorXd> &q, FrameMapPtr frames)
const;
287 const Eigen::Ref<const Eigen::VectorXd> &q,
288 FrameMapPtr frames)
const;
296 Eigen::Ref<Eigen::VectorXd> getFrameValues(
const std::string &frame_name,
297 Eigen::Ref<Eigen::VectorXd> q)
const;
305 const Eigen::Ref<const Eigen::VectorXd>
306 getFrameValuesConst(
const std::string &frame_name,
const Eigen::Ref<const Eigen::VectorXd> &q)
const;
314 double distance(
const StatePtr &a,
const StatePtr &b,
bool weighted =
true)
const;
319 void enforceLimits(
StatePtr a)
const;
325 bool inLimits(
const StatePtr &a)
const;
342 unsigned int getNumJoints()
const;
425 void setACM(
const ACMPtr &acm);
430 const Eigen::VectorXd getUpperLimits()
const;
435 const Eigen::VectorXd getLowerLimits()
const;
450 const KDL::Tree &getTree()
const;
526 void generateSignature();
541 FrameMapPtr frames)
const;
570 bool tree_update_{
true};
576 FrameMapPtr static_{
nullptr};
Eigen::VectorXd upper_
Upper limits of joints.
A shared pointer wrapper for se2ez::State.
All associated data with a frame in a kinematic tree.
tf::EigenHash< std::string, Value > frames
Map of frame name to dirty / transform pairs.
A shared pointer wrapper for se2ez::Robot::FrameData.
unsigned int maxDepth_
Maximum tree depth.
A shared pointer wrapper for se2ez::Frame.
Map of frame name to a pair of that describes if the transform is "dirty" (needs updating) and its cu...
A representation of a robot (in this case, a kinematic tree in the plane).
KDL::Tree tree_
Underlying tree representation.
std::string signature_
A string that represents the current kinematic chain.
#define SE2EZ_EIGEN_CLASS
std::vector< std::string > ees_
End-effectors (leaves) in the kinematic tree that are mobile.
A tuple that stores whether a transform is dirty (needs to be updated), the transform itself...
std::map< std::string, StatePtr > named_
Named states.
Eigen::VectorXd lower_
Lower limits of joints.
A shared pointer wrapper for se2ez::ACM.
A shared pointer wrapper for se2ez::Robot.
std::vector< std::string > names_
Names of the the kinematic tree frames (ordered).
ACMPtr acm_
Default robot ACM.
std::map< std::string, FrameDataPtr > data_
Kinematic tree data for all frames.
std::vector< std::pair< std::string, FrameDataPtr > > joints_
Ordered vector of active joints.
#define SE2EZ_CLASS_FORWARD(C)