Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
state_solver.h
Go to the documentation of this file.
1
26#ifndef TESSERACT_STATE_SOLVER_STATE_SOLVER_H
27#define TESSERACT_STATE_SOLVER_STATE_SOLVER_H
28
31#include <vector>
32#include <string>
33#include <memory>
34#include <unordered_map>
35#include <Eigen/Geometry>
36#include <Eigen/Core>
38
42
44{
46{
47public:
48 using Ptr = std::shared_ptr<StateSolver>;
49 using ConstPtr = std::shared_ptr<const StateSolver>;
50 using UPtr = std::unique_ptr<StateSolver>;
51 using ConstUPtr = std::unique_ptr<const StateSolver>;
52
53 StateSolver() = default;
54 virtual ~StateSolver() = default;
55 StateSolver(const StateSolver&) = default;
56 StateSolver& operator=(const StateSolver&) = default;
59
65 virtual StateSolver::UPtr clone() const = 0;
66
72 virtual void setState(const Eigen::Ref<const Eigen::VectorXd>& joint_values) = 0;
73
81 virtual void setState(const std::unordered_map<std::string, double>& joint_values) = 0;
82 virtual void setState(const std::vector<std::string>& joint_names,
83 const Eigen::Ref<const Eigen::VectorXd>& joint_values) = 0;
84
90 virtual SceneState getState(const Eigen::Ref<const Eigen::VectorXd>& joint_values) const = 0;
91
100 virtual SceneState getState(const std::unordered_map<std::string, double>& joint_values) const = 0;
101 virtual SceneState getState(const std::vector<std::string>& joint_names,
102 const Eigen::Ref<const Eigen::VectorXd>& joint_values) const = 0;
103
108 virtual SceneState getState() const = 0;
109
116 virtual Eigen::MatrixXd getJacobian(const Eigen::Ref<const Eigen::VectorXd>& joint_values,
117 const std::string& link_name) const = 0;
118
131 virtual Eigen::MatrixXd getJacobian(const std::unordered_map<std::string, double>& joint_values,
132 const std::string& link_name) const = 0;
133 virtual Eigen::MatrixXd getJacobian(const std::vector<std::string>& joint_names,
134 const Eigen::Ref<const Eigen::VectorXd>& joint_values,
135 const std::string& link_name) const = 0;
136
141 virtual SceneState getRandomState() const = 0;
142
147 virtual std::vector<std::string> getJointNames() const = 0;
148
153 virtual std::vector<std::string> getActiveJointNames() const = 0;
154
159 virtual std::string getBaseLinkName() const = 0;
160
165 virtual std::vector<std::string> getLinkNames() const = 0;
166
171 virtual std::vector<std::string> getActiveLinkNames() const = 0;
172
177 virtual std::vector<std::string> getStaticLinkNames() const = 0;
178
184 virtual bool isActiveLinkName(const std::string& link_name) const = 0;
185
191 virtual bool hasLinkName(const std::string& link_name) const = 0;
192
199
204 virtual Eigen::Isometry3d getLinkTransform(const std::string& link_name) const = 0;
205
212 virtual Eigen::Isometry3d getRelativeLinkTransform(const std::string& from_link_name,
213 const std::string& to_link_name) const = 0;
214
220};
221} // namespace tesseract_scene_graph
222
223#endif // TESSERACT_STATE_SOLVER_STATE_SOLVER_H
Definition: state_solver.h:46
virtual Eigen::MatrixXd getJacobian(const Eigen::Ref< const Eigen::VectorXd > &joint_values, const std::string &link_name) const =0
Get the jacobian of the solver given the joint values.
std::unique_ptr< StateSolver > UPtr
Definition: state_solver.h:50
virtual std::vector< std::string > getActiveJointNames() const =0
Get the vector of joint names which align with the limits.
std::shared_ptr< const StateSolver > ConstPtr
Definition: state_solver.h:49
virtual SceneState getRandomState() const =0
Get the random state of the environment.
std::unique_ptr< const StateSolver > ConstUPtr
Definition: state_solver.h:51
virtual void setState(const std::unordered_map< std::string, double > &joint_values)=0
Set the current state of the solver.
virtual Eigen::MatrixXd getJacobian(const std::unordered_map< std::string, double > &joint_values, const std::string &link_name) const =0
Get the jacobian of the scene for a given set or subset of joint values.
virtual std::vector< std::string > getJointNames() const =0
Get the vector of joint names.
std::shared_ptr< StateSolver > Ptr
Definition: state_solver.h:48
virtual bool hasLinkName(const std::string &link_name) const =0
Check if link name exists.
virtual SceneState getState(const std::unordered_map< std::string, double > &joint_values) const =0
Get the state of the scene for a given set or subset of joint values.
StateSolver(StateSolver &&)=default
virtual SceneState getState(const Eigen::Ref< const Eigen::VectorXd > &joint_values) const =0
Get the state of the solver given the joint values.
virtual SceneState getState() const =0
Get the current state of the scene.
virtual Eigen::MatrixXd getJacobian(const std::vector< std::string > &joint_names, const Eigen::Ref< const Eigen::VectorXd > &joint_values, const std::string &link_name) const =0
virtual void setState(const std::vector< std::string > &joint_names, const Eigen::Ref< const Eigen::VectorXd > &joint_values)=0
virtual SceneState getState(const std::vector< std::string > &joint_names, const Eigen::Ref< const Eigen::VectorXd > &joint_values) const =0
virtual tesseract_common::KinematicLimits getLimits() const =0
Getter for kinematic limits.
virtual Eigen::Isometry3d getLinkTransform(const std::string &link_name) const =0
Get the transform corresponding to the link.
virtual bool isActiveLinkName(const std::string &link_name) const =0
Check if link is an active link.
virtual std::vector< std::string > getLinkNames() const =0
Get the vector of link names.
virtual Eigen::Isometry3d getRelativeLinkTransform(const std::string &from_link_name, const std::string &to_link_name) const =0
Get transform between two links using the current state.
virtual std::string getBaseLinkName() const =0
Get the base link name.
StateSolver & operator=(StateSolver &&)=default
StateSolver & operator=(const StateSolver &)=default
virtual tesseract_common::VectorIsometry3d getLinkTransforms() const =0
Get all of the links transforms.
virtual std::vector< std::string > getActiveLinkNames() const =0
Get the vector of active link names.
virtual StateSolver::UPtr clone() const =0
This should clone the object so it may be used in a multi threaded application where each thread woul...
virtual void setState(const Eigen::Ref< const Eigen::VectorXd > &joint_values)=0
Set the current state of the solver.
virtual std::vector< std::string > getStaticLinkNames() const =0
Get a vector of static link names in the environment.
StateSolver(const StateSolver &)=default
A basic scene graph using boost.
Common Tesseract Macros.
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
Definition: macros.h:71
Definition: create_convex_hull.cpp:36
AlignedVector< Eigen::Isometry3d > VectorIsometry3d
Definition: types.h:62
Definition: graph.h:82
This holds a state of the scene.
Store kinematic limits.
Definition: kinematic_limits.h:39
This holds a state of the scene.
Definition: scene_state.h:54
Common Tesseract Types.
joint_state joint_names
Definition: tesseract_common_serialization_unit.cpp:75