start-jsk / openrtm_aist_core

Metapackage that contains commonly used RT-Middleware-based modules. Althogh each of these packages by themselves are ROS-agnostic, you can use them over ROS together with the packages in rtmros_common.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fix openrtm-aist.pc to compatible with ROS-layout

k-okada opened this issue · comments

since this package has ROS-style directory layout, we need to fix openrtm-aist.pc.

For example...

prefix=/tmp/hoge/src/rtm-ros-robotics/openrtm_common/openrtm_aist_core/openrtm_aist ;; Where is prefix????
exec_prefix=${prefix} ;; this should be used to access exec files (rtm-naming ...)
datarootdir=/tmp/hoge/src/rtm-ros-robotics/openrtm_common/openrtm_aist_core/openrtm_aist/share
data_prefix=/tmp/hoge/src/rtm-ros-robotics/openrtm_common/openrtm_aist_core/openrtm_aist/share
rtm_prefix=/tmp/hoge/src/rtm-ros-robotics/openrtm_common/openrtm_aist_core/openrtm_aist ;; what is rtm prefix?
rtm_exec_prefix=${prefix} ;; what difference from exe_prefix???
rtm_data_prefix=/tmp/hoge/src/rtm-ros-robotics/openrtm_common/openrtm_aist_core/openrtm_aist/share

libdir=${exec_prefix}/lib
includedir=${prefix}/include

rtm_cxx=/usr/bin/c++
rtm_cflags= -Wall -fPIC -g -I/tmp/hoge/src/rtm-ros-robotics/openrtm_common/openrtm_aist_core/openrtm_aist/include -I${prefix}/include/coil-1.1 -I${prefix}/include/openrtm-1.1 -I${prefix}/include/openrtm-1.1/rtm/idl
rtm_libs= -luuid -ldl -export-dynamic -L${exec_prefix}/lib -lpthread  -lomniORB4 -lomnithread -lomniDynamic4 -lRTC -lcoil
rtm_version=1.1.0
rtm_orb=omniORB
rtm_idlc=/usr/bin/omniidl
rtm_idlflags= -bcxx -Wba -nf -I${prefix}/include/openrtm-1.1/rtm/idl
# other variables
rtm_includedir=${prefix}/include/openrtm-1.1
rtm_idldir=${prefix}/include/openrtm-1.1/rtm/idl
rtm_libdir=${exec_prefix}/lib/openrtm-1.1
rtm_datadir=${datarootdir}/openrtm-1.1
rtm_rtcdir=${exec_prefix}/lib/openrtm-1.1/rtc
rtm_ecdir=${exec_prefix}/lib/openrtm-1.1/ec
rtm_rtmdir=${exec_prefix}/lib/openrtm-1.1/rtm
rtm_svcdir=${exec_prefix}/lib/openrtm-1.1/svc
rtm_docdir=${datarootdir}/openrtm-1.1/doc
rtm_exampledir=${datarootdir}/openrtm-1.1/example
coil_includedir=${prefix}/include/coil-1.1

This will affect, for example following cmake file.
https://github.com/k-okada/rtmros_common/blob/fix_project_generator_353/hrpsys_ros_bridge/cmake/compile_robot_model.cmake#L90

We also need to check openhrp3 and hrpsys

Rrelated to : #1

prefix=/home/k-okada/ros/groovy/rtm-ros-robotics/openrtm_common/openrtm_aist_core/openrtm_aist  ;; includedir, idldir, coildir
exec_prefix=${prefix}  ; libdir, rtcdir, ecdir, rtm,dir ,svcdir, 
datarootdir=${prefix}/share ;; datadir, docdir, exampledir, 
data_prefix=${prefix}/share
rtm_prefix=/home/k-okada/ros/groovy/rtm-ros-robotics/openrtm_common/openrtm_aist_core/openrtm_aist 
rtm_exec_prefix=${prefix} 
rtm_data_prefix=${prefix}/share

libdir=${exec_prefix}/lib ;; where you can find lib
includedir=${prefix}/include ;; where you can find include
rtm_cxx=g++ ;; gcc
rtm_cflags= -Wall -fPIC -g -I/home/k-okada/ros/groovy/rtm-ros-robotics/openrtm_common/openrtm_aist_core/openrtm_aist/include -I${prefix}/include/coil-1.1 -I${prefix}/include/openrtm-1.1 -I${prefix}/include/openrtm-1.1/rtm/idl
rtm_libs= -luuid -ldl -export-dynamic -L${exec_prefix}/lib -lpthread  -lomniORB4 -lomnithread -lomniDynamic4 -lRTC -lcoil ;; path for link
rtm_version=1.1.0
rtm_orb=omniORB
rtm_idlc=/usr/bin/omniidl
rtm_idlflags= -bcxx -Wba -nf -I${prefix}/include/openrtm-1.1/rtm/idl ;; path for idl
# other variables
rtm_includedir=${prefix}/include/openrtm-1.1 ;; 
rtm_idldir=${prefix}/include/openrtm-1.1/rtm/idl
rtm_libdir=${exec_prefix}/lib/openrtm-1.1
rtm_datadir=${datarootdir}/openrtm-1.1
rtm_rtcdir=${exec_prefix}/lib/openrtm-1.1/rtc
rtm_ecdir=${exec_prefix}/lib/openrtm-1.1/ec
rtm_rtmdir=${exec_prefix}/lib/openrtm-1.1/rtm
rtm_svcdir=${exec_prefix}/lib/openrtm-1.1/svc
rtm_docdir=${datarootdir}/openrtm-1.1/doc
rtm_exampledir=${datarootdir}/openrtm-1.1/example
coil_includedir=${prefix}/include/coil-1.1

OpenHRP3/hrpsys uses rtm-config and --prefix
set(OPENRTM_CONFIG_EXECUTABLE ${OPENRTM_DIR}/bin/rtm-config)

    execute_process(
      COMMAND ${OPENRTM_CONFIG_EXECUTABLE} --prefix
      OUTPUT_VARIABLE OPENRTM_DIR~
          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")

Propsal:

  • non-prefix variables should work
  • prefix will point to
    -- ${prefix}/bin/rtm-conifg
    -- ${prefix}/include/{coil-1.1,openrtm-1.1,openrtm-1.1/rtm.idl}
  • ${exec_prefix}/rtm-cofing <-- this is not ordinarily settings

same for rtm-config