Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use latest hrpsys when hrpsys is built on kinetic, in case libpcl-dev and libopenni2-dev exist #1091

Merged
merged 6 commits into from
Apr 20, 2020

Conversation

pazeshun
Copy link
Collaborator

@pazeshun pazeshun commented Apr 8, 2020

Includes #1092

We want to use source of released hrpsys, but building it fails on kinetic when libpcl-dev and libopenni2-dev exist.
Until fkanehiro/hrpsys-base#1242 is released on kinetic, we have to use latest hrpsys on kinetic.
Details: #1090 (comment)

Also, I found some typos in README which I overlooked at #1090 , so this PR fixes them and format README.
Sorry for overlooking.

@pazeshun pazeshun force-pushed the fix-src-build-kinetic-openni2 branch from 900c79e to abba160 Compare April 8, 2020 05:37
@Naoki-Hiraoka
Copy link
Contributor

I checked this PR works with source of openhrp3 and hrpsys on kinetic in my laptop.
Thank you!

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
wstool init .
wstool set rtmros_common https://github.com/start-jsk/rtmros_common --git -y
wstool merge https://raw.githubusercontent.com/start-jsk/rtmros_common/master/.travis.rosinstall -y
wstool merge https://raw.githubusercontent.com/start-jsk/rtmros_common/900c79e005a77a1544716eabb5f921aacca2a9ed/.travis.rosinstall.kinetic -y
wstool update 
cd ..
source /opt/ros/kinetic/setup.bash
rosdep install -r --from-paths src --ignore-src -y
catkin build
source devel/setup.bash
rtmlaunch hrpsys_ros_bridge samplerobot.launch 

@pazeshun pazeshun force-pushed the fix-src-build-kinetic-openni2 branch from abba160 to d31ff40 Compare April 8, 2020 06:09
@pazeshun pazeshun changed the title [WIP] Use latest hrpsys when hrpsys is built on kinetic, in case libopenni2-dev exists Use latest hrpsys when hrpsys is built on kinetic, in case libopenni2-dev exists Apr 8, 2020
@pazeshun pazeshun changed the title Use latest hrpsys when hrpsys is built on kinetic, in case libopenni2-dev exists [WIP] Use latest hrpsys when hrpsys is built on kinetic, in case libopenni2-dev exists Apr 8, 2020
@pazeshun pazeshun force-pushed the fix-src-build-kinetic-openni2 branch from d31ff40 to 2993174 Compare April 8, 2020 09:57
@pazeshun pazeshun changed the title [WIP] Use latest hrpsys when hrpsys is built on kinetic, in case libopenni2-dev exists Use latest hrpsys when hrpsys is built on kinetic, in case libpcl-dev and libopenni2-dev exist Apr 8, 2020
@pazeshun
Copy link
Collaborator Author

pazeshun commented Apr 8, 2020

There is some misunderstanding (about libpcl-dev), so I updated #1092 and this PR.

pazeshun added 3 commits April 8, 2020 19:33
… and libopenni2-dev exist

We want to use source of released hrpsys, but building it fails on kinetic when libpcl-dev and libopenni2-dev exist.
Waiting for fkanehiro/hrpsys-base#1242 to be released.
Details: start-jsk#1090 (comment)
@pazeshun pazeshun force-pushed the fix-src-build-kinetic-openni2 branch from 2993174 to 826344d Compare April 8, 2020 10:35
@pazeshun
Copy link
Collaborator Author

pazeshun commented Apr 9, 2020

Travis test with USE_DEB=false failed on kinetic:

[Testcase: testhrpsys_tool_config_interactive] ... FAILURE!



                                                                                
FAILURE: Test Fixture Nodes ['hrpsys'] failed to launch


                                                                                
  File "/usr/lib/python2.7/unittest/case.py", line 329, in run



                                                                                
    testMethod()


                                                                                
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rostest/runner.py", line 121, in fn


                                                                                
    self.assert_(not failed, "Test Fixture Nodes %s failed to launch"%failed)


                                                                                
  File "/usr/lib/python2.7/unittest/case.py", line 422, in assertTrue


                                                                                
    raise self.failureException(msg)
[Testcase: testhztest_tf] ... FAILURE!


                                                                                
FAILURE: Test Fixture Nodes ['hrpsys'] failed to launch



                                                                                
  File "/usr/lib/python2.7/unittest/case.py", line 329, in run


                                                                                
    testMethod()


                                                                                
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rostest/runner.py", line 121, in fn


                                                                                
    self.assert_(not failed, "Test Fixture Nodes %s failed to launch"%failed)


                                                                                
  File "/usr/lib/python2.7/unittest/case.py", line 422, in assertTrue


                                                                                
    raise self.failureException(msg)


                                                                                
--------------------------------------------------------------------------------


                                                                                
[Testcase: testpa10] ... FAILURE!


                                                                                
FAILURE: Test Fixture Nodes ['hrpsys'] failed to launch


                                                                                
  File "/usr/lib/python2.7/unittest/case.py", line 329, in run


                                                                                
    testMethod()


                                                                                
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rostest/runner.py", line 121, in fn


                                                                                
    self.assert_(not failed, "Test Fixture Nodes %s failed to launch"%failed)


                                                                                
  File "/usr/lib/python2.7/unittest/case.py", line 422, in assertTrue


                                                                                
    raise self.failureException(msg)

and so on.
@Naoki-Hiraoka Please be careful, this PR may not be complete.
Now I'm debugging.

@pazeshun
Copy link
Collaborator Author

pazeshun commented Apr 9, 2020

I understand what is happening.

Issue Summary

The reason why travis test with USE_DEB=false failed on kinetic is that hrpsys-simulator is not compiled.
This is caused by racking of libopencv-dev.

Issue Details

The error message says the node hrpsys doesn't exist.
This node is hrpsys-simulator in hrpsys package (declared here).
hrpsys-simulator is compiled only when OpenCV was found by pkg_check_modules (see here and here, note that we are using linux, not APPLE).
To install OpenCV by rosdep, dependency to cv_bridge is written in package.xml of hrpsys-base (see here)

However, on kinetic, cv_bridge depends on opencv3 (ros-kinetic-opencv3) (see here), while it depends on libopencv-dev on indigo and melodic.
So rosdep installs opencv3 on kinetic.
As described here, find_package(OpenCV) can find opencv3, but we use pkg_check_modules(OpenCV opencv) which cannot find opencv3 (I'm not sure its reason, but the behavior implies that).
This causes skipping of compiling hrpsys-simulator.

This is already known issue, so hrpsys for releasing on kinetic depends on libopencv-dev directly instead of cv_bridge (see here).
So far, we doesn't face the issue thanks to using this released hrpsys, but this PR changes it to original hrpsys and the issue emerges again.

Why @Naoki-Hiraoka doesn't face that issue is that libopencv-dev is already installed in his PC. When you have installed ros-kinetic-hrpsys, libopencv-dev has been automatically installed and you can skip that issue.

@pazeshun
Copy link
Collaborator Author

pazeshun commented Apr 9, 2020

Solution

Though I'm not sure why the fixing commit is not in any pull requests to original hrpsys, I think merging that commit to original hrpsys is straight and easy fix, because changing pkg_check_modules to find_package is drastic and we have to check in many platforms.

Merging to original hrpsys may take long time, so we need some temporary fix.
I think we should install libopencv-dev explicitly on travis using EXTRA_DEBS and add instruction to install libopencv-dev manually in README.
Another solution is to add libopencv-dev to dependency of hrpsys_tools, but it seems strange.

Now I understood that ros-hydro-opencv2, which cv_bridge depends in hydro era, can be found by pkg_check_modules.
This means ros-kinetic-opencv3 should be an exception.
In general, we should use cv_bridge for OpenCV dependency (recommendation can be found here and here), so we should keep using cv_bridge for forward compatibility based on the assumption that ros-kinetic-opencv3 is an exception.

Therefore, on kinetic, we need some makeshift fixes.
I think we should install libopencv-dev explicitly on travis using EXTRA_DEB and add instruction to install libopencv-dev manually in README.
Another solution is replacing cv_bridge to libopencv-dev only on kinetic travis test using sed like https://github.com/jsk-ros-pkg/jsk_travis/blob/0.5.9/travis.sh#L303.
But I don't like this because this leaves diff after README.

@pazeshun
Copy link
Collaborator Author

@Naoki-Hiraoka I solved the issue and travis passed.
Maybe your current environment already includes libopencv-dev, so there is no problem, but be careful when you change your environment.

@Naoki-Hiraoka
Copy link
Contributor

I understand. Thank you !

@pazeshun pazeshun force-pushed the fix-src-build-kinetic-openni2 branch from cbea109 to 0281486 Compare April 10, 2020 14:32
@k-okada k-okada merged commit 73c2c21 into start-jsk:master Apr 20, 2020
@pazeshun pazeshun deleted the fix-src-build-kinetic-openni2 branch June 22, 2020 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants