Coder Social home page Coder Social logo

rospack's Introduction

rospack

A command-line tool for retrieving information about ROS packages available on the filesystem.

Installation

Install this with catkin.

tinyxml2

With tinyxml2 versions 4.0.0 and 4.0.1 XML parsing of ROS packages will fail for <?xml-model ... lines due to a bug (see #77). To fix this use versions 2.X, 3.X or >=5. Additionally the ROS apt repositories provide a patched version (4.0.1-2) which also works with rospack for all platform/architecture pairs targeted by ROS Lunar.

rospack's People

Contributors

130s avatar arne48 avatar davetcoleman avatar dirk-thomas avatar esteve avatar gerkey avatar gnu-srs avatar hashworks avatar hershwg avatar iory avatar jacobperron avatar johnsonshih avatar jspricke avatar k-okada avatar mathias-luedtke avatar mikaelarguedas avatar nikolausdemmel avatar racko avatar rhaschke avatar roehling avatar seanyen avatar simonschmeisser avatar sloretz avatar stefanfabian avatar stonier avatar tobias-fischer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rospack's Issues

overwrites PKG_CONFIG_PATH incorrectly (08/23/12)

Migrated from code.ros.org, issue #4034
Reported by: bedahr
https://code.ros.org/trac/ros/ticket/4034

Description

Today, while setting up ROS on a Gentoo system, I encountered the problem that rospack did not find a package that pkg-config, when invoked directly, would find just fine: bedahr@eucleia ~/ros $ /opt/ros/fuerte/bin/rospack cflags-only-I rosjava_jni Package roscpp was not found in the pkg-config search path. Perhaps you should add the directory containing `roscpp.pc' to the PKG_CONFIG_PATH environment variable No package 'roscpp' found bedahr@eucleia ~/ros $ pkg-config --cflags roscpp -I/opt/ros/fuerte/include

After a lot of messing about, I found out that something in rospack seems to overwrite PKG_CONFIG_PATH to a relative path related to the location of the package. For std_msgs this resulted in: PKG_CONFIG_PATH=/opt/ros/fuerte/share/std_msgs/../../lib/pkgconfig But for roscpp, which was installed in the users installation path, this became: PKG_CONFIG_PATH=/home/bedahr/ros/roscpp/../../lib/pkgconfig

It's worth mentioning that even locally installed packages seem to install the .pc file to /opt/ros/fuerte/lib/pkgconfig

As a fix, I would suggest to simply append to instead of overwriting PKG_CONFIG_PATH.

add circular dependency detection/help (04/08/12)

Migrated from code.ros.org, issue #3919
Reported by: tfoote
https://code.ros.org/trac/ros/ticket/3919

Description

Right now rospack just errors when the recursion depth is too deep. This error could easily be extended to detect and print the full cycle of the self recursion.

It would help people in this situation: http://answers.ros.org/question/12626/circular-dependency

Change History

follow-up: ↓ 2 Changed 9 months ago by gerkey

priority changed from major to minor
status changed from new to assigned
type changed from defect to enhancement
Indeed, that would be useful. In the meantime, you can do something like

rospack deps-indent > foo
Ctrl-C it after a bit, then look at the file to try to figure out where things go off the rails.

http://ros.org/doc/api/rospkg/html/rospack.html#rospack-depends-indent-package

in reply to: ↑ 1 Changed 9 months ago by gerkey

Replying to gerkey:

{{{ rospack deps-indent > foo }}}

That should have a package name in it, e.g.:

rospack deps-indent my_package > foo

rospack picks up the wrong opencv libs

rospack picks up the wrong opencv libs.

I have opencv2.4.9 libs installed in /usr/local/lib/, and an older version (2.4.8) in /usr/lib/x86_64-linux-gnu/.

cmake find_package reports the correct libs
find_package(OpenCV 2.4.9 EXACT REQUIRED)
message("OpenCV_INCLUDE_DIRS: ${OpenCV_INCLUDE_DIRS}") -> /usr/local/include/opencv/
message("OpenCV_LIBRARIES: ${OpenCV_LIBRARIES}") -> opencv_viz;opencv_videostab; etc
message("OpenCV_LIBRARY_DIRS: ${OpenCV_LIBRARY_DIRS}") -> "" (is this a problem?)

$ rospack libs-only-l my_package
gives:
... /usr/lib/x86_64-linux-gnu/libopencv_videostab.so.2.4.8 :/usr/lib/x86_64-linux-gnu/libopencv_video.so.2.4.8 :/usr/lib/x86_64-linux-gnu/libopencv_superres.so.2.4.8 :/usr/lib/x86_64-linux-gnu/libopencv_stitching.so.2.4.8 :/usr/lib/x86_64-linux-gnu/libopencv_photo.so.2.4.8 ...: etc

Does rospack use a cache? How can I clear it?

Errors when including rospack/rospack.h

I wanted to use the Rospack class from rospack, but once I included the header, I got the following error:

/opt/ros/hydro/include/rospack/rospack.h:521:1: error: expected identifier before string constant
/opt/ros/hydro/include/rospack/rospack.h:521:1: error: expected ‘,’ or ‘...’ before string constant
/opt/ros/hydro/include/rospack/rospack.h:520:10: error: invalid use of ‘::’
/opt/ros/hydro/include/rospack/rospack.h:529:1: error: expected identifier before string constant
/opt/ros/hydro/include/rospack/rospack.h:529:1: error: expected ‘,’ or ‘...’ before string constant
/opt/ros/hydro/include/rospack/rospack.h:528:10: error: invalid use of ‘::’

New release?

Hi,

with gentoo and archlinux there are already at least two distributions with boost 1.65. They now rely on backported patches or checking out lunar-devel instead of downloading the release to work around the removal of TR1.

How about a new release? :)

"Unsupported Pickle Protocol: 4" when calling rospack depends returning

Slowly working my way through the ROS tutorials. I followed the install instructions for Ubuntu 16.04 here (http://wiki.ros.org/kinetic/Installation/Ubuntu) and all seemed to go ok. After creating the workspace and a beginner_tutorials package, I tried following the tutorial by running rospack depends1 beginner_tutorials but this failed giving me the following error:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/rosdep2/rospack.py", line 59, in init_rospack_interface
    lookup = _get_default_RosdepLookup(Options())
  File "/usr/lib/python2.7/dist-packages/rosdep2/main.py", line 130, in _get_default_RosdepLookup
    verbose=options.verbose)
  File "/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py", line 633, in create_default
    sources = load_cached_sources_list(sources_cache_dir=sources_cache_dir, verbose=verbose)
  File "/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py", line 533, in load_cached_sources_list
    return parse_sources_data(cache_data, origin=cache_index, model=model)
  File "/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py", line 388, in parse_sources_data
    raise InvalidData('line:\n\t%s\n%s' % (line, e), origin=origin)
rosdep2.core.InvalidData: line:
	yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
unsupported pickle protocol: 4
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/rosdep2/rospack.py", line 59, in init_rospack_interface
    lookup = _get_default_RosdepLookup(Options())
  File "/usr/lib/python2.7/dist-packages/rosdep2/main.py", line 130, in _get_default_RosdepLookup
    verbose=options.verbose)
  File "/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py", line 633, in create_default
    sources = load_cached_sources_list(sources_cache_dir=sources_cache_dir, verbose=verbose)
  File "/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py", line 533, in load_cached_sources_list
    return parse_sources_data(cache_data, origin=cache_index, model=model)
  File "/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py", line 388, in parse_sources_data
    raise InvalidData('line:\n\t%s\n%s' % (line, e), origin=origin)
rosdep2.core.InvalidData: line:
	yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
unsupported pickle protocol: 4
[rospack] Error: could not call python function 'rosdep2.rospack.init_rospack_interface'

Googling it hasn't turned up anything useful. Apparently it could be some kind of python2 vs python3 issue but I'm not sure. Any thoughts?

The name of depends1 command argument is ridiculous

I'm a new ROS user, but a programmer for many years, and now that I'm learning ROS I find a command call like:

rospack depends1 ....

For any user is not obvious that depends1 refers to inmediate dependencies, a different attribute name is required.

$rospack find throws exception error

rospack find is giving runtime errors on my beaglebone board. Other rospack commands are running fine like rospack depends.
Here is the screenshot


and here is the error message :
debian@beaglebone:~/catkin_ws$ rospack find
terminate called after throwing an instance of 'rospack::Exception'
what(): error parsing manifest of package class_loader at /home/debian/ros_catkin_ws/install_isolated/share/class_loader/package.xml
Aborted

also after writing $rosrun and pressing tab it is throwing exception error written below :

debian@beaglebone:~/catkin_ws$ rosrun terminate called after throwing an instance of 'rospack::Exception'
what(): error parsing manifest of package class_loader at /home/debian/ros_catkin_ws/install_isolated/share/class_loader/package.xml

although $ rosrun <pkg_name> <node_name> is running completely fine when typing the whole command without using tab
with using tab the console is like this ;

debian@beaglebone:~/catkin_ws$ rosrun ros_o3d_wall_f find: '': No such file or directory
o3d-find: '': No such file or directory
find: '': No such file or directory

o3d-pub o3d-sub

here i pressed tab after $rosrun ros_o3d_wall_f . And then there was this line added "find: no such file or directory" then again i pressed tab and line added was o3d-find: no such file or directory and when i pressed tab for the third time it should me the two nodes o3d -pub and o3d-sub.
can someone explain me this anomalous behavior.
i have installed ros on my board from source files as apt-get repository was unable to find it.

'boost/tr1/unordered_set.hpp' file not found

I understand that new versions of boost don''t have tr1 file but in Kinetic-devel branch it is still included in the code which throws this error.
since lunar is still not supported for OSX I am trying to install Kinetic with No avail.
OSX: 10.13
ROS-Kinetic

screenshot 2018-08-29 at 10 41 31 pm

rospack depends should list all (un)resolved dependencies when it exits with non-zero

We have a debian package build script that uses rospack depends to gather the dependencies it has to build.
However, some packages may have dependencies that are not ROS packages, e.g., moveit_planners_ompl which depends on ompl.

$ rospack depends moveit_planners_ompl
[rospack] Error: package 'moveit_planners_ompl' depends on non-existent package 'ompl'
and rosdep claims that it is not a system dependency. Check the ROS_PACKAGE_PATH
or try calling 'rosdep update'

While rosdep can resolve ompl, it is not in the keys collection since it's not a ROS package.
The current behavior is to exit prematurely with an error which is not really optimal.

I would suggest to either add an argument to ignore the errors (since there is already a parameter to do so in the relevant method) or improve the lookup to not fail in such cases.

I think it would also be better to print errors to the error stream and continue instead of throwing but that would be a significant change in behavior.

If you tell me which changes would be preferred, I would be happy to submit a PR.

Alternatively, I assume we would have to use rosdep keys and do the recursion on our own?

popen problem on qnx

  1. In librospack (rospack.cpp), the cache file name is created to be ".rospack_cache.XXXXXX". While in function _read_rospack_cache() of roslib/packages.py, it expects the file to be "rospack_cache".
    313 try:
    314 with open(os.path.join(rospkg.get_ros_home(), 'rospack_cache')) as f:

  2. In function get_pkg_dir() of roslib/packages.py, when the cache is checked (line 161), the file checked is manifest.xml. In fact, many packages now have package.xml only. Therefore, the condition to check is the existence of either manifest.xml or package.xml.
    158 if package in pkg_dir_cache:
    159 dir
    , rr, rpp = pkg_dir_cache[package]
    160 if rr == ros_root and rpp == ros_package_path:
    161 if os.path.isfile(os.path.join(dir
    , MANIFEST_FILE)):
    162 return dir_
    163 else:
    164 # invalidate cache
    165 _invalidate_cache(_pkg_dir_cache)

Require specific versions of tinyxml2

I just had a problem with rospack and tinyxml2 Version 4, XML parsing failed on the <?xml-model ... lines.

Would it be possible to require specific versions of tinyxml2? Installing version 5 fixed the issue for me.

nao_logger.py ImportErro: No module named qi

Hey guys, I am trying to connect my nao via remote pc to ros and am running into some issues. It seems that I have my python path set correctly using

export PYTHONPATH=~/pynaoqi/pynaoqi-python-2.7-naoqi-1.14-linux32/:$PYTHONPATH

and when I run individual nodes it seems to connect to them fine except for the nao_logger.py node upon which I receive the following error.

Traceback (most recent call last): File "/opt/ros/hydro/lib/nao_driver/nao_logger.py", line 24, in import qi

does anyone know what is causing this and how to fix it? Thank you so much.

Linking Error -- Fails to link with boost

In preparation for the next release, I am getting started on the new Gentoo install. I have hist the first of many walls here. I am absolutely clueless as to why this isn't building. I have Boost installed:

allenh1@localhost ~/ros_catkin_ws/build_isolated/rospack
$ ls /usr/lib64 | grep boost
libboost_atomic-mt.so
libboost_atomic.a
libboost_atomic.so
libboost_atomic.so.1.56.0
libboost_chrono-mt.so
libboost_chrono.a
libboost_chrono.so
libboost_chrono.so.1.56.0
libboost_container-mt.so
libboost_container.a
libboost_container.so
libboost_container.so.1.56.0
libboost_date_time-mt.so
libboost_date_time.a
libboost_date_time.so
libboost_date_time.so.1.56.0
libboost_exception.a
libboost_filesystem-mt.so
libboost_filesystem.a
libboost_filesystem.so
libboost_filesystem.so.1.56.0
libboost_graph-mt.so
libboost_graph.a
libboost_graph.so
libboost_graph.so.1.56.0
libboost_iostreams-mt.so
libboost_iostreams.a
libboost_iostreams.so
libboost_iostreams.so.1.56.0
libboost_locale-mt.so
libboost_locale.a
libboost_locale.so
libboost_locale.so.1.56.0
libboost_log-mt.so
libboost_log.a
libboost_log.so
libboost_log.so.1.56.0
libboost_log_setup-mt.so
libboost_log_setup.a
libboost_log_setup.so
libboost_log_setup.so.1.56.0
libboost_math_c99-mt.so
libboost_math_c99.a
libboost_math_c99.so
libboost_math_c99.so.1.56.0
libboost_math_c99f-mt.so
libboost_math_c99f.a
libboost_math_c99f.so
libboost_math_c99f.so.1.56.0
libboost_math_c99l-mt.so
libboost_math_c99l.a
libboost_math_c99l.so
libboost_math_c99l.so.1.56.0
libboost_math_tr1-mt.so
libboost_math_tr1.a
libboost_math_tr1.so
libboost_math_tr1.so.1.56.0
libboost_math_tr1f-mt.so
libboost_math_tr1f.a
libboost_math_tr1f.so
libboost_math_tr1f.so.1.56.0
libboost_math_tr1l-mt.so
libboost_math_tr1l.a
libboost_math_tr1l.so
libboost_math_tr1l.so.1.56.0
libboost_prg_exec_monitor-mt.so
libboost_prg_exec_monitor.a
libboost_prg_exec_monitor.so
libboost_prg_exec_monitor.so.1.56.0
libboost_program_options-mt.so
libboost_program_options.a
libboost_program_options.so
libboost_program_options.so.1.56.0
libboost_random-mt.so
libboost_random.a
libboost_random.so
libboost_random.so.1.56.0
libboost_regex-mt.so
libboost_regex.a
libboost_regex.so
libboost_regex.so.1.56.0
libboost_serialization-mt.so
libboost_serialization.a
libboost_serialization.so
libboost_serialization.so.1.56.0
libboost_signals-mt.so
libboost_signals.a
libboost_signals.so
libboost_signals.so.1.56.0
libboost_system-mt.so
libboost_system.a
libboost_system.so
libboost_system.so.1.56.0
libboost_test_exec_monitor.a
libboost_thread-mt.so
libboost_thread.a
libboost_thread.so
libboost_thread.so.1.56.0
libboost_timer-mt.so
libboost_timer.a
libboost_timer.so
libboost_timer.so.1.56.0
libboost_unit_test_framework-mt.so
libboost_unit_test_framework.a
libboost_unit_test_framework.so
libboost_unit_test_framework.so.1.56.0
libboost_wave-mt.so
libboost_wave.a
libboost_wave.so
libboost_wave.so.1.56.0
libboost_wserialization-mt.so
libboost_wserialization.a
libboost_wserialization.so
libboost_wserialization.so.1.56.0

And yet, this is what happens when I build attempt to build:

allenh1@localhost ~/ros_catkin_ws/build_isolated/rospack
$ sudo /opt/ros/kinetic/env.sh make -j8 -l1
[ 55%] Built target rospack
[ 66%] Linking CXX executable /home/allenh1/ros_catkin_ws/devel_isolated/rospack/bin/rospack
/home/allenh1/ros_catkin_ws/devel_isolated/rospack/lib/librospack.so: undefined reference to `boost::program_options::detail::cmdline::cmdline(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)'
/home/allenh1/ros_catkin_ws/devel_isolated/rospack/lib/librospack.so: undefined reference to `boost::program_options::arg[abi:cxx11]'
/home/allenh1/ros_catkin_ws/devel_isolated/rospack/lib/librospack.so: undefined reference to `boost::program_options::to_internal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/allenh1/ros_catkin_ws/devel_isolated/rospack/lib/librospack.so: undefined reference to `boost::program_options::abstract_variables_map::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/home/allenh1/ros_catkin_ws/devel_isolated/rospack/lib/librospack.so: undefined reference to `boost::program_options::validate(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, int)'
/home/allenh1/ros_catkin_ws/devel_isolated/rospack/lib/librospack.so: undefined reference to `boost::program_options::options_description::options_description(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)'
/home/allenh1/ros_catkin_ws/devel_isolated/rospack/lib/librospack.so: undefined reference to `boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool) const'
collect2: error: ld returned 1 exit status
CMakeFiles/rospackexe.dir/build.make:103: recipe for target '/home/allenh1/ros_catkin_ws/devel_isolated/rospack/bin/rospack' failed
make[2]: *** [/home/allenh1/ros_catkin_ws/devel_isolated/rospack/bin/rospack] Error 1
CMakeFiles/Makefile2:264: recipe for target 'CMakeFiles/rospackexe.dir/all' failed
make[1]: *** [CMakeFiles/rospackexe.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

Any ideas? I suspect this is some kind of issue on my end, but I figured this was worth bringing to your attention.

Use common FindTinyXML.cmake module

There is a new package called cmake_modules, which we just created:

https://github.com/ros/cmake_modules

It provides a common FindTinyXML.cmake CMake module, which we should all try to use in order to prevent issues when doing things like cross-compiling.

This is a low priority, but a good idea. The package is available for Hydro and Groovy, it will be in public on the next sync.

TinyXML(2) might cause problems with the XSD schema now often attached due to the new package format (V2)

This is more a general problem caused by the wide use of TinyXML(2).
But to me it became the most apparent in rospack as this package provides the commandline tool and basic library to deal with ROS packages.

The problem is based on the lightweight approach of TinyXML(2) in which they don't support the parsing of schemas. see What it doesn't do
This property combined with the provided schema in REP140 led several developers to add it into their package.xmls.
In my minimal installation I found that this was already done in pluginlib, nodelet_core, bondpy, test_bond, bondcpp, bond_core, smclib, dynamic_reconfigure, bond and class_loader.

The updates containing the schema are quite new and I don't know if their are any changes already planned to address this potential issue.

According particularly to rospack one solution would be to switch to a more complex parser which supports schemas. But this will obviously not affect packages which don't use rospack but using TinyXML(2) themselves to parse package.xmls.
A more global approach would be to avoid the addition of the schema to the package.xml and maybe provide a dedicated library to verify them if needed. Doing so would preserve the wide usage of TinyXML(2).

Coverity - TOCTOU time-of-check, time-of-use race condition

Event fs_check_call: | Calling function "stat" to perform check on "cache_path.c_str()".

if(stat(cache_path.c_str(), &s) == 0)

Event toctou: Calling function "fopen" that uses "cache_path.c_str()" after a check function. This can cause a time-of-check, time-of-use race condition.

rospack/src/rospack.cpp

Lines 2116 to 2125 in 3358d21

if(stat(cache_path.c_str(), &s) == 0)
{
double dt = difftime(time(NULL), s.st_mtime);
// Negative cache_max_age means it's always new enough. It's dangerous
// for the user to set this, but rosbash uses it.
if ((cache_max_age > 0.0) && (dt > cache_max_age))
return NULL;
}
// try to open it
FILE* cache = fopen(cache_path.c_str(), "r");

Depends incorrectly fails for 'non-existant' package libuvc

For the package libuvc_camera, rospack depends fails with the message:

[rospack] Error: package 'libuvc_camera' depends on non-existent package 'libuvc' and rosdep claims that it is not a system dependency. Check the ROS_PACKAGE_PATH or try calling 'rosdep update'

But rosdep resolve libuvc works as expected:

#apt
ros-melodic-libuvc

Any idea what could cause this?

Coverity - code unreachable

Event unreachable: Since the loop increment "el = el->NextSiblingElement..." is unreachable, the loop body will never execute more than once.

for(tinyxml2::XMLElement* el = root->FirstChildElement("name"); el; el = el->NextSiblingElement("name"))

Avoid Python linkage?

Because rospack links to Python, roslib, roscpp, and ultimately most of lib/lib*.so on a typical ROS 1 workspace links to Python. Ideally, base libraries should be python-free, with the python dependency encapsulated in an so in the lib/pythonx.y/(dist|site)-packages directory structure somewhere.

However, the actual usage here is pretty minimal— the only functions which call though to Python are:

  • Rosstackage::cpp_exports
  • Rosstackage::reorder_paths
  • Rosstackage::isSysPackage

And none of them seem particularly dependent on doing anything interactive or "fancy" with the Python interface, that is, they could just as easily be accomplished by parsing the stdout of a Python subprocess. Would a PR which changes to this approach be considered?

Alternatively, a build-time flag could be considered which simply ifdef-excludes this functionality, since it seems to be mostly about supporting an extremely legacy rosmake/rosbuild build setup?

rosdep non-optional for 'rosdep plugins'

I ran into this today after installing groovy on quantal:

The install instructions (http://www.ros.org/wiki/groovy/Installation/Ubuntu) suggest that installing rosdep and rosinstall is optional. However, 'rospack plugins' will not run without running 'rosdep update' first, which will make tools like RViz fail to load.

To reproduce, run

rm -rf ~/.ros/rosdep
rospack plugins --attrib=plugin rviz

This will give you the error:

[rospack] Error: the rosdep view is empty: call 'sudo rosdep init' and 'rosdep update'

Not sure if that should be considered a bug in rospack or if the documentation should just be more explicit about 'sudo rosdep init; rosdep update' being required steps in the installation.

rospack cache files created with 000 permissions

The permissions on these files make no sense. Why write a file that no one can read?

phil@marble-XPS-15-9560:~$ cp -a .ros/ /tmp/ros_backup
cp: cannot open '.ros/rospack_cache_02946445166995464026' for reading: Permission denied
phil@marble-XPS-15-9560:~$ ls -lah .ros/rospack_cache_*
---------- 1 phil phil 6.0K Mar  3 12:07 .ros/rospack_cache_02946445166995464026

https://answers.ros.org/question/351675/rospack-cache-files-in-ros-directory-with-no-access-rights/

deps-manifests doesn't work on hydro

I have a problem on Hydro running on Ubuntu 12.04
I tried installing ar_pose on seperate rosbuild workspace, but I had issues.
It seems like rospack deps-manifests is not working.

Traceback (most recent call last):
  File "/usr/lib/python2.7/site.py", line 562, in <module>
    main()
  File "/usr/lib/python2.7/site.py", line 544, in main
    known_paths = addusersitepackages(known_paths)
  File "/usr/lib/python2.7/site.py", line 271, in addusersitepackages
    user_site = getusersitepackages()
  File "/usr/lib/python2.7/site.py", line 246, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "/usr/lib/python2.7/site.py", line 236, in getuserbase
    USER_BASE = get_config_var('userbase')
  File "/usr/lib/python2.7/sysconfig.py", line 577, in get_config_var
    return get_config_vars().get(name)
  File "/usr/lib/python2.7/sysconfig.py", line 476, in get_config_vars
    _init_posix(_CONFIG_VARS)
  File "/usr/lib/python2.7/sysconfig.py", line 337, in _init_posix
    makefile = _get_makefile_filename()
  File "/usr/lib/python2.7/sysconfig.py", line 331, in _get_makefile_filename
    return os.path.join(get_path('platstdlib').replace("/usr/local","/usr",1), "config" + (sys.pydebug and "_d" or ""), "Makefile")
AttributeError: 'module' object has no attribute 'pydebug'

Problem is the when I open python I can access pydebug from sys module.
I changed this file /usr/lib/python2.7/sysconfig.py to print sys.executable and it's running correct python from /usr/bin/python, from which I can access pydebug.

I did a small work around and hardcoded 'False' instead of sys.pydebug, but after I receive other error

     import subprocess
   File "/usr/lib/python2.7/subprocess.py", line 429, in <module>
      import select
  ImportError: No module named select
  Error in sys.excepthook:
  Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
      from io import StringIO
    File "/usr/lib/python2.7/io.py", line 60, in <module>
      import _io
  ImportError: /usr/lib/python2.7/lib-dynload/_io.so: undefined symbol: PyUnicodeUCS4_EncodeUTF32

  Original exception was:
  Traceback (most recent call last):
    File "/usr/lib/pymodules/python2.7/rosdep2/__init__.py", line 40, in <module>
      from .installers import InstallerContext, Installer, \
    File "/usr/lib/pymodules/python2.7/rosdep2/installers.py", line 32, in <module>
      import subprocess
    File "/usr/lib/python2.7/subprocess.py", line 429, in <module>
      import select
  ImportError: No module named select
  [rospack] Error: could not find python module 'rosdep2.rospack'. is rosdep up-to-date (at least 0.10.4)?

but my version of rosdep is 0.10.27, so I have no idea what is wrong with this.

Thank in advance

rospack depends geometry_msgs vs rosmsg packages Header

Hi,

I am using ROS Fuerte on Ubuntu 12.04 and I have some problem in understanding the consistency of the output of the following two commands:

$rospack depends geometry_msgs:

$rosmsg packages Header
...
gazebo_msgs
gazebo_plugins
geometry_msgs <--
hpPackage
...

So geometry_msgs is using the Header message from std_msgs, but geometry_msgs does not depend on std_msgs. One example of using the Header message is geometry_msgs/TwistStamped:

$rosmsg show geometry_msgs/TwistStamped
std_msgs/Header header <--
uint32 seq
time stamp
string frame_id
geometry_msgs/Twist twist
geometry_msgs/Vector3 linear
float64 x
float64 y
float64 z
geometry_msgs/Vector3 angular
float64 x
float64 y
float64 z

Isn't it a bug?

Best Regards, Stephan

p.s.: We had a discussion on answers.ros.org and came to the conclusion, that we should file this issue here. The address to the discussion on answers.ros.org is http://answers.ros.org/question/53333/rospack-depends-geometry_msgs-vs-rosmsg-packages-header

rospack depend does not resolve distribution dependencies

When running
rospack depend application

Following error is retrieved
[rospack] Error: package 'application' depends on non-existent package 'opencv3' and rosdep claims that it is not a system dependency. Check the ROS_PACKAGE_PATH or try calling 'rosdep update'.

Where application depends on opencv3 as a package dependency. Shouldn't it be able to resolve this?
https://github.com/ros/rosdistro/blob/master/kinetic/distribution.yaml
It can be found here

rospack segfaults SIGSEGV on Groovy, Precise, 32b

Originally asked here (http://goo.gl/JKJn3), and I can confirm this happens on my fresh-installed Precise 32 bit with Groovy (on VMWare Player). I've never seen this has happened on 64b machines.

Setting up ros-groovy-rospack (2.1.15-0precise-20121225-1325-+0000)

rosuserin@precise:~$ uname -a
Linux ubuntu 3.2.0-29-generic-pae #46-Ubuntu SMP Fri Jul 27 17:25:43 UTC 2012 i686 i686 i386 GNU/Linux
rosuserin@precise:~$ sudo apt-get update & apt-get dist-upgrade 
rosuserin@precise:~$ echo "source /opt/ros/groovy/setup.bash" >> ~/.bashrc
rosuserin@precise:~$ . ~/.bashrc
rosuserin@precise:~$ rospack depends1 roscpp
Segmentation fault (core dumped)
rosuserin@precise:~$ gdb rospack
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /opt/ros/groovy/bin/rospack...(no debugging symbols found)...done.
(gdb) run depends1 roscpp
Starting program: /opt/ros/groovy/bin/rospack depends1 roscpp
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0xb7a29112 in PyObject_IsTrue () from /usr/lib/libpython2.7.so.1.0
(gdb) bt
#0  0xb7a29112 in PyObject_IsTrue () from /usr/lib/libpython2.7.so.1.0
#1  0xb7fabc40 in rospack::Rosstackage::isSysPackage(std::string const&) () from /opt/ros/groovy/lib/librospack.so
#2  0xb7fac8ee in rospack::Rosstackage::computeDepsInternal(rospack::Stackage*, bool, std::string const&) ()
   from /opt/ros/groovy/lib/librospack.so
#3  0xb7faccb6 in rospack::Rosstackage::computeDeps(rospack::Stackage*, bool) () from /opt/ros/groovy/lib/librospack.so
#4  0xb7fac8b9 in rospack::Rosstackage::computeDepsInternal(rospack::Stackage*, bool, std::string const&) ()
   from /opt/ros/groovy/lib/librospack.so
#5  0xb7faccb6 in rospack::Rosstackage::computeDeps(rospack::Stackage*, bool) () from /opt/ros/groovy/lib/librospack.so
#6  0xb7fac8b9 in rospack::Rosstackage::computeDepsInternal(rospack::Stackage*, bool, std::string const&) ()
   from /opt/ros/groovy/lib/librospack.so
#7  0xb7faccb6 in rospack::Rosstackage::computeDeps(rospack::Stackage*, bool) () from /opt/ros/groovy/lib/librospack.so
#8  0xb7fac8b9 in rospack::Rosstackage::computeDepsInternal(rospack::Stackage*, bool, std::string const&) ()
   from /opt/ros/groovy/lib/librospack.so
#9  0xb7faccb6 in rospack::Rosstackage::computeDeps(rospack::Stackage*, bool) () from /opt/ros/groovy/lib/librospack.so
#10 0xb7fac8b9 in rospack::Rosstackage::computeDepsInternal(rospack::Stackage*, bool, std::string const&) ()
   from /opt/ros/groovy/lib/librospack.so
#11 0xb7faccb6 in rospack::Rosstackage::computeDeps(rospack::Stackage*, bool) () from /opt/ros/groovy/lib/librospack.so
#12 0xb7fadbdf in rospack::Rosstackage::depsDetail(std::string const&, bool, std::vector<rospack::Stackage*, std::allocator<rospack::Stackage*> >&) () from /opt/ros/groovy/lib/librospack.so
#13 0xb7fb29e2 in rospack::Rosstackage::deps(std::string const&, bool, std::vector<std::string, std::allocator<std::string> >&)
    () from /opt/ros/groovy/lib/librospack.so
#14 0xb7fc2496 in rospack::rospack_run(int, char**, rospack::Rosstackage&, std::string&) ()
   from /opt/ros/groovy/lib/librospack.so
#15 0x0804892e in main ()

Many std::string implicitely converted into char *

I have noticed that rospack.cpp contains many std::string implicitely converted into char *
eg std::string lang is used in
for(TiXmlElement* ele2 = ele->FirstChildElement(lang);

But FirstChildElement() expects a char*
So it should be
for(TiXmlElement* ele2 = ele->FirstChildElement(lang.c_str());

Probably with g++ it is OK, but with clang (I am under OS X) no.

May I do a pull request with the appopriate calls to c_str() when std::string are implicitely converted into char * ?

Prevent recursion in ROS_ROOT/ROS_PACKAGE_PATH ?

Recursion in ROS_ROOT/ROS_PACKAGE_PATH is pretty much useless now, since AFAIK all package.xml are located in the top-level subdirectory of each package.

Recursion is costly. For instance, with ROS_PACKAGE_PATH=${HOME}/openrobots/i386-ubuntu1204/share (NFS mounted), i get the following figures:

% rospack profile
Full tree crawl took 13.936435 seconds.
[...]
-------------------------------------------------------------
13.281717   /home/mallet/openrobots/i386-ubuntu1204/share
4.857618 * /home/mallet/openrobots/i386-ubuntu1204/share/doc
4.087676 * /home/mallet/openrobots/i386-ubuntu1204/share/blender

I know that rospack will skip "rospack_nosubdir" files, but in my case I don't want to pollute external packages (like 'blender' above) with alien files :)

What about turning ROS_PACKAGE_PATH into a "no-recursion" by default (as for every other PATH variable like PYTHONPATH), and maybe enabling the recursion with a special syntax like double / ending or maybe a trailing /* (like in TEXINPUTS) such as:

ROS_PACKAGE_PATH=/path/recurse/me//:/path/do/not/recurse
or
ROS_PACKAGE_PATH=/path/recurse/me/*:/path/do/not/recurse

(or the opposite: a special syntax to not recurse, like ROS_PACKAGE_PATH=/path/do/not/recurse/--:/path/recurse/me )

what do you think?

EDIT: one level of recursion is still of course wanted, since given a /path/to/dir one wants to find /path/to/dir/pkg1/package.xml, but I think you got my idea anyway :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.