Hello all,
Some students have developed some code using ROS that I would like to make use of. The obvious, easy solution is to install Ubuntu on a computer and use it that way, but I've been trying to see how much of a hassle it would be to set things up on my Fedora 18 desktop.
I've had some success following the instructions at http://www.ros.org/wiki/fuerte/Installation/Fedora and making use of the packages from http://rmattes.fedorapeople.org/rospackages/. As far as I can recall -- wasn't taking notes, unfortunately -- the following are the things I had to modify from the instructions given on that page:
- installed python-rosinstall, python-rospkg and python-rosdep (and ros-release) from the fedorapeople repo instead of using python-pip - downloaded http://ros.org/rosinstalls/fuerte-ros-full.rosinstall and changed the path for actionlib to refer to ros-gbp instead of wg-debs - created an appropriate rosdep-fedora.yaml file as described here ( https://code.ros.org/trac/ros/ticket/3929) - edited CMakeCache.txt after running cmake to set SETUPTOOLS_ARG_EXTRA to an empty string before running "make install" (SETUPTOOLS_DEB_LAYOUT seems not to work quite right) - created a symlink dist-packages -> site-packages inside /opt/ros/fuerte/lib/python2.7, again because the deb layout seemed to be getting in the way - added "set (PythonLibs_FIND_VERSION 2)" before all "find_package (PythonLibs)" calls in all CMakeLists.txt files (in the underlay and the actual OS) so that it finds Python 2 instead of Python 3 - added "rosbuild_link_boost ($executable system)" to various CMakeLists.txt files -- with Boost 1.50.0, you have to explicitly link against the system lib or else you get undefined references to symbols like '_ZN5boost6system15system_categoryEv'
But now, unfortunately, I've hit "the pcl issue" ( http://lists.fedoraproject.org/pipermail/robotics/2012/000671.html). The specific symptom is as follows (in the middle of "rosmake -a"):
[rosbuild] Building package costmap_2d Failed to invoke /opt/ros/fuerte/bin/rospack deps-manifests costmap_2d [rospack] Error: package/stack costmap_2d depends on non-existent package pcl
I do have pcl-devel-1.6.0-2.fc18.x86_64 installed but it doesn't seem to help. I tried rebuilding the pcl srpm with the patch from http://dev.pointclouds.org/issues/699 (it applied with minimal fuzz), but the rpmbuild pretty much brought my fairly beefy desktop machine to its knees and I'm not sure if it will help in any case. Should I persevere with that?
Any other suggestions for getting this working? As a fallback, I can just install Ubuntu on our demo laptop, but it would be nice to have this working.
All the best,
MEF
On 12/03/2012 10:52 AM, Mary Ellen Foster wrote:
Hello all,
Some students have developed some code using ROS that I would like to make use of. The obvious, easy solution is to install Ubuntu on a computer and use it that way, but I've been trying to see how much of a hassle it would be to set things up on my Fedora 18 desktop.
I've had some success following the instructions at http://www.ros.org/wiki/fuerte/Installation/Fedora and making use of the packages from http://rmattes.fedorapeople.org/rospackages/. As far as I can recall -- wasn't taking notes, unfortunately -- the following are the things I had to modify from the instructions given on that page:
- installed python-rosinstall, python-rospkg and python-rosdep (and ros-release) from the fedorapeople repo instead of using python-pip
- downloaded http://ros.org/rosinstalls/fuerte-ros-full.rosinstall and changed the path for actionlib to refer to ros-gbp instead of wg-debs
- created an appropriate rosdep-fedora.yaml file as described here (https://code.ros.org/trac/ros/ticket/3929)
- edited CMakeCache.txt after running cmake to set SETUPTOOLS_ARG_EXTRA to an empty string before running "make install" (SETUPTOOLS_DEB_LAYOUT seems not to work quite right)
- created a symlink dist-packages -> site-packages inside /opt/ros/fuerte/lib/python2.7, again because the deb layout seemed to be getting in the way
- added "set (PythonLibs_FIND_VERSION 2)" before all "find_package (PythonLibs)" calls in all CMakeLists.txt files (in the underlay and the actual OS) so that it finds Python 2 instead of Python 3
- added "rosbuild_link_boost ($executable system)" to various CMakeLists.txt files -- with Boost 1.50.0, you have to explicitly link against the system lib or else you get undefined references to symbols like '_ZN5boost6system15system_categoryEv'
But now, unfortunately, I've hit "the pcl issue" (http://lists.fedoraproject.org/pipermail/robotics/2012/000671.html). The specific symptom is as follows (in the middle of "rosmake -a"):
[rosbuild] Building package costmap_2d Failed to invoke /opt/ros/fuerte/bin/rospack deps-manifests costmap_2d [rospack] Error: package/stack costmap_2d depends on non-existent package pcl
I do have pcl-devel-1.6.0-2.fc18.x86_64 installed but it doesn't seem to help. I tried rebuilding the pcl srpm with the patch from http://dev.pointclouds.org/issues/699 (it applied with minimal fuzz), but the rpmbuild pretty much brought my fairly beefy desktop machine to its knees and I'm not sure if it will help in any case. Should I persevere with that?
Any other suggestions for getting this working? As a fallback, I can just install Ubuntu on our demo laptop, but it would be nice to have this working.
All the best,
MEF
Hi,
After hacking on this issue for a while, the best solution I have found is to package the core ros stack (or otherwise have it available,) and then build PCL with the issue 699 patch and USE_ROS set to true.
The error you're getting is because PCL doesn't provide any of the ROS package metadata out of the box, so rospack fails to find PCL. The patch from issue 699 aimed to fix that, and to make PCL play nice with the ROS message definitions. PCL is a beast to build though; there's tons of templates which seem to slow gcc down considerably.
I'm pretty sure that the 699 patch + your best path forward while we work on getting ROS packaged up (some of the python tools are already packaged, and the fuerte packages on my fedorapeople are almost for submission when I find some spare cycles). I'd be interested in knowing if you run into any issues, because the 699 patch is how I plan on making PCL work with ROS once the other packages are in Fedora.
Rich
On 3 December 2012 23:17, Rich Mattes richmattes@gmail.com wrote:
After hacking on this issue for a while, the best solution I have found is to package the core ros stack (or otherwise have it available,) and then build PCL with the issue 699 patch and USE_ROS set to true.
AAAAAGH -- I just rebuilt the rpm with that patch included -- took nearly three hours -- and retried the rosmake -a command, and it still fails with the same error. I see that there's a "metadata.xml" file inside the patch -- should that be copied somewhere useful?
Thanks for your help -- I'm still optimistic ...
MEF
On 4 December 2012 16:08, Mary Ellen Foster mefoster@gmail.com wrote:
I see that there's a "metadata.xml" file inside the patch -- should that be copied somewhere useful?
Of course I mean "manifest.xml" above.
MEF
On Tue, Dec 4, 2012 at 11:09 AM, Mary Ellen Foster mefoster@gmail.comwrote:
On 4 December 2012 16:08, Mary Ellen Foster mefoster@gmail.com wrote:
I see that there's a "metadata.xml" file inside the patch -- should that be copied somewhere useful?
Of course I mean "manifest.xml" above.
MEF
It should already be installed to /usr/share/pcl; then you should put /usr/share onto your ROS_PACKAGE_PATH. You can test your installation by seeing if tools like rosstack resolve the pcl package.
Rich
On 4 December 2012 16:15, Rich Mattes richmattes@gmail.com wrote:
On Tue, Dec 4, 2012 at 11:09 AM, Mary Ellen Foster mefoster@gmail.comwrote:
On 4 December 2012 16:08, Mary Ellen Foster mefoster@gmail.com wrote:
I see that there's a "metadata.xml" file inside the patch -- should that be copied somewhere useful?
Of course I mean "manifest.xml" above.
It should already be installed to /usr/share/pcl; then you should put
/usr/share onto your ROS_PACKAGE_PATH. You can test your installation by seeing if tools like rosstack resolve the pcl package.
The directory is actually /usr/share/pcl-1.6. I tried putting /usr/share on the ROS_PACKAGE_PATH but "rosstack find pcl" still returns "Error: stack/package pcl not found". I also tried creating a symlink /usr/share/pcl -> pcl-1.6 but that didn't help. Is that rosstack command line a good test?
MEF
On 12/04/2012 11:28 AM, Mary Ellen Foster wrote:
On 4 December 2012 16:15, Rich Mattes <richmattes@gmail.com mailto:richmattes@gmail.com> wrote:
On Tue, Dec 4, 2012 at 11:09 AM, Mary Ellen Foster <mefoster@gmail.com <mailto:mefoster@gmail.com>> wrote: On 4 December 2012 16:08, Mary Ellen Foster <mefoster@gmail.com <mailto:mefoster@gmail.com>> wrote: I see that there's a "metadata.xml" file inside the patch -- should that be copied somewhere useful? Of course I mean "manifest.xml" above. It should already be installed to /usr/share/pcl; then you should put /usr/share onto your ROS_PACKAGE_PATH. You can test your installation by seeing if tools like rosstack resolve the pcl package.
The directory is actually /usr/share/pcl-1.6. I tried putting /usr/share on the ROS_PACKAGE_PATH but "rosstack find pcl" still returns "Error: stack/package pcl not found". I also tried creating a symlink /usr/share/pcl -> pcl-1.6 but that didn't help. Is that rosstack command line a good test?
MEF
Sorry, rosstack looks for stack.xml, not manifest.xml. Try using "rospack find pcl". rospack seems to use folder names, so you should symlink /usr/share/pcl -> /usr/share/pcl-1.6. Looking back at your original error message, it looks like the command "rospack deps-manifests costmap_2d" is what is failing. So the "rospack" command should be the one you're using to find PCL. I just tried creating the symlink, installing manifest.xml, and running the rospack command to find PCL and find the costmap deps, and it seems to have worked.
Rich
On 5 December 2012 04:35, Rich Mattes richmattes@gmail.com wrote:
Sorry, rosstack looks for stack.xml, not manifest.xml. Try using "rospack find pcl". rospack seems to use folder names, so you should symlink /usr/share/pcl -> /usr/share/pcl-1.6. Looking back at your original error message, it looks like the command "rospack deps-manifests costmap_2d" is what is failing. So the "rospack" command should be the one you're using to find PCL. I just tried creating the symlink, installing manifest.xml, and running the rospack command to find PCL and find the costmap deps, and it seems to have worked.
Yes, thanks -- that got me much further in the process. Here are the other changes I had to make to get "rosmake -a" to complete:
- I had to add a "ros" package to rosdep-fedora.yaml to allow "rosdep install -a" to work. I ended up just giving an empty list of yum packages and that seemed to work. - the manifest.xml for pcl refers to pkg-config things like pcl_common-1.5, while the pcl RPM installs un-versioned pkg-config things, so I had to change that both in the installed pcl manifest and in the copied version in perception_pcl/pcl_ros/manifest.xml. I also added `mysql_config --libs` to the ldflags list because libmysqlclient.so is in a subdirectory of /usr/lib64. - added more rosbuild_link_boost ($executable system) calls to - diagnostics/diagnostic_updater/CMakeLists.txt - added more instances of "set(PythonLibs_FIND_VERSION 2)" and rosbuild_link_boost($executable system) to CMakeLists.txt's as needed - added the following to laser_pipeline/laser_filters/CMakeLists.txt - - include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../perception_pcl/pcl_ros/include) - link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../perception_pcl/pcl_ros/lib) - added protobuf to the generated .rosinstall as described at https://code.ros.org/lurker/message/20120411.124910.6ccbec56.el.html
So this all worked fine, and then I tried to rosmake the code provided by the students ...
Failed to invoke /opt/ros/fuerte/bin/rospack deps-manifests social_robot [rospack] Error: package/stack social_robot depends on non-existent package opencv2
Arrggghhh ... does this mean that I need a manifest.xml for opencv-devel too, or something like that?
Increasingly tempted to just jump ship to ubuntu and be done with it, but I'm stubborn. :)
MEF
On Fri, Dec 7, 2012 at 7:10 AM, Mary Ellen Foster mefoster@gmail.comwrote:
On 5 December 2012 04:35, Rich Mattes richmattes@gmail.com wrote:
Sorry, rosstack looks for stack.xml, not manifest.xml. Try using "rospack find pcl". rospack seems to use folder names, so you should symlink /usr/share/pcl -> /usr/share/pcl-1.6. Looking back at your original error message, it looks like the command "rospack deps-manifests costmap_2d" is what is failing. So the "rospack" command should be the one you're using to find PCL. I just tried creating the symlink, installing manifest.xml, and running the rospack command to find PCL and find the costmap deps, and it seems to have worked.
Yes, thanks -- that got me much further in the process. Here are the other changes I had to make to get "rosmake -a" to complete:
- I had to add a "ros" package to rosdep-fedora.yaml to allow "rosdep
install -a" to work. I ended up just giving an empty list of yum packages and that seemed to work.
- the manifest.xml for pcl refers to pkg-config things like
pcl_common-1.5, while the pcl RPM installs un-versioned pkg-config things, so I had to change that both in the installed pcl manifest and in the copied version in perception_pcl/pcl_ros/manifest.xml. I also added `mysql_config --libs` to the ldflags list because libmysqlclient.so is in a subdirectory of /usr/lib64.
- added more rosbuild_link_boost ($executable system) calls to
- diagnostics/diagnostic_updater/CMakeLists.txt
- added more instances of "set(PythonLibs_FIND_VERSION 2)" and
rosbuild_link_boost($executable system) to CMakeLists.txt's as needed
- added the following to laser_pipeline/laser_filters/CMakeLists.txt
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../perception_pcl/pcl_ros/include)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../perception_pcl/pcl_ros/lib)
- added protobuf to the generated .rosinstall as described at
https://code.ros.org/lurker/message/20120411.124910.6ccbec56.el.html
So this all worked fine, and then I tried to rosmake the code provided by the students ...
Failed to invoke /opt/ros/fuerte/bin/rospack deps-manifests social_robot [rospack] Error: package/stack social_robot depends on non-existent package opencv2
Arrggghhh ... does this mean that I need a manifest.xml for opencv-devel too, or something like that?
Increasingly tempted to just jump ship to ubuntu and be done with it, but I'm stubborn. :)
MEF
It might be an electric to fuerte migration issue: see [1]. The opencv2
ros stack was removed from fuerte in favor of using the system's opencv libraries. You should be able to remove the dependency on the opencv2 package, and use the system-installed version instead.
Rich
[1] http://ros.org/wiki/fuerte/Migration#Errors_on_non-Ubuntu_platforms
On 7 December 2012 13:47, Rich Mattes richmattes@gmail.com wrote:
It might be an electric to fuerte migration issue: see [1]. The opencv2 ros stack was removed from fuerte in favor of using the system's opencv libraries. You should be able to remove the dependency on the opencv2 package, and use the system-installed version instead.
Aha -- thanks for pointing me in the right direction. That was part of the problem; the other issue was that using the "desktop" variant didn't actually install all of the ros packages that I needed, so I used the combination of roslocate + rosinstall to install the rest of them. And the software is now running! Hooray!
Thanks for all your help. I look forward to seeing ROS packages appearing in Fedora at some point.
MEF
On Fri, 2012-12-07 at 16:36 +0000, Mary Ellen Foster wrote:
Aha -- thanks for pointing me in the right direction. That was part of the problem; the other issue was that using the "desktop" variant didn't actually install all of the ros packages that I needed, so I used the combination of roslocate + rosinstall to install the rest of them. And the software is now running! Hooray!
Thanks for all your help. I look forward to seeing ROS packages appearing in Fedora at some point.
MEF
Hi Mary, Rich,
Would you folks have an srpm uploaded somewhere with the patch that I could use please? I tried patching up the srpm from fedora git, but the patch fails somehow. Any chance you documented what additional packages you needed to install to get your stuff working Mary?
Rich, there are two patches at the ticket[1]. Which one do you suggest I use? Would you remember what version it was generated against? It fails against both the 1.6 release tar from upstream and the source in fedora git (which I expect must be the same).
I've been updating the ros wiki page on Fedora installs[2] as I go along so it might help others.
This is my spec currently[3]. I might make the rpm available on fedorapeople for folks who want to use ros once I get it to build correctly.
[1] http://dev.pointclouds.org/issues/699
[2] http://www.ros.org/wiki/fuerte/Installation/Fedora
[3] http://paste.fedoraproject.org/5772/63915932/
Hi Mary, Rich,
Would you folks have an srpm uploaded somewhere with the patch that I could use please? I tried patching up the srpm from fedora git, but the patch fails somehow. Any chance you documented what additional packages you needed to install to get your stuff working Mary?
Rich, there are two patches at the ticket[1]. Which one do you suggest I use? Would you remember what version it was generated against? It fails against both the 1.6 release tar from upstream and the source in fedora git (which I expect must be the same).
I've been updating the ros wiki page on Fedora installs[2] as I go along so it might help others.
This is my spec currently[3]. I might make the rpm available on fedorapeople for folks who want to use ros once I get it to build correctly.
Hi Ankur,
You're using the correct patch (the rosintegration-v2 patch.) It was created against PCL 1.6.0, so it should apply cleanly when using the current srpm. I tried it last night, and it seems to be working OK (I didn't sit through the whole build process though, just through CMake and the first couple files)
You do have to do a couple of extra steps after you apply the patch though. First, you need to source /path/to/ros/setup.sh at the beginning of the %build section. Then you need to add -DUSE_ROS=ON to the CMake command. You should see some CMake output along the lines of "Found ROS, using ROS" during the build.
The build that I tried last night was against the ROS Fuerte underlay from my copr[1], if you're interested I could create a ros-fuerte-pcl srpm and build it there pretty easily.
Rich
[1] http://copr-fe.cloud.fedoraproject.org/coprs/detail/rmattes/ros-fuerte/
On Fri, 2013-03-22 at 09:04 -0400, Rich Mattes wrote:
You're using the correct patch (the rosintegration-v2 patch.) It was created against PCL 1.6.0, so it should apply cleanly when using the current srpm. I tried it last night, and it seems to be working OK (I didn't sit through the whole build process though, just through CMake and the first couple files)
Hi Rich,
I think the other patches are conflicting with the ros integration patch:
Patch0: PCL-1.4.0-Source-fedora.patch
Is this patch still required? It's for 1.4? My spec is here:
http://paste.fedoraproject.org/5892/93885136
The build that I tried last night was against the ROS Fuerte underlay from my copr[1], if you're interested I could create a ros-fuerte-pcl srpm and build it there pretty easily.
At the moment, I need to run fuerte on my fedora system for work, somehow. It'd be great if you could provide a pcl package that would work :)
PS: The project I'm working on might shift to Groovy in the near future. Some folks tried it and said that there are huge improvements in Groovy. I might look into packaging Groovy in the near future.
On 03/23/2013 10:58 PM, Ankur Sinha wrote:
The build that I tried last night was against the ROS Fuerte underlay from my copr[1], if you're interested I could create a ros-fuerte-pcl srpm and build it there pretty easily.
At the moment, I need to run fuerte on my fedora system for work, somehow. It'd be great if you could provide a pcl package that would work :)
PS: The project I'm working on might shift to Groovy in the near future. Some folks tried it and said that there are huge improvements in Groovy. I might look into packaging Groovy in the near future.
Hi Ankur,
I diffed my local patch against the one in PCL ticket 699, turns out I did modify it to make it work with the Fedora package at some point (and didn't rename it...ugh.) So I threw it up on my fedorapeople site for now[1]. It's going to take me a while to spin up an SRPM that can install to /opt with the rest of my ros fuerte packages, so in the meantime feel free to play with the patch. It should apply cleanly to the Fedora srpm in master, and you'll have to make sure to source the setup.sh and add -DUSE_ROS=ON to the CMake call like I specified in the earlier email.
Packaging groovy to install to /usr is going to be a giant pain, but definitely give it a try. I posted what I have so far on my fedorapeople if you want to check it out[2]. The build order should be similar to the order in [3].
Rich
[1] http://rmattes.fedorapeople.org/ros-fuerte/pcl-1.6.0-rosintegration.patch [2] http://rmattes.fedorapeople.org/ros-groovy/ [3] http://rmattes.fedorapeople.org/ros-fuerte/fuerte-repobuild.txt
robotics@lists.fedoraproject.org