I reread my documentation about setting up a robot and its DH parameters last week and must confess - I had problems to understand what I wrote a month ago. Setting up is complex and one can get confused fast.
So I thought about to help creating robot parameters visually base with the help of a DWC plugin.
Here it is, the first version of a working version to display a 6 axis robot configuration, based on Denavit-Hartenberg parameters, as described in https://docs.duet3d.com/User_manual/Machine_configuration/Configuring_Robot_DH_parameters
The plugin runs in DWC 3.4.0 and I tested it on Mini 5+.
The plugin is stored in github at https://github.com/JoergS5/RobotViewer, the downloadable and directly installable plugin is in the dist subdirectory.
After installation, a refresh in DWC was needed, then it was added to the Job folder:
On the right is a visual representation of the robot:
The robot can be turned and zoomed.
The buttons are:
- my PC is slow, so freeze allows to freeze the screen, so GPU is near 0%
- Gitter show or hides the coordination gitter
- Coords shows or hides the three axis coordinate system in the order of RGB: red X axis, green Y axis, blue Z axis. Rotations or prismatic movement is always around the Z axis (blue one)
- Axes show or hide white tubes representing the axes. For prismatic joints, the visualizations needs improvement
- Arms shows or hides the arms
- Angles: change angles for the 6 joints
- DH show or hide DH parameters: type rotary/prismatic, A0 is the base, DH1 to DH6 are the DH parameters, Tool ist tool XYZ
- Gui is currently only to change the screen size of the main screen
The first version has its weaknesses, I am still learning the used javascript libraries. I plan to improve the following points:
- save and load to 0:/sys/robot.g the parameters and settings, so they can be included as macros into config.g to set robot properties
- visualize min/max/home angles (rotational) or mm (prismatic) joints
- full screen mode like G Code Viewer
- tool offset better visualization
- flexible number of joints (between 2 axis to 7 axis)
A bit more in the future is:
- animate G1 moves
- animate an imported G-Code file
- verify inverse kinematics of the main firmware by asking and visualizing the segments
- visualization of the workspace and singularities