-
Notifications
You must be signed in to change notification settings - Fork 316
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
Port transmission loader plugins #633
Port transmission loader plugins #633
Conversation
-Rewrite the test cases for it based on the ROS Noetic version -Modify the package.xml and the CMakeLists.txt to accomodate the pluginlib
Awesome!
|
Yes of course. I wanted to create something similar to the URDF used here, so there will be an invalid test case but I think that parsing the first transmission gives us a segfault for some reason. I didn't encounter this problem when I set the mechanical reduction to zero, or to a string. In the latter case an exception is raised as expected. |
ok so the crash is an issue with the parser, we should fix that but that could be done on a follow-up issue. Can you please comment out that test in the mean time please? leave a //TODO note above explaining when it can be reenabled |
MinimalSpec and InvalidSpec test case added +preCommit
731aec2
to
625eff2
Compare
transmission_interface/include/transmission_interface/simple_transmission_loader.hpp
Outdated
Show resolved
Hide resolved
transmission_interface/include/transmission_interface/transmission_loader.hpp
Outdated
Show resolved
Hide resolved
transmission_interface/include/transmission_interface/transmission_loader.hpp
Outdated
Show resolved
Hide resolved
transmission_interface/include/transmission_interface/transmission_loader.hpp
Outdated
Show resolved
Hide resolved
transmission_interface/test/simple_transmission_loader_test.cpp
Outdated
Show resolved
Hide resolved
Pinging @saikishor for a due-diligence license approval from PAL. |
…ransmission_loader.hpp Co-authored-by: Bence Magyar <bence.magyar.robotics@gmail.com>
…sion_loader.hpp Co-authored-by: Bence Magyar <bence.magyar.robotics@gmail.com>
…sion_loader.hpp Co-authored-by: Bence Magyar <bence.magyar.robotics@gmail.com>
…sion_loader.hpp Co-authored-by: Bence Magyar <bence.magyar.robotics@gmail.com>
Co-authored-by: Bence Magyar <bence.magyar.robotics@gmail.com>
Co-authored-by: Bence Magyar <bence.magyar.robotics@gmail.com>
Co-authored-by: Bence Magyar <bence.magyar.robotics@gmail.com>
Co-authored-by: Bence Magyar <bence.magyar.robotics@gmail.com>
LGTM |
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 for the contribution.
I added a lot of nit-picking and maybe some of my comments are missing the point, but I would like to get explained why some things are designed as they are.
This represents a very core of the transmission-management functionality, let's get it right.
transmission_interface/include/transmission_interface/transmission_interface_exception.hpp
Show resolved
Hide resolved
transmission_interface/include/transmission_interface/transmission_loader.hpp
Outdated
Show resolved
Hide resolved
transmission_interface/test/simple_transmission_loader_test.cpp
Outdated
Show resolved
Hide resolved
transmission_interface/test/simple_transmission_loader_test.cpp
Outdated
Show resolved
Hide resolved
int main(int argc, char ** argv) | ||
{ | ||
testing::InitGoogleTest(&argc, argv); | ||
return RUN_ALL_TESTS(); | ||
} |
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.
Is this really needed? We don't have this in the test files usually. At least the one using gmock
instead of gtest
library.
int main(int argc, char ** argv) | |
{ | |
testing::InitGoogleTest(&argc, argv); | |
return RUN_ALL_TESTS(); | |
} |
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 can fix this in #642 . The trick is to link your tests binary to a library called "gmock_main".
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.
fixed over there
transmission_interface/include/transmission_interface/transmission_interface_exception.hpp
Show resolved
Hide resolved
Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>
Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>
Co-authored-by: Denis Štogl <destogl@users.noreply.github.com>
…ls#618) (ros-controls#633) * Use branch name substitution for all links (ros-controls#618) (cherry picked from commit aece974) --------- Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com> Co-authored-by: Dr. Denis <denis@stoglrobotics.de>
My draft PR for the following issue: #599
Basic structure added for TransmissionLoader, including the SimpleTransmissionLoader plus tests for SimpleTransmissionLoader.
transmission_interface/SimpleTransmissionWhen I tested it everything seemed to work, but I'm not sure how I should proceed with the InvalidSpec testcase, since it segfaults while parsing the following:
The ROS Noetic version has a test case similar to this one. Should I just ignore this?
I'll probably use EXPECT_THROW for the rest.
Also, if I'm planning on porting the other transmission loaders too, should I open a separate PR for those?
Also, where should I place the URDFs I used for the tests?