fix rotary delta FK to be mirrored like the IK
[clinton/Smoothieware.git] / src / modules / robot / arm_solutions / RotaryDeltaSolution.h
CommitLineData
11a39396
JM
1#ifndef RotaryDeltaSolution_H
2#define RotaryDeltaSolution_H
ae640576
DP
3#include "libs/Module.h"
4#include "BaseSolution.h"
5
6class Config;
7
11a39396 8class RotaryDeltaSolution : public BaseSolution {
ae640576 9 public:
11a39396 10 RotaryDeltaSolution(Config*);
807b9b57
JM
11 void cartesian_to_actuator(const float[], ActuatorCoordinates &) override;
12 void actuator_to_cartesian(const ActuatorCoordinates &, float[] ) override;
ae640576 13
807b9b57
JM
14 bool set_optional(const arm_options_t& options) override;
15 bool get_optional(arm_options_t& options, bool force_all) override;
ae640576
DP
16
17 private:
18 void init();
19 int delta_calcAngleYZ(float x0, float y0, float z0, float &theta);
20 int delta_calcForward(float theta1, float theta2, float theta3, float &x0, float &y0, float &z0);
21
17c8300c
DP
22 float delta_e; // End effector length
23 float delta_f; // Base length
24 float delta_re; // Carbon rod length
25 float delta_rf; // Servo horn length
26 float delta_z_offset ; // Distance from delta 8mm rod/pulley to table/bed
27 // NOTE: For OpenPnP, set the zero to be about 25mm above the bed
28
29 float delta_ee_offs; // Ball joint plane to bottom of end effector surface
30 float tool_offset; // Distance between end effector ball joint plane and tip of tool
ae640576 31 float z_calc_offset;
87bb0b79 32
93f20a8c
JM
33 struct {
34 bool debug_flag:1;
35 bool mirror_xy:1;
36 };
ae640576 37};
11a39396 38#endif // RotaryDeltaSolution_H