RobotViewer DWC plugin
-
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
-
-
-
-
@joergs5 there is a new version 3.4.0.2 now with the following new capabilities:
- pie and bar charts at the axes to visualize min and max angles / lenghts (there is currently a bug in axis 3 of 6 axis robot, the angle 0 position is wrong)
- starting animation with random movement
- configuration in one field as G-Code commands, which can be used in config.g
- documentation page https://docs.duet3d.com/en/User_manual/Machine_configuration/RobotViewer_DWC_plugin
I'll provide an installable zip plugin file in the dist subdirectory, but it's also possible to run locally without DWC, please see the documentation.
I have to proceed with firmware robot kinematics now and will come back in a few weeks for the following topics
- load and save config in robot.g
- "split chain" support for Open5x
- fullscreen mode
- animate G1, connection to firmware to get inverse kinematics information to visualize segments and tool rotations for checking singularities e.g.
- maybe it's necessary to split kinematics into an object path and an endpoint path, so I'll enhance the Viewer to design such configurations. Same for closed chain kinematics (like parallel scara)
zip file 3.4.0.2 will be in: https://github.com/JoergS5/RobotViewer/tree/main/dist
and the files needed for local installation are in https://github.com/JoergS5/RobotViewer/tree/main/src
For DWC installation, only the zip file is needed. -