-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
pandad: rewrite from C++ to Python #34711
base: master
Are you sure you want to change the base?
Conversation
e190149
to
5b02daf
Compare
Beautiful red diff 😍 |
96296f8
to
3b8f96d
Compare
trigger-jenkins |
8800f2c
to
5b9876e
Compare
trigger-jenkins |
The "loopback" and "test pandad spi" tests are failing in Jenkins. Do you have a comma 3X to test the SPI? If not, I can send you a couple. |
b61a500
to
d3dc85a
Compare
Thanks for pointing this out! I have a comma 3X and can test the SPI locally. There are two key issues causing the 'loopback' and 'test pandad spi' failures in Jenkins:
I noticed you’ve already set a bounty for 'switch to kernel driver for low-level SPI comms,' which should resolve the spidev performance issue. Once that’s implemented, the python pandad should operate smoothly. |
Merged #1. I was hoping we can get good enough performance to not be blocked on the kernel driver, but if you don't think we can, let's move back to the UI rewrite. Would be really great if we can ship the rewrite for 0.9.9! |
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.
How's the can
and sendcan
performance on the capnp side? Any bottlenecks there?
I really think we can get the performance similar to the C++ version without the kernel driver. I'd rather not block merging this on that.
return ignition | ||
|
||
def _fill_state(self, ps, hw_type, health): | ||
ps.voltage = health['voltage'] |
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 propose we refactor the panda health reponse to output a format compatible for dict init on the capnp message so we can do:
msg = messaging.new_message('pandaStates', 0)
msg.pandaStates[0] = panda.health()
@@ -44,13 +41,6 @@ int main(int argc, char *argv[]) { | |||
stream = new DeviceStream(&app); | |||
} else if (cmd_parser.isSet("zmq")) { | |||
stream = new DeviceStream(&app, cmd_parser.value("zmq")); | |||
} else if (cmd_parser.isSet("panda") || cmd_parser.isSet("panda-serial")) { |
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 split out this cabana part into another PR
@adeebshihadeh : I don’t think there are bottlenecks in capnp or msgq. I’ll run some tests and share a C++ vs. Python sendcan performance comparison to confirm. |
trigger-jenkins |
No description provided.