-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add more tests #9
Merged
Merged
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
They belong to #b22fa1d
Also use `MultiThreadedExecutor` for the subscribing nodes. The normal `spin()` lead to `ValueError: generator already executing in ROS2 framework` errors when having them in the same test case.
This should reduce boilerplate code when testing each service interface.
We now have a cleaner separation between topics, services, and actions.
Also use a single fixture `running_driver` for testing topics, services, and actions. This avoids brittle sleeps and makes sure that everything is up and running before starting the actual tests. The `test_startup.py` became obsolete with this.
Also add a function to set control bits in the dummy. This avoids a lot of boilerplate code in tests.
stefanscherzinger
force-pushed
the
add-more-tests
branch
from
August 9, 2024 05:39
ccbe50c
to
d318402
Compare
Reporting the `success` bool flag is like an in-official convention. There's no need for repeating the service's name.
In ROS2, the gripper has a single IP address at startup. This service seems irrelevant for these driver's use cases and adds complexity that's difficult to test and maintain. We get it back once we really need this. The driver _does_ reconnect automatically when the connection drops, but it does it without assuming another IP.
The terminal log output was not easily accessible from client code. We now return the collected information in a result string.
Correct sections that mentioned the `reconnect` and the `gripper_info` services.
Also simplify further action tests with a client wrapper.
This is easier to implement and test with the dummy.
We now return the actual data, not the metadata. Also, we now interpret target position and target speed in the plc commands as unsigned integers (position in um, speed in um/s) as stated in the gripper's TCP/IP manual. Only the data in `self.data` need to be stored and returned as floats. Check this manual for further details: [1]: https://stb.cloud.schunk.com/media/IM0046706.PDF
Also: - Fix the `MotionProfile`s finish condition. - Make tests for absolute positioning more watertight. Running several moves in a row was crucial in spotting the erroneous finish condition. - Remove specific timeouts in the ROS2 action tests. It's more robust this way. If they fail, the CI fails with a reason. - Make sure that the driver resets relevant status bits from previous requests.
The _EGU_ and _EGK_ versions differ in the action goal type. Let's see if we can mimic both at some point.
Also drop setting the failure-related status bits 11 and 16. We'll implement them later in the dummy once we properly test them in our `test_actions.py`.
stefanscherzinger
force-pushed
the
add-more-tests
branch
4 times, most recently
from
August 26, 2024 08:06
ae11ee5
to
3cf9578
Compare
Also upgrade the `actions/checkout` version.
stefanscherzinger
force-pushed
the
add-more-tests
branch
from
August 26, 2024 10:53
3cf9578
to
867751c
Compare
This makes them more robust against these unnecessary CI failures: `assert 76.9995346069336 == 77.0 ± 7.7e-05`
stefanscherzinger
force-pushed
the
add-more-tests
branch
from
August 26, 2024 11:52
07d0007
to
2355856
Compare
Also add meaningful values for `max_grip_force`, `min_grip_force`, `max_vel`, and `min_vel` (EGK 40).
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.
Steps
acknowledge
brake_test
fast_stop
gripper_info
prepare_for_shutdown
release_for_manual_movement
softreset
stop
grip
grip_with_position
gripper_control
move_to_absolute_position
move_to_relative_position
release_workpiece