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

Change souce code from zip(ver 1.4.0) to github (developer) #2

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ compiler:
- gcc
env:
#- ROS_DISTRO=groovy ROSWS=rosws BUILDER=rosbuild USE_DEB=true
- ROS_DISTRO=groovy ROSWS=rosws BUILDER=rosbuild USE_DEB=false
# - ROS_DISTRO=groovy ROSWS=rosws BUILDER=rosbuild USE_DEB=false
#- ROS_DISTRO=groovy ROSWS=wstool BUILDER=catkin USE_DEB=true
- ROS_DISTRO=groovy ROSWS=wstool BUILDER=catkin USE_DEB=false
#- ROS_DISTRO=hydro ROSWS=wstool BUILDER=catkin USE_DEB=true
Expand All @@ -20,6 +20,8 @@ matrix:
- env: ROS_DISTRO=indigo ROSWS=wstool BUILDER=catkin USE_DEB=false
script: source .travis/travis.sh
notifications:
recipients:
- [email protected]
email:
on_success: always
on_failure: always
on_failure: always
34 changes: 34 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
if(NOT USE_ROSBUILD)
include(catkin.cmake)
return()
endif()
cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

# Set the build type. Options are:
# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage
# Debug : w/ debug symbols, w/o optimization
# Release : w/o debug symbols, w/ optimization
# RelWithDebInfo : w/ debug symbols, w/ optimization
# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries
#set(ROS_BUILD_TYPE RelWithDebInfo)

rosbuild_init()

#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

#uncomment if you have defined messages
#rosbuild_genmsg()
#uncomment if you have defined services
#rosbuild_gensrv()

#common commands for building c++ executables and libraries
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
#target_link_libraries(${PROJECT_NAME} another_library)
#rosbuild_add_boost_directories()
#rosbuild_link_boost(${PROJECT_NAME} thread)
#rosbuild_add_executable(example examples/example.cpp)
#target_link_libraries(example ${PROJECT_NAME})
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Ball: installed all
include $(shell rospack find mk)/cmake.mk

include Makefile.choreonoid
#include Makefile.graspplugin

installed: installed.choreonoid # installed.graspplugin

clean: clean.choreonoid

wipe: clean
rm -fr build bin include lib share
37 changes: 37 additions & 0 deletions Makefile.choreonoid
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# -*- mode: makefile -*-
INSTALL_DIR = $(CURDIR)
CNOID_VER = 1.4.0
FILENAME = choreonoid-$(CNOID_VER).zip
TARBALL = build/$(FILENAME)
TARBALL_URL = http://choreonoid.org/_downloads/$(FILENAME)
# SOURCE_DIR = build/choreonoid-$(CNOID_VER)
GIT_DIR = build/choreonoid-$(CNOID_VER)
GIT_URL = https://github.com/s-nakaoka/choreonoid.git
GIT_REVISION = master
# GIT_REVISION = add-to-headers
#TARBALL_PATCH = add_dummy_option.patch
BUILD_HELLO_WORLD_SAMPLE = ON # for hello world

# UNPACK_CMD = unzip
# MD5SUM_FILE = $(shell rospack find choreonoid)/$(FILENAME).md5sum
# include $(shell rospack find mk)/download_unpack_build.mk

MK_DIR = $(shell rospack find mk)
include $(MK_DIR)/git_checkout.mk

installed.choreonoid: $(GIT_DIR) # $(SOURCE_DIR)/unpacked
@echo "git checkout choreonoid $(GIT_REVISION) ..."
# cd $(GIT_DIR) && git reset --hard && git checkout $(GIT_REVISION)
cd $(GIT_DIR) && git checkout $(GIT_REVISION)

@echo "compile hrpsys-base ... "
@echo " PATH=$(PATH)"
@echo " INSTALL_DIR=$(INSTALL_DIR)"
@echo " GIT_DIR=$(GIT_DIR)"
cd $(GIT_DIR) && cmake . -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -DENABLE_INSTALL_RPATH=ON -DBUILD_HELLO_WORLD_SAMPLE=$(BUILD_HELLO_WORLD_SAMPLE) && make -j 4 && make install
touch installed.choreonoid

clean.choreonoid:
-cd $(GIT_DIR) && make clean
rm -fr installed.choreonoid

99 changes: 99 additions & 0 deletions catkin.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# http://ros.org/doc/hydro/api/catkin/html/user_guide/supposed.html
cmake_minimum_required(VERSION 2.8.3)
project(choroenoid)

find_package(catkin REQUIRED COMPONENTS mk)

# catkin_package(DEPENDS eigen)

# define choreonoid version to be installed
if(NOT CNOID_MAJOR_VER)
# set(CNOID_VER "1.4.0" CACHE STRING "choreonoid version to be installed" FORCE)
set(CNOID_MAJOR_VER 1)
set(CNOID_MINOR_VER 5)
set(CNOID_PATCH_VER 0)
endif()

execute_process(
COMMAND cmake -E chdir ${CMAKE_CURRENT_BINARY_DIR} # go to build/rtm-ros-robotics/choreonoid
make -f ${PROJECT_SOURCE_DIR}/Makefile.choreonoid # PROJECT_SOURCE_DIR=src/rtm-ros-robotics/choreonoid
INSTALL_DIR=${CATKIN_DEVEL_PREFIX} # CATKIN_DEVEL_PREFIX=devel (for making choreonoid(binary) in devel/bin)
MK_DIR=${mk_PREFIX}/share/mk # /opt/ros/hydro/share/mk
PATCH_DIR=${PROJECT_SOURCE_DIR}
CNOID_VER=${CNOID_MAJOR_VER}.${CNOID_MINOR_VER}.${CNOID_PATCH_VER}
installed.choreonoid
RESULT_VARIABLE _make_failed)
if (_make_failed)
message(FATAL_ERROR "Failed to build choreonoid: ${_make_failed}")
endif(_make_failed)

# move binary
# bin -> {source}/bin
if(NOT EXISTS ${PROJECT_SOURCE_DIR}/bin/)
execute_process(
COMMAND cmake -E make_directory ${PROJECT_SOURCE_DIR}/bin/
RESULT_VARIABLE _make_failed)
if (_make_failed)
message(FATAL_ERROR "make_directory ${PROJECT_SOURCE_DIR}/bin/ failed: ${_make_failed}")
endif(_make_failed)
endif()
if(EXISTS ${CATKIN_DEVEL_PREFIX}/bin/choreonoid)
execute_process(
COMMAND cmake -E copy ${CATKIN_DEVEL_PREFIX}/bin/choreonoid ${PROJECT_SOURCE_DIR}/bin/choreonoid
RESULT_VARIABLE _copy_failed)
message("copy binary files ${PROJECT_SOURCE_DIR}/bin/choreonoid")
endif()
if (_rename_failed)
message(FATAL_ERROR "Copy hrpsys/bin failed: ${_rename_failed}")
endif(_rename_failed)

# move libraries
# lib -> {source}/lib
if(NOT EXISTS ${PROJECT_SOURCE_DIR}/lib/)
execute_process(
COMMAND cmake -E make_directory ${PROJECT_SOURCE_DIR}/lib/
RESULT_VARIABLE _make_failed)
if (_make_failed)
message(FATAL_ERROR "make_directory ${PROJECT_SOURCE_DIR}/lib/ failed: ${_make_failed}")
endif(_make_failed)
endif()
execute_process(
COMMAND grep ${CATKIN_DEVEL_PREFIX}/lib/ ${CMAKE_CURRENT_BINARY_DIR}/build/choreonoid-${CNOID_MAJOR_VER}.${CNOID_MINOR_VER}.${CNOID_PATCH_VER}/install_manifest.txt
OUTPUT_VARIABLE _lib_files
RESULT_VARIABLE _grep_failed) # get path of installed lib files in choreonoid-* and preserve in _lib_files
if (_grep_failed)
message(FATAL_ERROR "grep : ${CMAKE_CURRENT_BINARY_DIR}/build/choreonoid-${CNOID_MAJOR_VER}.${CNOID_MINOR_VER}.${CNOID_PATCH_VER}/install_manifest.txt ${_grep_failed}")
endif(_grep_failed)
string(REGEX REPLACE "\n" ";" _lib_files ${_lib_files})
foreach(_lib_file ${_lib_files})
get_filename_component(_lib_file_name ${_lib_file} NAME) # get filename (without path)
if ("${_lib_file}" MATCHES "lib/choreonoid*") # install libraries in lib/choreonoid-*
string(REGEX REPLACE "${CATKIN_DEVEL_PREFIX}/lib/" "" _choreonoid_lib_file ${_lib_file}) # trim devel/rtm-ros-robotics/choreonoid/choreonoid-*/*.so -> choreonoid-*/*.so
get_filename_component(_choreonoid_file_dir ${_choreonoid_lib_file} PATH) # trim choreonid-*/*.so -> choreonoid-*
execute_process(
COMMAND cmake -E copy_directory ${CATKIN_DEVEL_PREFIX}/lib/${_choreonoid_file_dir} ${PROJECT_SOURCE_DIR}/lib/${_choreonoid_file_dir}
RESULT_VARIABLE _copy_failed) # copy devel/rtm-ros-robotics/choreonoid/lib/choreonoid-* to src/rtm-ros-robotics/choreonoid
elseif ("${_lib_file_name}" MATCHES "libCnoid.*so") # install lib/libCnoid*.so
execute_process(
COMMAND cmake -E copy ${CATKIN_DEVEL_PREFIX}/lib/${_lib_file_name} ${PROJECT_SOURCE_DIR}/lib/${_lib_file_name}
RESULT_VARIABLE _copy_failed) # copy devel/rtm-ros-robotics/choreonoid/lib/libCnoid* to src/rtm-ros-robotics/choreonoid
endif()
endforeach()

# # for balancer plugin library
# if( CMAKE_SIZEOF_VOID_P EQUAL 8 ) # check ARCHITECTURE
# set( ARCH_VAL x64 )
# elseif( CMAKE_SIZEOF_VOID_P EQUAL 4 )
# set( ARCH_VAL x86 )
# else()
# message(FATAL_ERROR "We can build on only Linux(32bit or 64bit)")
# endif()
# execute_process(
# COMMAND cmake -E copy ${CMAKE_CURRENT_BINARY_DIR}/build/choreonoid-${CNOID_MAJOR_VER}.${CNOID_MINOR_VER}.${CNOID_PATCH_VER}/proprietary/BalancerPlugin/libCnoidBalancerPlugin.${ARCH_VAL}.so ${PROJECT_SOURCE_DIR}/lib/choreonoid-${CNOID_MAJOR_VER}.${CNOID_MINOR_VER}/libCnoidBalancerPlugin.so
# RESULT_VARIABLE _balancer_library_copy_failed)
# execute_process(
# COMMAND cmake -E copy ${CMAKE_CURRENT_BINARY_DIR}/build/choreonoid-${CNOID_MAJOR_VER}.${CNOID_MINOR_VER}.${CNOID_PATCH_VER}/proprietary/BalancerPlugin/libCnoidBalancerPlugin.${ARCH_VAL}.so ${CATKIN_DEVEL_PREFIX}/lib/choreonoid-${CNOID_MAJOR_VER}.${CNOID_MINOR_VER}/libCnoidBalancerPlugin.so
# RESULT_VARIABLE _balancer_library_copy_failed)
# if(_balancer_library_copy_failed)
# message(FATAL_ERROR "Copy libCnoidBlancer.so failed: ${_balancer_library_copy_failed}")
# endif(_balancer_library_copy_failed)
1 change: 1 addition & 0 deletions choreonoid-1.3.1.zip.md5sum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2c309ed0bb6890b37979085239a35b02 choreonoid-1.3.1.zip
1 change: 1 addition & 0 deletions choreonoid-1.4.0.zip.md5sum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e56e98cc33effbfbcbdb7e3ab4153fc3 choreonoid-1.4.0.zip
4 changes: 4 additions & 0 deletions launch/grasp.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<launch>
<node name="choreonoid" pkg="choreonoid" type="choreonoid"
args="--start-playback $(find choreonoid)/share/extplugin/graspPlugin/Samples/pa10.cnoid -- " />
</launch>
4 changes: 4 additions & 0 deletions launch/sample.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<launch>
<node name="choreonoid" pkg="choreonoid" type="choreonoid"
args="--start-playback $(find choreonoid)/share/choreonoid-1.1/projects/GR001Sample.cnoid -- " />
</launch>
84 changes: 84 additions & 0 deletions manifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<package>
<description brief="choreonoid">

choreonoid

This program has been developed by Shin'ichiro Nakaoka and Choreonoid Development Team, AIST.

This program is free software; you can redistribute it and/or modify it under the terms of
the GNU Lesser General Public License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.

The source and some binary packages of this program also include the following third-party
libraries:

* Eigen (http://eigen.tuxfamily.org/)
* IJG JPEG Library (http://www.ijg.org/)
* libpng (http://www.libpng.org/pub/png/libpng.html)
* LibYAML (http://pyyaml.org/wiki/LibYAML)
* OPCODE (http://www.codercorner.com/Opcode.htm)
* zlib (http://zlib.net/)

These libraries are used and redistributed under the terms of their licenses. Please see
the corresponding directories in the source package or their official web sites to see the
details of their licenses.

This program also depends on a lot of other external libraries, which are linked into this
program during the execution. Some binary packages of this program may include the binaries
of the following libraries:

* Qt (http://qt.nokia.com/)
* OpenSceneGraph (http://www.openscenegraph.org)
* Boost C++ Libraries (http://www.boost.org/)

Please see their official web sites to see the details of their licenses.

</description>
<author>Shin'ichiro Nakaoka and Choreonoid Development Team, AIST.</author>
<license>LGPL 2.1</license>
<review status="unreviewed" notes=""/>
<url>http://ros.org/wiki/choreonoid</url>

<!-- <rosdep name="build-essential" /> -->
<!-- <rosdep name="cmake-curses-gui" /> -->
<rosdep name="boost" />
<rosdep name="eigen" />
<!-- <rosdep name="libeigen3-doc" /> -->
<rosdep name="libqt4-dev" />
<rosdep name="libqt4-opengl-dev" />
<rosdep name="qt4-dev-tools" />
<!-- <rosdep name="qt4-qtconfig" /> -->
<!-- <rosdep name="qt4-doc-html" /> -->
<rosdep name="libglew-dev" />
<rosdep name="yaml" />
<!-- <rosdep name="gettext" /> -->
<rosdep name="zlib1g" />
<rosdep name="libjpeg" />
<rosdep name="libpng12-dev" />
<rosdep name="opende" />
<rosdep name="omniorb" />
<!-- <rosdep name="libcos4-dev" /> -->
<rosdep name="omniidl" />
<!-- <rosdep name="omniorb-nameserver" /> -->
<rosdep name="python-omniorb" />
<rosdep name="omniidl-python" />
<rosdep name="libgstreamer0.10-dev" />
<rosdep name="libgstreamer-plugins-base0.10-dev" />
<!-- <rosdep name="libsndfile1-dev" /> -->
<!-- <rosdep name="libpulse-dev" /> -->
<rosdep name="python-dev" />
<rosdep name="uuid" />
<rosdep name="python-qt-bindings" />

<rosdep name="doxygen" />
<rosdep name="mk" />
<rosdep name="eigen" />


</package>


Loading