6 #ifndef FLEXIV_RDK_MODEL_HPP_
7 #define FLEXIV_RDK_MODEL_HPP_
10 #include <Eigen/Eigen>
13 namespace flexiv::rdk {
41 std::map<JointGroup, std::vector<double>>
solved_q = {};
61 const Eigen::Vector3d& gravity_vector = Eigen::Vector3d(0.0, 0.0, -9.81));
98 void Update(
const std::vector<double>& full_q,
const std::vector<double>& full_dq);
111 Eigen::MatrixXd
dJ(
const std::string& link_name);
155 Eigen::MatrixXd
J(
const std::string& link_name);
166 Eigen::Isometry3d
T(
const std::string& link_name);
182 void SyncURDF(
const std::string& template_urdf_path);
249 std::unique_ptr<Impl> pimpl_;
Interface to obtain certain model data of the robot, including kinematics and dynamics.
size_t SyncKinematicsYAML(const std::string &template_yaml_path)
[Blocking] Sync the actual kinematic parameters of the connected robot into the template YAML file.
Eigen::MatrixXd J(const std::string &link_name)
[Non-blocking] Compute the Jacobian matrix at the specified frame w.r.t. world frame.
IKResult SolveConstrainedIK(const std::map< JointGroup, IKParams > &ik_params_by_group)
[Blocking] Solve constrained IK using one or more active joint groups.
std::vector< std::string > link_names() const
[Non-blocking] Names of all links in the robot model.
std::vector< std::string > joint_names() const
[Non-blocking] Names of all actuated joints in the robot model.
Model(const Robot &robot, const Eigen::Vector3d &gravity_vector=Eigen::Vector3d(0.0, 0.0, -9.81))
[Non-blocking] Instantiate the robot model interface.
std::map< JointGroup, std::vector< Eigen::Vector3d > > multi_contact_positions() const
[Non-blocking] Estimated multi-contact positions on each link of applicable joint groups,...
Eigen::VectorXd c()
[Non-blocking] Compute the Coriolis force vector in generalized coordinates, i.e. joint space.
Eigen::MatrixXd dJ(const std::string &link_name)
[Non-blocking] Compute the time derivative of Jacobian matrix at the specified frame w....
void Reload()
[Blocking] Reload (refresh) parameters of the robot model stored locally in this class using the late...
Eigen::Isometry3d T(const std::string &link_name)
[Non-blocking] Compute the transformation matrix of the specified frame w.r.t. world frame.
Eigen::VectorXd g()
[Non-blocking] Compute the gravity force vector in generalized coordinates, i.e. joint space.
void Update(const std::vector< double > &full_q, const std::vector< double > &full_dq)
[Non-blocking] Update the configuration (posture) of the locally-stored robot model so that the local...
std::map< JointGroup, std::pair< double, double > > configuration_score() const
[Blocking] Score of each joint group's current configuration (posture), calculated from the manipulab...
Eigen::MatrixXd M()
[Non-blocking] Compute the mass matrix in generalized coordinates, i.e. joint space.
std::map< JointGroup, std::vector< Eigen::Vector3d > > multi_contact_forces() const
[Non-blocking] Estimated multi-contact forces applied on each link of applicable joint groups,...
void SyncURDF(const std::string &template_urdf_path)
[Blocking] Sync the actual kinematic parameters of the connected robot into the template URDF file.
Eigen::MatrixXd C()
[Non-blocking] Compute the Coriolis/centripetal matrix in generalized coordinates,...
Main interface to control the robot, containing several function categories and background services.
Per-joint-group IK input parameters for SolveConstrainedIK().
std::vector< double > seed_q
std::array< double, kPoseSize > cartesian_pose
Result from SolveConstrainedIK().
std::map< JointGroup, std::vector< double > > solved_q