-
Notifications
You must be signed in to change notification settings - Fork 120
PreciseFlex Arm Driver #619
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
base: main
Are you sure you want to change the base?
Conversation
49a6770 to
159fd78
Compare
bffeb24 to
a1d61b7
Compare
… the Backend abstractmethods
…unndant method, chenge default ip address, change test_get_base assertion to tuple, add sleep to test_set_power
…lidation - Updated get_signal to correctly parse response and return signal value. - Modified get_location_z_clearance to return z_world as a boolean. - Enhanced set_location_z_clearance to convert z_world to an integer for command. - Improved get_location_config and set_location_config to handle bit mask configurations with validation checks.
…refactor speed handling and location management
…onfiguration tests
…ptional for orientation
…_flex modules. Change TCP IO to use PLR's IOBase instead of io module's IOBase
miikee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebased to main.
- Updated with PreciseFlexBackendAPI, PreciseFlexBackend, ArmBackend, and Arm. Including integration tests with robot (marked with a pytest.mark.hardware).
- Pytest.ini updated to ignore 'hardware' marked tests.
- Updated TCP base class since original testing. So this may need to be retested, but should still work.
1675cd6 to
2b2f7f9
Compare
|
@miikee could you please enable "allow edits by maintainers" so I can work on this PR? |
|
@rickwierenga just sent you an invite for the branch. Let me know if it doesn't work. |
|
thank you, this works. do you know if there is a way to convert between JointCoords and CartesianCoords using their API? like do they expose a kinematics model? |
|
There's a method that converts Cartesian and Joint in the GPL code on the robot, but it's not exposed through the TCS server. We'd need to write some custom GPL to expose it; and the user would also need to upload it. |
|
noob question: how do I define a profile? with await arm.backend.move_to(CartesianCoords(location=Coordinate(x=x, y=y, z=z), rotation=Rotation(x=roll, y=pitch, z=yaw)))I get and with profile_id = 20
api = arm.backend.api
await api.set_motion_profile_values(
profile_id,
speed=25,
speed2=0,
acceleration=10,
deceleration=10,
acceleration_ramp=0.5,
deceleration_ramp=0.5,
in_range=10,
straight=False,
)I get |
|
what fixed this: setting the port to (nmap sometimes shows 10000 as open, and has never showed 10100 as open, but specifying it in the api did work) |
|
@miikee what are your thoughts on moving the api code into the backend? a lot of the code is just passing data. is there a reason we need that layer of abstraction? |
|
@rickwierenga Do you mean combining the class PreciseFlexBackendApi and PreciseFlexBackend? My idea for keeping them separate was to make PreciseFlexBackend more human readable and to keep PreciseFlexBackendApi 1:1 with the TCS documentation. |
|
firmware commands are a common pattern in PLR 😅 and I think it almost always makes sense to have one method per firmware command. in some cases I think it also makes sense to have wrappers around those raw firmware-command-methods, to make them more user-friendly or have a version compatible with an abstract backend but in cases like this where the firmware api is actually nice, it introduces more complexity than it reduces imo. for example, to home you have to read Arm.home -> PreciseFlex400Backend.home -> PreciseFlexBackendApi.home to see it's just a string |
|
@rickwierenga combining the two would be fine if you think it'll lower complexity. |
…e operations - Introduced VerticalAccess and HorizontalAccess data classes to define access patterns. - Updated approach, pick_plate, and place_plate methods to accept access patterns. - Improved documentation for methods to clarify usage and default behaviors.
|
@rickwierenga I also wanted to mention a complication with the pick/place/approach methods. These work by setting a station location in the robot's memory. Then the robot grabs from from that location. But it grabs differently depending what access type is set to that station. This is an internal flag it keeps with each station.
So the movement changes for each:
Depending on access type, the z-clearance changes meaning:
So this can be a bit confusing... plus theres a few other access parameters that can be changed. I've added a commit here to fix this with a AccessConfig dataclass to describe how to access the plate. Let me know your thoughts. |
|
awesome, thank you! |
Untested Driver
This adds:
Docs haven't been updated yet.
There's a warning included in the PreciseFlexBackend docstring that it's untested.