install urdfdom from source
I've installed ROS from source for Hydro as the documentation states. I source that ROS workspace and then create a new workspace for MoveIt development that I overlay on top. The issue is that it cannot find urdfdom:
CMake Error at /home/dave/ros/ws_ros_catkin/install_isolated/share/catkin/cmake/catkinConfig.cmake:72 (find_package):
Could not find a configuration file for package urdfdom.
Set urdfdom_DIR to the directory containing a CMake configuration file for
urdfdom. The file will have one of the following names:
urdfdomConfig.cmake
urdfdom-config.cmake
Call Stack (most recent call first):
moveit_core/CMakeLists.txt:10 (find_package)
CMake Error at /home/dave/ros/ws_ros_catkin/install_isolated/share/catkin/cmake/catkin_package.cmake:156 (message):
catkin_package() DEPENDS on 'urdfdom' which must be find_package()-ed
before. If it is a catkin package it can be declared as CATKIN_DEPENDS
instead without find_package()-ing it.
Call Stack (most recent call first):
/home/dave/ros/ws_ros_catkin/install_isolated/share/catkin/cmake/catkin_package.cmake:98 (_catkin_package)
moveit_core/CMakeLists.txt:63 (catkin_package)
-- Configuring incomplete, errors occurred!
Invoking "cmake" failed
Digging around, I found that in my ROS source installation workspace it was missing a .cmake file and this entire folder:
/home/dave/ros/ws_ros_catkin/install_isolated/share/urdfdom
I don't know how it was able to build the rest of the packages without this. My solution was to manually build urdfdom:
cd /home/dave/ros/ws_ros_catkin/src/urdfdom
mkdir build && cd build
cmake ../
make
sudo make install
Then I symlinked the following folder:
ln -s /usr/local/share/urdfdom /home/dave/ros/ws_ros_catkin/src/urdfdom
I'm shocked that it worked, but I feel like this is a bad solution. What did I do wrong and how do I fix it in the future?
Thanks!
Edit
Here's the output of a catkin_make_isolated --install
build:
https://gist.github.com/davetcoleman/...
My ROS_PACKAGE_PATH is the following:
ws_jsk2/src
ws_moveit/src
ws_ros_catkin/install_isolated/share
ws_ros_catkin/install_isolated/stacks
Did you install your hydro workspace before overlaying moveit? Yes, I ran setup.bash of my ros source install before starting to build moveit.
Edit 2
In /home/dave/ros/ws_ros_catkin/src/urdfdom
, tree output:
https://gist.github.com/davetcoleman/...
Note that I made the build folder myself, as described above, after being unable to fix the issue myself
Edit 3
My checkout of urdfdom is directly from the Github repo:
git clone https://github.com/ros/urdfdom
It appears there is no package.xml in that repo, I guess it is added as some patch? This is undocumented and seems like a messy way of doing things. What is the recommended way of making changes to urdfdom with ROS and committing it to Github? I now see where the package.xml comes from:
It works fine for me so it is likely not a problem with urdfdom itself. Can you please more information from your build, e.g. the CMake configure as well as the install output of your ROS hydro workspace (probably best via gist or something similar)? The fact that your first build did not result in having the share/urdfdom folder indicates that something went wrong. Your way of trying to patch the problem after the fact was incomplete and therefore it failed to find urdfdom later.
I'm not sure how to get my CMake configure information, can you explain? I've added some more info, above. Thanks!