jsk-ros-pkg / geneus

3 stars 16 forks source link

[geneus/geneus_main.py] fix to use catkin_pkg.paackage to get only exec_depends] #20

Closed k-okada closed 9 years ago

k-okada commented 9 years ago

@wkentaro, please check if this ok for you

k-okada commented 9 years ago

it may need something similar to #17

wkentaro commented 9 years ago

Okay, I can check this by tonight.

wkentaro commented 9 years ago

actually i dont understand something similar.

wkentaro commented 9 years ago

It raises

$ python gen_eus.py geneus -m -o .
[WARNING] python-rospkg is not found in ROS_PACKAGE_PATH
Traceback (most recent call last):
  File "/home/wkentaro/semi/src/geneus/src/geneus/geneus_main.py", line 125, in genmain
    pkg_dependences = package_depends(pkg) + args[2:]   # args[1] ARG_PKG
  File "/home/wkentaro/semi/src/geneus/src/geneus/geneus_main.py", line 75, in package_depends
    for d in solve_depends_order(depends_impl):
  File "/home/wkentaro/semi/src/geneus/src/geneus/geneus_main.py", line 65, in solve_depends_order
    unsolved = filter(lambda x: x not in solved, rp.get_depends(d, False))
  File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 223, in get_depends
    m = self.get_manifest(name)
  File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 163, in get_manifest
    return self._load_manifest(name)
  File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 207, in _load_manifest
    retval = self._manifests[name] = parse_manifest_file(self.get_path(name), self._manifest_name, rospack=self)
  File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 199, in get_path
    raise ResourceNotFound(name, ros_paths=self._ros_paths)
ResourceNotFound: python-rospkg
wkentaro commented 9 years ago

in the first place, should we see only <run_depends> not <build_depends>?

wkentaro commented 9 years ago

I thought message files are generated while building, so <build_depend> is appropriate.

k-okada commented 9 years ago
k-okada@kokada-t440s:~/ros/indigo_parent/src/geneus$ ./scripts/gen_eus.py
geneus -m -o .
WARNING: Package "ompl" does not follow the version conventions. It should
not contain leading zeros (unless the number is 0).
k-okada@kokada-t440s:~/ros/indigo_parent/src/geneus$ git branch
  add_executable
  const_to_symbol
  fix_depend3
* fix_depend4
  fix_depends2
  fix_get_depends
  master

i have different output and yes, we'd see only run_depends, because when you install package A as deb package, then apt-get did not install package B which is only build depend to A

◉ Kei Okada

On Sat, Apr 18, 2015 at 4:05 PM, Kentaro Wada notifications@github.com wrote:

in the first place, should we see only not ?

— Reply to this email directly or view it on GitHub https://github.com/jsk-ros-pkg/geneus/pull/20#issuecomment-94135833.

wkentaro commented 9 years ago

fix_depend4 does not raise such error. But manifest.l generated by

$ ./script/gen_eus.py jsk_2014_picking_challenge -m -o .

does not contains jsk_recognition_msgs as dependencies.

;;
;; DO NOT EDIT THIS FILE
;;
(ros::load-ros-package "rosserial_arduino")
(ros::load-ros-package "sound_play")
(ros::load-ros-package "std_msgs")
(ros::load-ros-package "actionlib_msgs")
(ros::load-ros-package "actionlib")
(ros::load-ros-package "dynamic_reconfigure")
(ros::load-ros-package "geometry_msgs")
(ros::load-ros-package "jsk_interactive_marker")
(ros::load-ros-package "posedetection_msgs")
(ros::load-ros-package "jsk_2014_picking_challenge")

that is problem.

k-okada commented 9 years ago

do you have jsk_visualization package in you workspace? if you use jsk_visualization under /opt/ros/indigo, then manifest.l for these package is generated by old geneus

wkentaro commented 9 years ago

Yes, I have jsk_visualization in my workspace.

k-okada commented 9 years ago

Please try after removing deb packages of jsk_visualization

◉ Kei Okada

2015/04/18 18:50、Kentaro Wada notifications@github.com のメッセージ:

Yes, I have jsk_visualization in my workspace.

— Reply to this email directly or view it on GitHub.

wkentaro commented 9 years ago

It is not solved.

k-okada commented 9 years ago

Humm, it solved in my environment, did you solve this in #18 ? which manifest.xml is different.

wkentaro commented 9 years ago

Yes it is solved in #18 . What is manifest.xml?

wkentaro commented 9 years ago

Just for confirmation, did you mean remove ros packages installed from apt-get in

Please try after removing deb packages of jsk_visualization

specifically, like below?

$ sudo aptitude remove ros-indigo-jsk-rviz-plugins ros-indigo-interactive-marker ...
wkentaro commented 9 years ago

There is no (ros::load-ros-package "jsk_recognition_msgs") in the manifest.l which is generated by geneus in #20 . By removing ros packages in jsk_visualization which is installed via apt, will it be solved?

k-okada commented 9 years ago

manifest.xml -> manifest.l

And what is difference between #18 and #20

2015年4月19日日曜日、Kentaro Wadanotifications@github.comさんは書きました:

Yes it is solved in #18 https://github.com/jsk-ros-pkg/geneus/pull/18 . What is manifest.xml?

— Reply to this email directly or view it on GitHub https://github.com/jsk-ros-pkg/geneus/pull/20#issuecomment-94248714.

◉ Kei Okada

k-okada commented 9 years ago

Yes

2015年4月19日日曜日、Kentaro Wadanotifications@github.comさんは書きました:

Just for confirmation, did you mean remove ros packages installed from apt-get in

Please try after removing deb packages of jsk_visualization specifically, like below?

$ sudo aptitude remove ros-indigo-jsk-rviz-plugins ros-indigo-interactive-marker ...

— Reply to this email directly or view it on GitHub https://github.com/jsk-ros-pkg/geneus/pull/20#issuecomment-94248824.

◉ Kei Okada

wkentaro commented 9 years ago

And what is difference between #18 and #20

I think the packages included in manifest.l is same. in #18, I rearrange package dependencies to avoid not found error in manifest.l.

wkentaro commented 9 years ago

Both #18 and #20 finds dependencies from run_depend in package.xml. I used same codes in #18 as #20 to get dependencies.

k-okada commented 9 years ago

but you said #18 works and #20 did not. Is it correct? should we merge #18, I think #20 is better because it can get rid of old RosPack() interface.

◉ Kei Okada

On Sun, Apr 19, 2015 at 5:02 PM, Kentaro Wada notifications@github.com wrote:

Both #18 https://github.com/jsk-ros-pkg/geneus/pull/18 and #20 https://github.com/jsk-ros-pkg/geneus/pull/20 finds dependencies from run_depend in package.xml. I used same codes in #18 https://github.com/jsk-ros-pkg/geneus/pull/18 as #20 https://github.com/jsk-ros-pkg/geneus/pull/20 to get dependencies.

— Reply to this email directly or view it on GitHub https://github.com/jsk-ros-pkg/geneus/pull/20#issuecomment-94250001.

wkentaro commented 9 years ago

The difference between #18 and #20 is just the rearrangement (https://github.com/jsk-ros-pkg/geneus/pull/18/files#diff-3b84e240f81b3651ac8336f3a5a15846R67) and etc.

20 does not work because it does not catch error like (https://github.com/jsk-ros-pkg/geneus/pull/18/files#diff-3b84e240f81b3651ac8336f3a5a15846R60) .

And also in #20 RosPack() is used here (https://github.com/jsk-ros-pkg/geneus/pull/20/files#diff-3b84e240f81b3651ac8336f3a5a15846R57) .

wkentaro commented 9 years ago

Do you mean #21 as code which does not use RosPack() ?

k-okada commented 9 years ago

yes, #21, not #20

◉ Kei Okada

On Mon, Apr 20, 2015 at 8:22 PM, Kentaro Wada notifications@github.com wrote:

Do you mean #21 https://github.com/jsk-ros-pkg/geneus/pull/21 as code which does not use RosPack() ?

— Reply to this email directly or view it on GitHub https://github.com/jsk-ros-pkg/geneus/pull/20#issuecomment-94427542.

k-okada commented 9 years ago

not work because it does not catch error like ( https://github.com/jsk-ros-pkg/geneus/pull/18/files#diff-3b84e240f81b3651ac8336f3a5a15846R60) . As far as I understand correctly, this happens if you have system dependency in depends[] and that is avoided by using package_list here https://github.com/jsk-ros-pkg/geneus/pull/21/files#diff-3b84e240f81b3651ac8336f3a5a15846R79

◉ Kei Okada

On Mon, Apr 20, 2015 at 8:21 PM, Kentaro Wada notifications@github.com wrote:

The difference between #18 https://github.com/jsk-ros-pkg/geneus/pull/18 and #20 https://github.com/jsk-ros-pkg/geneus/pull/20 is just the rearrangement ( https://github.com/jsk-ros-pkg/geneus/pull/18/files#diff-3b84e240f81b3651ac8336f3a5a15846R67) and etc.

20 https://github.com/jsk-ros-pkg/geneus/pull/20 does not work because

it does not catch error like ( https://github.com/jsk-ros-pkg/geneus/pull/18/files#diff-3b84e240f81b3651ac8336f3a5a15846R60) .

And also in #20 https://github.com/jsk-ros-pkg/geneus/pull/20 RosPack() is used here ( https://github.com/jsk-ros-pkg/geneus/pull/20/files#diff-3b84e240f81b3651ac8336f3a5a15846R57) .

— Reply to this email directly or view it on GitHub https://github.com/jsk-ros-pkg/geneus/pull/20#issuecomment-94427418.

wkentaro commented 9 years ago

Actually, I don't know why the dependencies generated by #21 is so few.

wkentaro commented 9 years ago

I sent another commit to #18 . https://github.com/wkentaro/geneus/commit/839c49dccd92d7f75c8c05c7c7674414fa9f3dd2

It does not use rospkg but catkin.

k-okada commented 9 years ago

closed via #18