-
Notifications
You must be signed in to change notification settings - Fork 63
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
Standalone kdl_parser library #13
Conversation
@sloretz Can you comment on this PR? |
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 PR, and your patience @christian-rauch . Comments are below.
@@ -0,0 +1,74 @@ | |||
################################################################################################## | |||
# | |||
# CMake script for finding TinyXML. |
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 was going to say it looks like this was copied from urdfdom, in which case this shouldn't be needed since find_package(urdfdom REQUIRED)
is used in the CMakeLists.txt
, but it looks like urdfdom
is not find_package
ing TinyXML in its <project>-config.cmake
like it should
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.
@@ -77,8 +79,10 @@ bool treeFromString(const std::string & xml, KDL::Tree & tree); | |||
* \param[out] tree The resulting KDL Tree | |||
* \return true on success, false on failure | |||
*/ | |||
#ifdef HAS_URDF |
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 would rather keep the signature, but return False
if the library was not built with urdf. That way a downstream package including kdl_parser.hpp
doesn't have to define HAS_URDF
themselves.
@clalancette thoughts?
Thanks for coming back to this PR. I discovered that the non-catkin version doesn't build any more. Anyway, should we maybe use |
I went ahead and replaced most of 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.
LGTM! @clalancette Mind taking a look at this one too?
I ran check_kdl_parser
on test/pr2_desc.xml
building with ROS and without. The only difference I see is how ROS_WARN
/ROS_ERROR
are output, which is fine.
When building with ROS ROS_WARN
is output to stdout with formatting that includes a timestamp and console colors. When building without ROS the warning is sent to stderr and is just the text of the warning itself.
@sloretz @clalancette Any news/feedback on this? |
ping @clalancette , ok to merge this one? |
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.
One minor change, but I'll still approve.
Thanks for the PR! |
As proposed in #12, this PR makes
catkin
androsconsole
optional. I.e. plain CMake macros are used if catkin is not available and logging is done via std io streams ifrosconsole
is not available.Since
urdf
itself depends on ROS for similar reasons, it has been replaced byurdfdom
. This disables some of the functions liketreeFromParam
andtreeFromXml
, which use methods that are not present inurdfdom
. In the log term it would be beneficial, ifurdf
also would be disentangled from ROS.I copied
FindTinyXML.cmake
andFindTinyXML2.cmake
from https://github.com/ros/cmake_modules into this repo, to not introduce another dependency.