-
Notifications
You must be signed in to change notification settings - Fork 40
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
Target Loading Update #76
Conversation
400f441
to
d6109d0
Compare
@marip8 I'll take a look! |
@marip8 I noticed that this functionality in |
@schornakj I'm getting the following build error on Xenial from the ROS unit test that I added to target_loader_utest.cpp:(.text._ZN7testing8internal21TypeParameterizedTestI16TargetLoaderTestNS0_11TemplateSelI26TargetLoaderTest_test_TestEENS0_6Types1IN15rct_image_tools24ModifiedCircleGridTargetEEEE8RegisterEPKcRKNS0_12CodeLocationESC_SC_iRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISM_EE[_ZN7testing8internal21TypeParameterizedTestI16TargetLoaderTestNS0_11TemplateSelI26TargetLoaderTest_test_TestEENS0_6Types1IN15rct_image_tools24ModifiedCircleGridTargetEEEE8RegisterEPKcRKNS0_12CodeLocationESC_SC_iRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISM_EE]+0x1fd): undefined reference to `testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void ()(), void ()(), testing::internal::TestFactoryBase*)' I think this might be a result of us downloading GTest for |
@marip8 That's rather annoying. I agree that the way around this is probably to make sure that we use the same version of GTest as the one We might be able to resolve this by changing how we install GTest. Right now we build it from source in the |
Per @Levi-Armstrong this issue is fixed by calling |
Just curious, what was there reason the templated struct had to be added versus just templating and specializing the functions themselves? |
I ran into build errors initially trying to do what you suggested, so I implemented this solution instead. I didn't look too much into the issue. Ultimately I would like to remove the non-throwing loaders, so maybe we can revisit this in the future. |
* Moved the custom loading exceptions to its own file * Added new file for loader utils * Added specializable struct for creating a target object from ROS param * Added target loader specialization for modified circle grid target * Integrated target loader struct in rct_ros_tools * Integrated target loader struct in rct_examples * Revised modified circle grid target struct * Added unit test for target loaders
This PR revises the functions for loading a target definition from YAML file or string path in order to support loading different types of targets (specifically ChArUco and ArUco grid targets).
In order to have the functions with the same parameters (i.e. ROS node handles, strings, etc.) but return a different datatype (i.e. modified circle grid target, ChArUco grid target), I had to create a template struct that is specializable based on the target type.
@schornakj can you review?