-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
g_code_logger #56
Closed
Closed
g_code_logger #56
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- this is the g_code logger class which has been moved from another project
- uppdate
- slight changes to the Logger Class
- the function for rounding decimals has been removed because it caused errors when running the G_Code - the ability to round decimals will be implemented in the G-Code Simplifier
For creating the full GCodeLogger Class current changes from the GCodeProcessor have been moved to the Logger branch.
- there has been an error accuring with the joint limits if they have been slightly out of bounds - therefore a joint limit ajduster has been implemented - the adjuster checks if there has been a joint position recorded higher than the limits of the joint
- moving GCodeLogger into src file
- changing the structure of the GCodeLogger - removing unused methods - changing methods to private
- full implementation of GCodeLogger Class, Demonstration & Test Class - this is the full version ready for a pull request
- changing the G1 entry for the Joint Position GCode
- leave robot_base unchanged
- undo changes robot_base
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request implements the
GCodeLogger
, which serves as the counterpart to theGCodeProcessor
, enabling the tracking of robot movement in G-Code format. The changes include the addition of theGCodeLogger
class and the demonstration methodg_code_logger_dem.py
. Additionally, the class has been thoroughly tested with thetest_g_code_logger.py
file.The
GCodeLogger
class holds two main functionalities:Logging G-Code: The class can monitor the current positions of the robot and track any changes noticed in the position. Documentation is provided with two different types of G-Codes, following the same style as in the
GCodeProcessor
. Theg_code_robot_view
tracks the position using Cartesian coordinates, while theg_code_joint_position
tracks the G-Code with the angle of the robot joints.Writing G-Code: The class is capable of writing the G-Code to a text file from the
g_code
variable. The method for writing G-Code follows the correct order of the elements in the G-Code.The demonstration method runs and tracks the robot-view and joint-position G-Code of an input G-Code. The tracked G-Codes are played in order to demonstrate usability. Furthermore, an alternative for tracking G-Code is presented at the end of the main method.
Motivation and Context
The motivation behind the
GCodeLogger
was to have a counterpart to theGCodeProcessor
, enabling the tracking of robot movement in the G-Code format. The classes are designed to work together seamlessly. With the addition of theGCodeLogger
, it becomes easier to apply simulation sequences in the real-world environment, as the created G-Code can be immediately utilized.How has this been tested?
Every method has been tested in the
test_g_code_logger.py
file. Thewrite_g_code
method writes pseudo G-Code to a temporary file and compares the output to the desired result. Theupdate_g_code
methods are tested by comparing the tracked G-Code to the position that the robot was moved to. To ensure proper comparison of positions, the tracked G-Code is rounded.Screenshots (if appropriate):
Types of changes
Checklist: