fix rotary delta FK to be mirrored like the IK
[clinton/Smoothieware.git] / src / modules / robot / arm_solutions / RotaryDeltaSolution.h
1 #ifndef RotaryDeltaSolution_H
2 #define RotaryDeltaSolution_H
3 #include "libs/Module.h"
4 #include "BaseSolution.h"
5
6 class Config;
7
8 class RotaryDeltaSolution : public BaseSolution {
9 public:
10 RotaryDeltaSolution(Config*);
11 void cartesian_to_actuator(const float[], ActuatorCoordinates &) override;
12 void actuator_to_cartesian(const ActuatorCoordinates &, float[] ) override;
13
14 bool set_optional(const arm_options_t& options) override;
15 bool get_optional(arm_options_t& options, bool force_all) override;
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
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
31 float z_calc_offset;
32
33 struct {
34 bool debug_flag:1;
35 bool mirror_xy:1;
36 };
37 };
38 #endif // RotaryDeltaSolution_H