-
-
Notifications
You must be signed in to change notification settings - Fork 492
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 gRPC backend support for Offboard plugin #735
Add gRPC backend support for Offboard plugin #735
Conversation
The backend unit test is still in progress, but I've just added a few items to that and would like some feedback before continuing. Disclaimer - I have very limited experience with
|
My opinion is that if the code needs to handle "invalid" arguments, it has to be tested. There is logic specific to receiving a
Same as above. If not handling that in the implementation may result a crash, then we want to handle it. And if we want to handle it, we want a test to ensure that we actually do :-).
That's a good point. The thing is that we basically convert an enum into another one, using their
|
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.
That is looking very good to me, good job! I haven't tested the code, though. Is it working?
One thing I believe may be missing in your setup is the offboard.proto
file. Did you update the src/backend/proto
submodule to a commit containing it (your commit is 71c2e7350015f358f972d9b32a5b24cc500eba74
, it would make sense to update the submodule to that)?
And just to make sure: are you aware that once you compile the C++ backend with your changes, you get this build/default/backend/src/backend_bin
binary, that you can test directly with the Python wrappers? Given that you generate the Python wrappers with the offboard.proto
commit as well ;-).
Thanks for all the help @JonasVautherin ! I've been so wrapped up in trying to understand the code that I haven't been able to test yet 😆 Yeah I need to update the protos submodule to include the |
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 had to stare at the compiler warnings for a bit to figure out what was wrong here 😄. I made some hints in the review what to fix.
Don't forget to compile with this:
make BUILD_BACKEND=1 && build/default/unit_tests_runner && build/default/backend/test/unit_tests_backend
And BUILD_BACKEND=1
is ignored unless you do make clean
.
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.
LGTM, passing unit tests on my side (core + backend). Good for me if it passes the CI!
Thanks a lot @cswkim!
Also add backend test and plugin mock.
Add translate rpc functions for attitude rate and position ned yaw.
Remove unique_ptr approach for creating arbitrary structs for testing.
50760b6
to
93bd11e
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.
Thanks!
Also add plugin mock and backend test (which is currently missing - WIP):
backend/test/CMakeLists.txt
(to be modified)backend/test/offboard_service_impl_test.cpp
(to be added)Resolves #702.