Robotic kinematics
-
@3dpotter the M669 is like:
in your case R2:
M669 K13 X20.0:5.0 Y0.0:10.0 Z50.0 L300.0:400.0:0.0:0.0 R2 P0 C0
and adding the A parameter with a lot of parameters. A must have 15 values, dummy values for axis 4 and 5 also. The A is necessary to tell the firmware where the endstop angles are.
-
@joergs5 I have the configuration setup and here is a video of the axis moving and how "+" and "-" effect each in cartesian mode (without m669 set up). and the attached photo is the measured lengths of each section from from the center of the joints. Additionally i have the board flashed to 3.0 and still need the 3.1 binary, all I saw in your last post was official releases/beta I'm not sure if your firmware is different. config (14).g ------------- https://youtu.be/WrY0Ke8HtMY
-
@3dpotter please update your binary other files to 3.1, please see my next post how to proceed.
One thing I don't understand is how your robot manages to keep the hotend part horizontal without a fourth stepper. Is it a mechanical solution? (Parallelogram?)
When using the robot firmware, M92 will need other values than you used in your config, please check https://duet3d.dozuki.com/Wiki/Configuring_RepRapFirmware_for_a_FiveAxisRobot?revisionid=HEAD#Section_Other_config_parameters , the values are based on degrees instead of mm.
-
@3dpotter I've compiled the firmware for Duet 2 and Duet 3 now, and uploaded them to a new github repository:
https://github.com/JoergS5/RepRapFirmware_Robot_binaries
They are based on the sources of tagged releases 3.1.0
Install the 3.1.0 file Duet2and3Firmware-3.1.0.zip (this contains many files which are necessary, additionally to the bin) from https://github.com/Duet3D/RepRapFirmware/releases/tag/3.1.0 first, then the bin of my repository for Duet 2.
-
@joergs5 Thankyou I Have flashed your firmware now. I know about changing the M92 to steps per degree, I just haven't set that up yet. In the process of doing that right now.
-
@3dpotter please don't be surprised if something doesn't work correctly. I tested the kinematics with simulated calculations, but I don't have a R2 mode based robot, so something may not work. I'll fix any bugs however fast, if you tell me problems.
-
@3dpotter
Hello! how does the little robot work? can it be configured with five axis robot? -
@tony73 Haven't had time to get it fully configured, working on it today and I will update you.
-
@tony73 @JoergS5 I got everything set up and working accept the m669 command. I read the documentation and am unsure that I need to do and what the values mean for my specific machine. here is a copy of the config. config (15).g
-
@3dpotter the config looks ok, only the angle settings parameter A are missing in M669:
If you start the Duet, it needs to know where the homing*) positions are located. This task is done by the endstops and the information in config.g file and the homeall.g file:
- endstops trigger when homing location is reached for a specific axis (for robots, it is a specific angle of the arm, actuator, stepper position)
- config tells in parameter A of M669 which angle the robot arm has when the endstop triggers. Parameter A specifies min, endstop and max angles for every axis, 5 axes with optional rail, 15 values.
- homeall.g are commands to move the axes so the enstops are triggered. Please see example homeall.g files for CoreXY or other 3D printers how this is done (G1 moves with H1, H2 etc.)
*) homing means: when the Duet starts, it doesn't know where your arms and stepper positions are located. The homing procedure finds out by rotating the arms until the endstops are triggered. Together with the angle information in parameter A of M669 the controller then knows when the arm triggers at the endstop, that the arm has angle 34 degree at the endstop position (as example). Together with the M92 information Duet knows how much to move the stepper to change by x degrees.
To decide how to make the homing is one of the most difficult parts.
If you tell me where your endstops are located, we can discuss which value to set for the angles. You can describe by making images of the 3 actuators (axis 1 is the rotation horizontally, 2 and 3 the arms) and paint the locations of the endstops into the image.
The M208 settings in config.g are ignored in the robot kinematics, because the original meaning of M208 is to restrict the print area to a xyz area. A robot has a print area which looks a bit like a donut, so it doesn't fit this original idea of a cubic print area. So I calculate the print area in the code directly to decide whether a coordinate is reachable by the robot arms.
If you don't understand M669, please tell me which parameter is unclear for you.
For the A parameter of M669, please check documentation. The example
Default is A-45:0:45:0:0:70:-70:0:0:-170:-90:0:-225:0:225[:0:0:1000]
means: -45 and 45 are the min and max angles of axis 1. The second parameter is important for the homing of axis 1 and means when endstops triggers, Duet sets the axis 1 position to 0 degree. And so on. I programmed so that 15 or 18 parameters must be set (without or with rail). Even if you have only 3 actuators with 9 settings, you need to spedify 15 parameters (the last 6 ones dummy values). I'll change that in a future release. -
@joergs5 said in Robotic kinematics:
where your endstops are located, we can discuss which value to set for the angles. You can describe by making images of the 3
I started to set up the axis angle limits and homing offset for the arm. as shown in the first video the axis seem to be moving incorrectly. The second video explains where the endstops are located and how the machine triggers them.
-
@3dpotter let's first discuss that your actuators are not X,Y,Z world coordinates, but axis 1,2,3, and to verify that your 3 actuators are rotating correctly:
Please test Axis 1 with
G1 H2 X10
H2 means to move the first axis individually.Same with axis 2 and 3 with G1 H2 Y10 and G1 H2 Z10.
Please be aware that G1 H2 commands ignore the endstops, so you can run them with impossible angles.
You can verify that the axes are rotating in the correct direction. Please see documentation: https://duet3d.dozuki.com/Wiki/Configuring_RepRapFirmware_for_a_FiveAxisRobot?revisionid=HEAD#Section_Construction
- axis 1 positive is counterclockwise
- axis 2 and 3: rotating upwards is positive
If you later say G1 X10, this has a different meaning: it means to rotate all 3 axes so that the world coordinate X changes by10.
I've explained the difference of X as axis 1 and X as world coordinate in
https://forum.duet3d.com/topic/17222/duet3d-3-custom-delta-printer-inconsistant-motor-problems/14
In respect to algorithms, robot kinematics is similar to a delta: the actuators are connected by trigonometric functions and result in X, Y, Z world (cartesian) coordinates.If the rotation of a stepper is incorrectly, you can change it in the config by changing:
M569 P0 S0
to
M569 P0 S1
or other round for the S0/S1 values. P0 is axis1, P1 is axis 2, P2 is axis 3. -
@3dpotter the next thing to check is when your endstop are triggering:
- axis 1 often triggers if the robot looks straight to the direction of the nozzle/gripper, which would be 0 degree
- axis 2 would be 0 degree if the axis 2 arm is horizontally
- axis 3 like axis 2
But please check first that the steppers are rotating in the correct directions and the rotation degrees are correct: if you say G1 H2 10, it should rotate 10 degree counterclockwise, e.g. If not, config must be changed. I often take an easy to recognize rotation like 90 degree to check the setting, but the arms must have enough space to make this rotation.
-
@3dpotter
Hello! how does the configuration on the robot proceed? I am building a 5-axis robot, but the work is slow! if you have time to write how it goes with yours, it will be of great help! -
This post is deleted! -
This post is deleted! -
I remember that I have a separate thread about building the prototype. I move the posts there, and this thread is for firmware topics.
The prototype description is here: https://forum.duet3d.com/topic/20209/robot-type-1-45-cm-belt-gear-direct-drive-r0
-
I have thought about the further development of the robot:
- the 5 axis robot is a special case of a 6 axis robot, the 4th axis being fixed
- build a 6 axis robot, which includes special work modes like 5 axes and a vertical hotend
I'll let the 5 axis robot code exist until I have calculated the 6 axis robot and built a prototype. For the 6 axis robot's 4 th axis, the rotating arm, I'll try the idea https://www.youtube.com/watch?v=2YC-0C8oPUo which is based on an expired patent https://patents.google.com/patent/US5954611
In the long run, I'll try to DIY harmonic drives. -
I've thought about how to design the kinematics for the 6 axis robot. Developing the firmware, I want to follow the following ideas. If someone doesn't agree or has additional main topics, please tell me:
- following the Denavit-Hartenberg (DH) transformation https://en.wikipedia.org/wiki/Robotics_conventions#Denavit–Hartenberg_line_coordinates and the DH parameters: https://en.wikipedia.org/wiki/Denavit–Hartenberg_parameters
- the DH parameters are set directly with M669 parameters
- implement kinematics, inverse kinematics, speed and accel calculations
- to calculate inverse kinematics, store current workmodes of the arms and stay when possible inside it
- possibility to set the robot into classical 3d printing mode (5 axis robot mode): 4th axis 0 degree always, 5 th axis such that 5th arm is vertical, 6th axis and arm rotates horizontal, so the hotend is vertical always
- collision detection and avoidance
- simulation to check whether the planned object is creatable with given constraints
- homing, calibration, measure accuracy and precision proposals
- in a later release railed version and bending corrections
-
@joergs5
bye! it's been a long time since I let myself be heard! I would like to know if you are continuing the robot arm project, I have had many commitments, but now that it is better I would like to continue building a prototype!