Skip to content

Commit

Permalink
Rebase from 'debian/noetic/openhrp3'
Browse files Browse the repository at this point in the history
  • Loading branch information
k-okada committed Jun 13, 2022
1 parent 56a4872 commit 1777a93
Show file tree
Hide file tree
Showing 73 changed files with 1,401 additions and 486 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
on:
push:
branches:
# - master
pull_request:

env:
DISPLAY: '0:0'

jobs:
linuxs:
runs-on: ubuntu-latest
# continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
include:
- ROS_DISTRO: indigo
CONTAINER: ubuntu:14.04
- ROS_DISTRO: kinetic
CONTAINER: ubuntu:16.04
- ROS_DISTRO: melodic
CONTAINER: ubuntu:18.04
- ROS_DISTRO: noetic
CONTAINER: ubuntu:20.04

container: ${{ matrix.CONTAINER }}

steps:
- name: Checkout
uses: actions/checkout@v2

- name: remove esm repos
if: ${{ matrix.CONTAINER == 'ubuntu:14.04' }}
run: sudo rm /etc/apt/sources.list.d/ubuntu-esm-infra-trusty.list ## fix Err https://esm.ubuntu.com trusty-infra-security/main amd64 Packages, gnutls_handshake() failed: Handshake failed

- name: Run test
shell: bash
run: |
set -x
export ROS_DISTRO=${{ matrix.ROS_DISTRO }}
ls -al
. ./.travis.sh
31 changes: 31 additions & 0 deletions .github/workflows/trusty-hrpsys-util.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
diff --git a/util/simulator/CMakeLists.txt b/util/simulator/CMakeLists.txt
index beb53389..2fb81821 100644
--- a/util/simulator/CMakeLists.txt
+++ b/util/simulator/CMakeLists.txt
@@ -32,12 +32,20 @@ add_library(hrpsysext SHARED
PyShape.cpp
)

-find_package(Boost REQUIRED COMPONENTS python)
-target_link_libraries(hrpsysext
- Boost::python
- hrpsysUtil
- ${PYTHON_LIBRARIES}
- )
+find_package(Boost COMPONENTS python)
+if(Boost_python_FOUND) # Boost::python released since 1.67 https://www.boost.org/doc/libs/1_71_0/libs/python/doc/html/rn.html
+ target_link_libraries(hrpsysext
+ Boost::python
+ hrpsysUtil
+ ${PYTHON_LIBRARIES}
+ )
+else()
+ target_link_libraries(hrpsysext
+ boost_python
+ hrpsysUtil
+ ${PYTHON_LIBRARIES}
+ )
+endif()

set_target_properties(hrpsysext PROPERTIES PREFIX "")
set_target_properties(hrpsysext PROPERTIES SUFFIX ".so")
51 changes: 51 additions & 0 deletions .travis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/usr/bin/env bash

set -x
set -e

export TZ=Asia/Tokyo; echo "${TZ}" > /etc/timezone # configure tzdata
apt-get update -qq
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
apt-get install -y -qq git wget gnupg lsb-release build-essential
# Define some config vars
export CI_SOURCE_PATH=$(pwd)
export REPOSITORY_NAME=${PWD##*/}
echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME"
if [[ "$ROS_DISTRO" == "hydro" || "$ROS_DISTRO" == "jade" || "$ROS_DISTRO" == "lunar" ]]; then
sh -c 'echo "deb http://snapshots.ros.org/$ROS_DISTRO/final/ubuntu $(lsb_release -sc) main" >> /etc/apt/sources.list.d/ros-latest.list'
apt-key adv --keyserver keyserver.ubuntu.com --recv-key 0xCBF125EA
else
sh -c 'echo "deb http://packages.ros.org/ros-testing/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
wget http://packages.ros.org/ros.key -O - | apt-key add -
fi
apt-get update -qq
apt-get install dpkg -y # for https://github.com/ros/rosdistro/issues/19481
# install: # Use this to install any prerequisites or dependencies necessary to run your build
apt-get install -qq -y f2c libopencv-dev libf2c2 libf2c2-dev doxygen cmake libeigen3-dev libjpeg-dev git jython libatlas-base-dev libboost-all-dev libpng-dev
apt-get install -qq -y collada-dom-dev || apt-get install -qq -y libcollada-dom2.4-dp-dev # libcollada-dom2.4 for melodic
apt-get install -qq -y ros-$ROS_DISTRO-openrtm-aist ros-$ROS_DISTRO-mk ros-$ROS_DISTRO-rosbuild ros-$ROS_DISTRO-rostest ros-$ROS_DISTRO-roslang
apt-get install -qq -y ros-$ROS_DISTRO-openrtm-aist-python || echo "try without openrtm-aist-python"
apt-get install -qq -y python-rosdep || apt-get install -qq -y python3-rosdep
cd $CI_SOURCE_PATH
# before_script: # Use this to prepare your build for testing e.g. copy database configurations, environment variables, etc.
source /opt/ros/$ROS_DISTRO/setup.bash
# script: # All commands must exit with code 0 on success. Anything else is considered failure.
export ROS_PARALLEL_JOBS="-j2 -l2"
mkdir -p ~/ws/src
ln -sf ${CI_SOURCE_PATH} ~/ws/src/${REPOSITORY_NAME}
git clone http://github.com/fkanehiro/hrpsys-base ~/ws/src/hrpsys
patch -d ~/ws/src/hrpsys -p1 < ${CI_SOURCE_PATH}/.github/workflows/trusty-hrpsys-util.patch
sed -i "s@if(ENABLE_DOXYGEN)@if(0)@" ~/ws/src/hrpsys/CMakeLists.txt # disable doc generation
cd ~/ws
rosdep init
rosdep update --include-eol-distros
rosdep install -r -q -n --from-paths src --ignore-src --rosdistro $ROS_DISTRO -y || echo "use libpng-dev in package.xml"
catkin_make_isolated

if [[ "$ROS_DISTRO" == "noetic" ]]; then exit 0; fi
source devel_isolated/setup.bash
export ROS_PACKAGE_PATH=`pwd`/devel_isolated:$ROS_PACKAGE_PATH
export EXIT_STATUS=0; [ "`find devel_isolated/openhrp3/share/openhrp3 -iname '*.test'`" == "" ] && echo "[openhrp3] No tests ware found!!!" || find devel_isolated/openhrp3/share/openhrp3 -iname "*.test" -print0 | xargs -0 -n1 rostest || export EXIT_STATUS=$?; [ $EXIT_STATUS == 0 ]
/etc/init.d/omniorb4-nameserver stop || echo "stop omniserver just in case..."
export EXIT_STATUS=0; [ "`find devel_isolated/hrpsys/share/hrpsys -iname '*.test'`" == "" ] && echo "[hrpsys] No tests ware found!!!" || find devel_isolated/hrpsys/share/hrpsys -iname "*.test" -print0 | xargs -0 -n1 rostest || export EXIT_STATUS=$?; [ $EXIT_STATUS == 0 ]

48 changes: 12 additions & 36 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,13 @@
language:
- cpp
- python
python:
- "2.7"
compiler:
- gcc
before_install: # Use this to prepare the system to install prerequisites or dependencies
# Define some config vars
- export CI_SOURCE_PATH=$(pwd)
- export REPOSITORY_NAME=${PWD##*/}
- echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME"
- sudo sh -c 'echo "deb http://packages.ros.org/ros-shadow-fixed/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list'
- wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
- sudo apt-get update -qq
install: # Use this to install any prerequisites or dependencies necessary to run your build
- sudo apt-get install -qq -y f2c libf2c2 libf2c2-dev doxygen cmake libeigen3-dev libjpeg-dev collada-dom-dev git jython libatlas-base-dev libboost-all-dev libpng12-dev
- sudo apt-get install -qq -y ros-hydro-openrtm-aist ros-hydro-openrtm-aist-python ros-hydro-mk ros-hydro-rosbuild ros-hydro-rostest ros-hydro-roslang python-rosdep
- cd $CI_SOURCE_PATH
before_script: # Use this to prepare your build for testing e.g. copy database configurations, environment variables, etc.
- source /opt/ros/hydro/setup.bash
sudo: required
dist: bionic
service: docker
env:
matrix:
# travis + jsk jenkins
- ROS_DISTRO=hydro DOCKER_IMAGE=ubuntu:12.04
- ROS_DISTRO=indigo DOCKER_IMAGE=ubuntu:14.04
- ROS_DISTRO=kinetic DOCKER_IMAGE=ubuntu:16.04
- ROS_DISTRO=melodic DOCKER_IMAGE=ubuntu:18.04
script: # All commands must exit with code 0 on success. Anything else is considered failure.
- export ROS_PARALLEL_JOBS="-j2 -l2"
- mkdir -p ~/ws/src
- ln -sf ${CI_SOURCE_PATH} ~/ws/src/${REPOSITORY_NAME}
- git clone http://github.com/fkanehiro/hrpsys-base ~/ws/src/hrpsys
- cd ~/ws
- sudo rosdep init
- rosdep update
- rosdep install -r -q -n --from-paths src --ignore-src --rosdistro hydro -y
- catkin_make_isolated
- source devel_isolated/setup.bash
- export ROS_PACKAGE_PATH=`pwd`/devel_isolated:$ROS_PACKAGE_PATH
- export EXIT_STATUS=0; [ "`find devel_isolated/openhrp3/share/openhrp3 -iname '*.test'`" == "" ] && echo "[openhrp3] No tests ware found!!!" || find devel_isolated/openhrp3/share/openhrp3 -iname "*.test" -print0 | xargs -0 -n1 rostest || export EXIT_STATUS=$?; [ $EXIT_STATUS == 0 ]
- sudo /etc/init.d/omniorb4-nameserver stop || echo "stop omniserver just in case..."
- export EXIT_STATUS=0; [ "`find devel_isolated/hrpsys/share/hrpsys -iname '*.test'`" == "" ] && echo "[hrpsys] No tests ware found!!!" || find devel_isolated/hrpsys/share/hrpsys -iname "*.test" -print0 | xargs -0 -n1 rostest || export EXIT_STATUS=$?; [ $EXIT_STATUS == 0 ]
after_failure:
- docker run --rm -v $(pwd):/root/ -e ROS_DISTRO -ti $DOCKER_IMAGE /bin/bash -c "cd /root/; source ./.travis.sh | grep -v '\(Preparing to\|Selecting previously\|Setting up\|Unpacking \|Processing \|Collada \)' | grep -v '\(Joint\|Segment\) node' | grep -v -- '-- \(Up-to-date\|Installing\|Set runtime path\|Removed\)' | grep -v '^Scanning dependencies' | grep -v '%] \(Generating\|Building\)'" | sed 's/\x1b\[.*]*//g' | sed '/^$/d'

100 changes: 100 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,106 @@
Changelog for package openhrp3
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

3.1.10 (2022-06-10)
-------------------

* hrplib/hrpModel

* [hrplib/hrpModel/ForwardDynamicsCBM.cpp] check equation num in solveUnknownAccels (`#155 <https://github.com/fkanehiro/openhrp3/issues/155>`_)
* [hrplib/hrpModel] Calculation of the mass of a portion of the kinematic chain (`#142 <https://github.com/fkanehiro/openhrp3/issues/142>`_)

* Add calcTotalMass to LinkTraverse
* Added calcJacobianDot to JointPath
* Calculation of the spatial velocity

* [hrplib/hrpModel/ModelNodeSet.cpp] change the way to check existence of children field (`#139 <https://github.com/fkanehiro/openhrp3/issues/139>`_)
* [hrpModel/JointPath.cpp] try to enforce joint limits in calcInverseKinetatics() (`#137 <https://github.com/fkanehiro/openhrp3/issues/137>`_)
* [hrplib/hrpModel/JointPath.cpp] add local_p arg for calcJacobian (`#127 <https://github.com/fkanehiro/openhrp3/issues/127>`_)

* fix local_p coordinate
* add local_p arg for calcJacobian

* hrplib/hrpPlanner

* [hrplib/hrpPlanner] fix warnings(-Wdelete-incomplete) (`#138 <https://github.com/fkanehiro/openhrp3/issues/138>`_)
* [hrplib/hrpPlanner/TimeUtil.cpp] add stdint.h to use uint64_t on arm, close `#123 <https://github.com/fkanehiro/openhrp3/issues/123>`_ (`#124 <https://github.com/fkanehiro/openhrp3/issues/124>`_)

* hrplib/hrpCollision

* [hrplib/hrpCollision] enable to bypass normal vector correction (`#141 <https://github.com/fkanehiro/openhrp3/issues/141>`_)
* [hrpCollision] add ColdetModelPair::operator=() (`#136 <https://github.com/fkanehiro/openhrp3/issues/136>`_)


* hrplib/hrpUtil

* [hrplib/hrpUtil/EasyScanner.cpp] Always use locale-free variant of strtod (`#144 <https://github.com/fkanehiro/openhrp3/issues/144>`_)
* [hrplib/hrpUtil/testEigen3d.cpp] Fix C++11 support (`#134 <https://github.com/fkanehiro/openhrp3/issues/134>`_)

* server/ModelLoader

* [server/ModelLoader/projectGenerator.cpp] write peridoic.rate to conf file (`#156 <https://github.com/fkanehiro/openhrp3/issues/156>`_)
* [server/ModelLoader/ColladaWriter.h] Apply abs when computing max_torque (`#153 <https://github.com/fkanehiro/openhrp3/issues/153>`_)
* [server/ModelLoader/ColladaWriter.h] Fix missing return statement (`#152 <https://github.com/fkanehiro/openhrp3/issues/152>`_)
* [server/ModelLoader] Check if segment node is defined (`#135 <https://github.com/fkanehiro/openhrp3/issues/135>`_)
* [server/ModelLoader/ColladaWriter.h] Changed ambientcolor (`#133 <https://github.com/fkanehiro/openhrp3/issues/133>`_)

* sample

* [sample/model/sample1_bush.wrl] add comma (`#154 <https://github.com/fkanehiro/openhrp3/issues/154>`_)

* CMake

* [CMakeLists.txt, hrplib/hrpCorba/CMakeLists.txt] add an option COMPILE_PYTHON_STUFF
* [CMakeLists.txt, cmake_modules/FindOpenRTM.cmake] enable to compile with OpenRTM 1.2.2
* [CMakeLists.txt, server/ModelLoader/CMakeLists.txt] support newer boost (`#146 <https://github.com/fkanehiro/openhrp3/issues/146>`_)

* [openhrp3.1.pc.in] fix path order in openhrp3.1.pc.in (`#129 <https://github.com/fkanehiro/openhrp3/issues/129>`_)

* installPackages

* [util]

* add packages.list.ubuntu.20.04
* add packages.list.debian.9
* add packages.list.debian.10
* update package list
* add packages.list.ubuntu.18.04

* [uril] add a package list for debian7
* [util/pkg_install_debian.sh] add RTM repository without asking user
* [uril] install packages without asking user

* Enable GithubAction tests (`#155 <https://github.com/fkanehiro/openhrp3/issues/155>`_)

* noetic does not run test because of missing python3 omniorb
* [test/test_openhrp3.py] fix python3 error on mixing binary and string
```
raise TypeError("Can't mix strings and bytes in path components") from None
```
* install python3-rosdep if python-rosdep failed
* try without openrtm-aist-python
* remove esm repos

* compile example and JoysticControl in newer openrtm than 1.1.0
* [sample/controller/CMakeLists.txt] add sample/controller/{SamplePD,SampleHG,SampleLF} when >= OPENRTM_VERSION100 (`#150 <https://github.com/fkanehiro/openhrp3/issues/150>`_)
* CMake < 3.7 compatibility, see https://github.com/glfw/glfw/issues/1584
* [sample/CMakeLists.txt] [sample] compile example and JoysticControl in newer openrtm than 1.1.0

* hrplib/hrpCorba/CMakeLists.txt: fix for Python3
* patch trusty-hrpsys-util.patch, https://github.com/fkanehiro/hrpsys-base/pull/1308 fails on 14.04
* add indigo/kinetic, run rosdep update with --include-eol-distros
* fix for python3: 2to3 -w -f has_key .
* fix for python3: 2to3 -w -f print .
* add .github/workflows/config.yml

* TravisCI

* add .travis.yml and create .travis.sh (`#149 <https://github.com/fkanehiro/openhrp3/issues/149>`_)
* [.travis.yml] update dpkg to install rosdistro in trusty (`#143 <https://github.com/fkanehiro/openhrp3/issues/143>`_)
* .travis.yml : update to trusty/indigo (`#128 <https://github.com/fkanehiro/openhrp3/issues/128>`_)

* Contributors: Fumio Kanehiro, Iori Kumagai, Jun Inoue, Kei Okada, Mitsuharu Morisawa, Naoki Hiraoka, Pierre Gergondet, Rafael Cisneros, Iori Yanokura, Yasuhiro Ishiguro, Kunio Kojima

3.1.9 (2017-02-17)
------------------

Expand Down
17 changes: 12 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ endif()

set(OPENHRP_VERSION_MAJOR 3)
set(OPENHRP_VERSION_MINOR 1)
set(OPENHRP_VERSION_MICRO 9)
set(OPENHRP_VERSION_MICRO 10)
set(OPENHRP_VERSION_ADD_TAIL )
set(CPACK_DEBIAN_PACKAGE_VERSION_TAIL 0)

Expand Down Expand Up @@ -101,6 +101,7 @@ endif()

# check boost
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_NO_BOOST_CMAKE 1)
set(Boost_ADDITIONAL_VERSIONS "1.42" "1.42.0" "1.43" "1.43.0" "1.44" "1.44.0" "1.45" "1.45.0" "1.46" "1.46.0" "1.46.1" "1.47" "1.47.0" "1.48" "1.48.0" "1.49.0" "1.50.0")

#if(NOT Boost_INCLUDE_DIR AND NOT Boost_LIBRARY_DIRS)
Expand All @@ -117,11 +118,16 @@ set(Boost_ADDITIONAL_VERSIONS "1.42" "1.42.0" "1.43" "1.43.0" "1.44" "1.44.0" "1
endif()
find_package(Boost 1.35.0 REQUIRED )
elseif(UNIX)
find_package(Boost 1.35.0 QUIET)
find_package(Boost 1.68.0 QUIET)
if(Boost_FOUND)
find_package(Boost 1.35.0 REQUIRED COMPONENTS filesystem signals system regex program_options)
find_package(Boost 1.68.0 REQUIRED COMPONENTS filesystem system regex program_options thread)
else()
find_package(Boost 1.34.0 REQUIRED COMPONENTS filesystem signals regex program_options)
find_package(Boost 1.35.0 QUIET)
if(Boost_FOUND)
find_package(Boost 1.35.0 REQUIRED COMPONENTS filesystem signals system regex program_options thread)
else()
find_package(Boost 1.34.0 REQUIRED COMPONENTS filesystem signals regex program_options thread)
endif()
endif()
if(NOT Boost_FOUND)
set(BOOST_ROOT ${BOOST_ROOT} CACHE PATH "set the directory of the boost library")
Expand Down Expand Up @@ -295,7 +301,7 @@ endif()
if(UNIX)
if(OPENRTM_VERSION STREQUAL OPENRTM_VERSION110 OR OPENRTM_VERSION STREQUAL OPENRTM_VERSION111 OR OPENRTM_VERSION STREQUAL OPENRTM_VERSION112)
set(OPENRTM_IDL_DIR "${OPENRTM_DIR}/include/openrtm-1.1/rtm/idl")
elseif(OPENRTM_VERSION STREQUAL OPENRTM_VERSION120)
elseif(OPENRTM_VERSION STREQUAL OPENRTM_VERSION120 OR OPENRTM_VERSION STREQUAL OPENRTM_VERSION121 OR OPENRTM_VERSION STREQUAL OPENRTM_VERSION122)
set(OPENRTM_IDL_DIR "${OPENRTM_DIR}/include/openrtm-1.2/rtm/idl")
else()
set(OPENRTM_IDL_DIR "${OPENRTM_DIR}/include/rtm/idl")
Expand Down Expand Up @@ -355,6 +361,7 @@ else(COMPILE_JAVA_STUFF)
message(STATUS "Not support Java")
endif(COMPILE_JAVA_STUFF)

option(COMPILE_PYTHON_STUFF "Compile python stuff" ON)

# jython
if(COMPILE_JAVA_STUFF)
Expand Down
2 changes: 1 addition & 1 deletion cmake_modules/ConfigurePkgConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if(PKG_CONFIG_FOUND)
endforeach()
if(NOT QNXNTO)
#list(APPEND PKG_CONF_LINK_DEPEND_FILES_TEMP boost_filesystem-mt boost_signals-mt boost_program_options-mt boost_regex-mt)
list(APPEND PKG_CONF_LINK_DEPEND_FILES_TEMP ${Boost_FILESYSTEM_LIBRARY} ${Boost_SIGNALS_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_REGEX_LIBRARY})
list(APPEND PKG_CONF_LINK_DEPEND_FILES_TEMP ${Boost_FILESYSTEM_LIBRARY_RELEASE} ${Boost_SIGNALS_LIBRARY_RELEASE} ${Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE} ${Boost_REGEX_LIBRARY_RELEASE})
else(NOT QNXNTO)
list(APPEND PKG_CONF_LINK_DEPEND_FILES_TEMP boost_filesystem boost_signals boost_program_options boost_regex)
endif(NOT QNXNTO)
Expand Down
4 changes: 3 additions & 1 deletion cmake_modules/FindOpenRTM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ set(OPENRTM_VERSION110 "1.1.0")
set(OPENRTM_VERSION111 "1.1.1")
set(OPENRTM_VERSION112 "1.1.2")
set(OPENRTM_VERSION120 "1.2.0")
set(OPENRTM_VERSION121 "1.2.1")
set(OPENRTM_VERSION122 "1.2.2")
set(OPENRTM_PKG_CONFIG_FOUND FALSE)
#Additional threshold OpenRTM versions switching processing
set(OPENRTM_DEFAULT_VERSION ${OPENRTM_VERSION100})
Expand Down Expand Up @@ -52,7 +54,7 @@ if(UNIX)
list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/include/openrtm-1.1/rtm/idl")
list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/include/openrtm-1.1")
list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/include/coil-1.1")
elseif(OPENRTM_VERSION STREQUAL OPENRTM_VERSION120)
elseif(OPENRTM_VERSION STREQUAL OPENRTM_VERSION120 OR OPENRTM_VERSION STREQUAL OPENRTM_VERSION121 OR OPENRTM_VERSION STREQUAL OPENRTM_VERSION122)
list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/include/openrtm-1.2/rtm/idl")
list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/include/openrtm-1.2")
list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/include/coil-1.2")
Expand Down
Loading

0 comments on commit 1777a93

Please sign in to comment.