plcopen 0.22.0
载入中...
搜索中...
未找到
pose.h
浏览该文件的文档.
1#pragma once
2
3// Orientation batch (approved matrix: doc/compliance/orientation-semantics.md,
4// decision #2): the 6-DOF pose plugin contract, parallel to the v1
5// translational `Kinematics` ABI — the two consume different command
6// dimensions and are configured mutually exclusively on a group. Same
7// contract discipline as KB-037/KB-041: analytic solutions, seed-branch
8// selection with a no-branch-flip gate, singularity margins, no allocation,
9// no exceptions, bounded time.
10
11#include <cstddef>
12
13#include "rt/error.h"
14
15namespace plcopen::core::kin
16{
17
18struct Pose6
19{
20 double position[3] = {0.0, 0.0, 0.0};
21 // Row-major rotation matrix (must be orthonormal; callers own that).
22 double rotation[3][3] = {{1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}};
23};
24
26{
27public:
28 virtual ~PoseKinematics() = default;
29
30 virtual std::size_t joint_count() const = 0;
31
32 virtual void forward(const double *joints, Pose6 &pose) const = 0;
33
34 // Seed-branch semantics with the max_joint_step no-branch-flip gate
35 // (KB-041 contract carried over): no same-turn candidate inside the step
36 // bound reports `infeasible`, never an implicit branch flip.
37 virtual rt::ErrorCode inverse(const Pose6 &pose,
38 const double *seed,
39 double max_joint_step,
40 double *joints_out) const = 0;
41
42 virtual double singularity_margin(const double *joints) const = 0;
43};
44
45} // namespace plcopen::core::kin
virtual double singularity_margin(const double *joints) const =0
virtual void forward(const double *joints, Pose6 &pose) const =0
virtual std::size_t joint_count() const =0
virtual rt::ErrorCode inverse(const Pose6 &pose, const double *seed, double max_joint_step, double *joints_out) const =0