Skip to content
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

Update of the GCodeProcessor #54

Merged
merged 11 commits into from
May 6, 2024
Merged

Update of the GCodeProcessor #54

merged 11 commits into from
May 6, 2024

Conversation

philipp1604
Copy link
Collaborator

Description

The GCodeProcessor underwent two significant updates:

  1. The read_g_code method was modified to utilize an array of dictionaries for storing G-code, enhancing its structure for better manipulation.
  2. A new method, create_joint_movement_operations(), was implemented to enable efficient execution of joint movements within the class.

Motivation and Context

These changes aim to enhance the GCodeProcessor's functionality and flexibility. By restructuring the read_g_code method, the codebase's readability and maintainability are improved. Additionally, the implementation of create_joint_movement_operations() expands the class's capabilities, enabling it to handle joint movements effectively.

How has this been tested?

To validate the new changes, updates were made to test_g_code_processor.py. A series of tests, including a short sequence to verify joint positions retrieval and movement execution, were added. These tests cover various scenarios and edge cases, ensuring the reliability and correctness of the modifications. Testing was conducted locally and in continuous integration environments to verify consistent behavior across different setups and platforms.

Screenshots (if appropriate):

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • Adherence to the project's code style.
  • Documentation update if required.
  • Updated documentation accordingly.

philipp1604 and others added 11 commits November 30, 2023 18:27
- the GCode Processor was improved in many way
- usage of more dicionary methods
- g_code was changed to an array[dictionary] format
- this enables a better handling of the g_code inside and outside of the processor
- adjusting test method
- test class was adapted to dictionary format
- adding empty line
New GCodeProcessor Function:
- read_g_code method reads in every command, including unknown
- read_g_code method reads in joint_movement commands for example "G0 RA1=4.23 ..."
- Jointposition commands can be played

Test GCodeProcessor:
- Correction G54 Bug
- old changes were overwritten
- this is the correct version
- implementing g-code with Joint Positions into the test class
- a joint position call was added to the g_code_processor example code
Copy link

codecov bot commented Apr 15, 2024

Codecov Report

Attention: Patch coverage is 98.91304% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 87.26%. Comparing base (326e5f2) to head (48ca044).
Report is 18 commits behind head on main.

Files Patch % Lines
src/pybullet_industrial/g_code_processor.py 98.43% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #54      +/-   ##
==========================================
+ Coverage   86.66%   87.26%   +0.60%     
==========================================
  Files          15       15              
  Lines         930      966      +36     
==========================================
+ Hits          806      843      +37     
+ Misses        124      123       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@philipp1604
Copy link
Collaborator Author

@liquidcronos @MaHajo
This is the update of the current state of the GCodeProcessor. Kepp me update if this is ready to merge.

Best regards

Philipp

Copy link
Contributor

@MaHajo MaHajo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@philipp1604 philipp1604 merged commit 485b14e into main May 6, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants