-
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 a minimalist dummy for simulating communication #8
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
This will mimic the real gripper's web server.
stefanscherzinger
force-pushed
the
add-test-dummy
branch
from
July 9, 2024 12:46
98ecfa4
to
9215d9a
Compare
This makes testing easier with non-default ports in the dummy server. The default port (`80`) would require sudo privileges.
That's now more consistent with the rest.
- Move the launch fixture into `conftest.py`. This will probably be used by several test files. - Add a test to check whether the gripper's joint state topic gets published.
That's easier for installation and usage in the driver's test repository. The idea is, still, to keep the dummy ROS2-free in case we want to ship it separately.
Also add a script to read `data.json` from real gripper hardware.
By keeping realistic metadata in the dummy, we can process _offset_-based requests and requests for several instances at the same time. Also implement enum requests and add more tests.
Also split the processing of GET requests in the server depending on the path. This makes the individual functions smaller and better to read.
Also support comments in the `system_parameter_codes` file when reading system parameters from hardware.
We'll later need something less hard-coded here.
stefanscherzinger
force-pushed
the
add-test-dummy
branch
3 times, most recently
from
July 22, 2024 16:09
cfb7e20
to
1f97dba
Compare
stefanscherzinger
force-pushed
the
add-test-dummy
branch
7 times, most recently
from
July 25, 2024 05:41
613bb18
to
56dcf2e
Compare
stefanscherzinger
force-pushed
the
add-test-dummy
branch
from
July 25, 2024 06:00
56dcf2e
to
d6657cf
Compare
`Success` is more common and more concise.
Also use a convenience method for getting specific driver state variables by topic.
That's cleaner and more concise.
This makes bit operations on these data easier than with immutable strings. Also add image documentation for the different plc data messages and double words.
Also drop the pydantic message type. We currently don't make use of this in the ROS2 C++ driver.
Also - Move behavior-related tests into `test_dummy.py`. They make more sense there - Adapt the ROS2 test for checking whether the driver is ready after startup. The driver should be operational after start by acknowledging internal errors.
Also provide a mechanism to set actual position and velocity in the internal data. These data will be requested periodically by the driver.
We'll need this for toggling the `command received` bit for most plc commands.
This seems the cleanest approach for now for giving immediate results to post requests and having the motion run in the background. Also adapt the unit tests accordingly.
Using a linear motion profile should be sufficient for now.
stefanscherzinger
force-pushed
the
add-test-dummy
branch
from
August 5, 2024 12:19
ad4c62d
to
90dce50
Compare
This is currently not very helpful. Let's get that back once we are interested in latest updates on `Rolling`.
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.
Rationale
We need a fast and parallelizable way to test ongoing developments. This should be a simple dummy that simulates the gripper's side of the communication.
Steps
80
as default for http requests. This requires sudo privileges and is unhandy for testing.