-
Notifications
You must be signed in to change notification settings - Fork 178
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
feat(hardware): refactor tool_sensors to simplify and remove csvs #16462
Conversation
59abe33
to
616c303
Compare
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.
Let's make these more special loggers I think
probe: InstrumentProbeType = InstrumentProbeType.PRIMARY, | ||
force_both_sensors: bool = False, | ||
response_queue: Optional[ | ||
asyncio.Queue[dict[SensorId, list[SensorDataType]]] |
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.
if we're going to use the lower case versions here we should change the rest of the file imo
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.
I'm not sure what that means
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.
for the types - dict
instead of typing.Dict
api/tests/opentrons/hardware_control/backends/test_ot3_controller.py
Outdated
Show resolved
Hide resolved
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.
Looks good but let's consider whether the data should go in journald or not and add some tests for at least "how many messages am I trying to receive" mechanics and ideally more.
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.
Looks good to me!
probe: InstrumentProbeType = InstrumentProbeType.PRIMARY, | ||
force_both_sensors: bool = False, | ||
response_queue: Optional[ | ||
asyncio.Queue[dict[SensorId, list[SensorDataType]]] |
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.
for the types - dict
instead of typing.Dict
Overview
This PR removes much of the complexity in tool_sensors around the liquid probe routine.
Instead of having many different options of setting the bindings and building messages, this consolidates all of the previous options by only commanding the firmware one way, forwarding the sensor information to a new log file, and providing a way for the system to optionally grab the raw sensor data if they wish which is required for the hardware-testing scripts and possibly for future features.
We no longer write CSV files to the robot through this system and have removed all of the coded in paths for them. It also removes the "OutputOptions" data type that previously controlled the behavior variants.
Before each variant had it's own quirks to behavior so now machine actions will always be the same regardless of how the tool_sensors method is called.
This also adds a new can message that sends sensor data in batches instead of 1 by 1 so we don't choke up the can bus as much.
Test Plan and Hands on Testing
Changelog
Review requests
Risk assessment