rviz 12.7 update 실패->성공

osrf/ros:humble-desktop 도커 이미지를 설치하면 rviz 12.6가 설치된다. 가끔 node를 만들어 robot_description을 입력하면, rviz2가 제대로 표시 안할 경우가 있다. moveit_setup_assistant도 기존 설정 파일을 수정하면 robot_model_loader가 실행되지 않을 경우도 있다. 아마 12.6 버전의 문제인 듯 하여 버전을 올려 보기로 했다. 최신 버전은 12.8인데, humble이 사용할 수 있는 가장 최근 버전은 12.7이다. 12.8을 사용하면 display panel이 안보이는 듯 안정적으로 동작하지 않는다.

now0930@rygen3600:~/ros2/test/ws_root/ws_user$ git clone -b humble https://github.com/ros2/rviz.git
'rviz'에 복제합니다...
remote: Enumerating objects: 30445, done.
remote: Counting objects: 100% (4756/4756), done.
remote: Compressing objects: 100% (1181/1181), done.
remote: Total 30445 (delta 3857), reused 4031 (delta 3399), pack-reused 25689
오브젝트를 받는 중: 100% (30445/30445), 16.45 MiB | 16.27 MiB/s, 완료.
델타를 알아내는 중: 100% (22231/22231), 완료.
now0930@rygen3600:~/ros2/test/ws_root/ws_user$ cd rviz/
now0930@rygen3600:~/ros2/test/ws_root/ws_user/rviz$ git checkout 
브랜치가 'origin/humble'에 맞게 업데이트된 상태입니다.

branch를 선택하지 않고, default 값으로 humble에서 12.8을 컴파일 하고 있었다. 잘 동작되지 않아 2일을 날렸다. work space 구조도 각 패키지에 맞도록 세부적으로 나누어야 한다. 섞이면 컴파일 양도 많고, 각 패키지별로 옵션을 설정할 수 없다. workspace에 대한 내용은 여기에 있다. overlay, underlay를 정확하게 이해하지 않고 가 시간 날렸다.

rviz2 readme를 따라 complie 한다. 컴파일 중 ignition_math6_vendor가 없어 에러로 멈춘다.

CMake Error at CMakeLists.txt:64 (find_package):
  By not providing "Findignition_math6_vendor.cmake" in CMAKE_MODULE_PATH
  this project has asked CMake to find a package configuration file provided
  by "ignition_math6_vendor", but CMake did not find one.

  Could not find a package configuration file provided by
  "ignition_math6_vendor" with any of the following names:

    ignition_math6_vendorConfig.cmake
    ignition_math6_vendor-config.cmake

  Add the installation prefix of "ignition_math6_vendor" to CMAKE_PREFIX_PATH
  or set "ignition_math6_vendor_DIR" to a directory containing one of the
  above files.  If "ignition_math6_vendor" provides a separate development
  package or SDK, be sure it has been installed.

apt-cache로 ros-humble-ignition-math6-vendor를 검색하면, 해당 패키지가 설치되어 있다. dpkg로 어떤 파일들이 있는지 보면, 실재 파일은 없는 듯 하다.

root@rygen3600:/home/ros2_test# dpkg -L ros-humble-ignition-math6-vendor
/.
/opt
/opt/ros
/opt/ros/humble
/opt/ros/humble/share
/opt/ros/humble/share/ignition_math6_vendor
/opt/ros/humble/share/ignition_math6_vendor/package.xml
/usr
/usr/share
/usr/share/doc
/usr/share/doc/ros-humble-ignition-math6-vendor
/usr/share/doc/ros-humble-ignition-math6-vendor/changelog.Debian.gz
/usr/share/doc/ros-humble-ignition-math6-vendor/copyright
root@rygen3600:/home/ros2_test# 

ROS Index를 찾아보면 rviz2 github를 찾을 수 있는데, 이를 rviz에 있는 디렉토리에 받아주면 된다. ignition-math6-vendor가 gz_math6_vendor로 바뀐 느낌이다. CMakefile을 보면 project로 ignition_math6_vendor로 자기를 명명한다.

oot@rygen3600:/home/ros2_test/rviz# ls -alh
total 92K
drwxrwxr-x 17 1000 1000 4.0K Aug  8 21:43 .
drwxrwxr-x  7 1000 1000 4.0K Aug  6 20:45 ..
drwxrwxr-x  8 1000 1000 4.0K Aug  6 20:45 .git
drwxrwxr-x  3 1000 1000 4.0K Aug  6 20:45 .github
-rw-rw-r--  1 1000 1000   55 Aug  6 20:45 .gitignore
-rw-rw-r--  1 1000 1000   84 Aug  6 20:45 CODEOWNERS
-rw-rw-r--  1 1000 1000 1.7K Aug  6 20:45 LICENSE
-rw-rw-r--  1 1000 1000 8.2K Aug  6 20:45 README.md
drwxr-xr-x 11 root root 4.0K Aug  8 21:49 build
drwxrwxr-x  2 1000 1000 4.0K Aug  6 20:45 docs
drwxrwxr-x  5 1000 1000 4.0K Aug  8 21:43 gz_math6_vendor
drwxr-xr-x  7 root root 4.0K Aug  8 21:49 install
drwxr-xr-x 10 root root 4.0K Aug  8 21:44 log
drwxrwxr-x  6 1000 1000 4.0K Aug  6 20:45 rviz2
drwxrwxr-x  3 1000 1000 4.0K Aug  6 20:45 rviz_assimp_vendor
drwxrwxr-x  8 1000 1000 4.0K Aug  6 20:45 rviz_common
drwxrwxr-x  6 1000 1000 4.0K Aug  8 21:53 rviz_default_plugins
drwxrwxr-x  3 1000 1000 4.0K Aug  6 20:45 rviz_ogre_vendor
drwxrwxr-x  6 1000 1000 4.0K Aug  6 20:45 rviz_rendering
drwxrwxr-x  4 1000 1000 4.0K Aug  6 20:45 rviz_rendering_tests
drwxrwxr-x  7 1000 1000 4.0K Aug  8 20:54 rviz_visual_testing_framework
root@rygen3600:/home/ros2_test/rviz# 
root@rygen3600:/home/ros2_test/rviz# cd gz_math6_vendor/
root@rygen3600:/home/ros2_test/rviz/gz_math6_vendor# ls
CHANGELOG.rst	CONTRIBUTING.md  package.xml
CMakeLists.txt	LICENSE		 patches
root@rygen3600:/home/ros2_test/rviz/gz_math6_vendor# cat CMakeLists.txt 
cmake_minimum_required(VERSION 3.10)
project(ignition_math6_vendor)

find_package(ament_cmake_core REQUIRED)
find_package(ament_cmake_vendor_package REQUIRED)

find_package(ignition-math6 6.9.2 QUIET)

ament_vendor(ignition_math6_vendor
  SATISFIED ${ignition-math6_FOUND}
  VCS_URL https://github.com/ignitionrobotics/ign-math.git
  VCS_VERSION ignition-math6_6.9.2
  PATCHES patches
  CMAKE_ARGS
    -DBUILD_DOCS:BOOL=OFF
  GLOBAL_HOOK
)

find_package(ament_cmake_test REQUIRED)
if(BUILD_TESTING)
  find_package(ament_cmake_lint_cmake REQUIRED)
  find_package(ament_cmake_copyright REQUIRED)
  find_package(ament_cmake_xmllint REQUIRED)

  ament_lint_cmake()
  ament_copyright()
  ament_xmllint()
endif()

ament_package()

코멘트

댓글 남기기

이 사이트는 Akismet을 사용하여 스팸을 줄입니다. 댓글 데이터가 어떻게 처리되는지 알아보세요.