Summary: | dev-util/catkin-0.7.1 uses "ROS_PACKAGE_PATH=/usr/share" so "rospack list" reports multiple errors | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sven Wehner <sven> |
Component: | Eclasses | Assignee: | Robot Operating System team <ros> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | gentoo-bugs |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Sven Wehner
2016-09-24 08:55:38 UTC
That was something I never managed to tackle properly. You could ignore the warnings, they're harmless. However, rospack/rospkg crawls the whole /usr/share hierarchy which is *very* slow. I've followed your suggestion and made catkin install package.xml files into /usr/share/ros_packages/$PKG/package.xml. This should fixes all the issues, however, everyone needs to rebuild *ALL* ros packages in order to get the changes, see the postinst warning in >=dev-util/catkin-0.7.1-r2. I'm also trying to get ROS working on my laptop using only portage. When I install dev-ros/pointcloud_to_laserscan and run it with rosrun I get error messages about missing XML: --- snippet --- > rosrun pointcloud_to_laserscan pointcloud_to_laserscan_node [ERROR] [1478948192.291873429]: Skipping XML Document "/usr/share/ros_packages/test_nodelet_topic_tools/test/test_nodelets.xml" which had no Root Element. This likely means the XML is malformed or missing. [ERROR] [1478948192.291926503]: Skipping XML Document "/usr/share/ros_packages/test_nodelet/test_nodelet.xml" which had no Root Element. This likely means the XML is malformed or missing. [ERROR] [1478948192.291941547]: Skipping XML Document "/usr/share/ros_packages/depth_image_proc/nodelet_plugins.xml" which had no Root Element. This likely means the XML is malformed or missing. [ERROR] [1478948192.291959169]: Skipping XML Document "/usr/share/ros_packages/stereo_image_proc/nodelet_plugins.xml" which had no Root Element. This likely means the XML is malformed or missing. [ERROR] [1478948192.291978421]: Skipping XML Document "/usr/share/ros_packages/image_publisher/nodelet_plugins.xml" which had no Root Element. This likely means the XML is malformed or missing. [ERROR] [1478948192.291998651]: Skipping XML Document "/usr/share/ros_packages/image_view/nodelet_plugins.xml" which had no Root Element. This likely means the XML is malformed or missing. [ERROR] [1478948192.292016187]: Skipping XML Document "/usr/share/ros_packages/pointcloud_to_laserscan/nodelets.xml" which had no Root Element. This likely means the XML is malformed or missing. [ERROR] [1478948192.292035250]: Skipping XML Document "/usr/share/ros_packages/pcl_ros/pcl_nodelets.xml" which had no Root Element. This likely means the XML is malformed or missing. [ERROR] [1478948192.292052647]: Skipping XML Document "/usr/share/ros_packages/image_rotate/nodelet_plugins.xml" which had no Root Element. This likely means the XML is malformed or missing. [ERROR] [1478948192.292070149]: Skipping XML Document "/usr/share/ros_packages/nodelet_tutorial_math/nodelet_math.xml" which had no Root Element. This likely means the XML is malformed or missing. [ERROR] [1478948192.292092511]: Skipping XML Document "/usr/share/ros_packages/image_proc/nodelet_plugins.xml" which had no Root Element. This likely means the XML is malformed or missing. --- end of snippet --- It seems like this is due to the ${prefix} used in many package.xml (for example: https://github.com/ros-perception/pointcloud_to_laserscan/blob/317e389eb3f44636e51e8d56a1156d7af9d5e1be/package.xml#L36). According to the comment on the following forum question, ${prefix} is the parent directory of the package.xml (e.g. /usr/share/ros_packages/pointcloud_to_laserscan). http://answers.ros.org/question/205562/the-value-of-prefix-in-packagexml/ I think this means that the XML files that rosrun can't find need to be in the same directory as package.xml. I can think of two solutions to this problem: 1. patch package.xml and change ${prefix} to /usr/share/${PN} 2. install the whole ros distro in /opt/ros Although I understand it could cause some confusion when transitioning to option 2, I think it would cause less issues down the road if we follow where the ROS docs also install it to. > emerge --info Portage 2.3.0 (python 2.7.10-final-0, default/linux/amd64/13.0, gcc-5.4.0, glibc-2.22-r4, 4.4.26-gentoo x86_64) ================================================================= System uname: Linux-4.4.26-gentoo-x86_64-Intel-R-_Core-TM-_i7-6700HQ_CPU_@_2.60GHz-with-gentoo-2.2 KiB Mem: 16343688 total, 11552184 free KiB Swap: 33042428 total, 33042428 free Timestamp of repository gentoo: Mon, 31 Oct 2016 02:30:01 +0000 sh bash 4.3_p48 ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1 app-shells/bash: 4.3_p48::gentoo dev-lang/perl: 5.22.2::gentoo dev-lang/python: 2.7.10-r1::gentoo, 3.4.3-r1::gentoo dev-util/cmake: 3.6.2::gentoo dev-util/pkgconfig: 0.28-r2::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.21.7::gentoo sys-apps/sandbox: 2.10-r1::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69::gentoo sys-devel/automake: 1.14.1::gentoo, 1.15::gentoo sys-devel/binutils: 2.25.1-r1::gentoo sys-devel/gcc: 5.4.0::gentoo sys-devel/gcc-config: 1.7.3::gentoo sys-devel/libtool: 2.4.6::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers) sys-libs/glibc: 2.22-r4::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 ros-overlay location: /var/lib/layman/ros-overlay masters: gentoo priority: 0 local_overlay location: /usr/local/portage/local_overlay masters: gentoo priority: 1 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" BOOTSTRAP_USE="cxx unicode internal-glib python_targets_python3_4 python_targets_python2_7 multilib" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe" CFLAGS_amd64="-m64" CFLAGS_x32="-mx32" CFLAGS_x86="-m32" CHOST="x86_64-pc-linux-gnu" CHOST_amd64="x86_64-pc-linux-gnu" CHOST_x32="x86_64-pc-linux-gnux32" CHOST_x86="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="-av --keep-going" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FETCHCOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port= ; exec rsync --rsh=\"ssh \${port:+-p\${port}} \${3}\" -avP \"\${host}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}" "${PORTAGE_SSH_OPTS}"" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" IUSE_IMPLICIT="abi_x86_64 prefix prefix-guest" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LDFLAGS_amd64="-m elf_x86_64" LDFLAGS_x32="-m elf32_x86_64" LDFLAGS_x86="-m elf_i386" MAKEOPTS="-j9" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" PROFILE_ONLY_VARIABLES="ARCH ELIBC IUSE_IMPLICIT KERNEL USERLAND USE_EXPAND_IMPLICIT USE_EXPAND_UNPREFIXED USE_EXPAND_VALUES_ARCH USE_EXPAND_VALUES_ELIBC USE_EXPAND_VALUES_KERNEL USE_EXPAND_VALUES_USERLAND" USE="X acl alsa amd64 berkdb bzip2 cli cracklib crypt cxx dri flac fortran gdbm gif gtk3 iconv ipv6 jpeg mmx mmxext modules mp3 multilib ncurses nls nptl openmp pam pcre png readline seccomp session sse sse2 ssl tcpd unicode vim-syntax xattr xft xinerama zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="nvidia intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Hi guys, I found the same problem when porting ROS to Debian. Instead of changing the directory, I've limited the search depth for /usr/share. See my patches here: https://anonscm.debian.org/cgit/debian-science/packages/ros/ros-rospack.git/tree/debian/patches/0004-Limit-search-depth-for-usr-share.patch https://anonscm.debian.org/cgit/debian-science/packages/ros/ros-rospkg.git/tree/debian/patches/0002-Limit-search-in-usr-share.patch afaik this should be fine when using catkin, but I'm open for discussion and talking to upstream about it as well. P.S.: Great to see that you are installing ROS into /usr as well. You can find a lot of patches for that in the Debian repos: https://anonscm.debian.org/cgit/debian-science/packages/ros (*/debian/patches) Would be great to combine our efforts here, so maybe we can get upstream to accept them. Cheers Jochen |