btr2023の準備(gazeboを動かすまでの手順)
Ubuntu 20.04でgazeboを使えるようになった後の手順です.
BTR2022の設定をとりあえず作業してください.
lib64ncurses5-dev のインストールで,以下のメーセージが出るかも.
The following packages have unmet dependencies: lib64ncurses-dev:i386 : Depends: libncurses-dev:i386 (= 6.2-0ubuntu2.1) but it is not going to be installed Depends: lib64c-dev:i386 E: Unable to correct problems, you have held broken packages.
refboxで出たエラーは,以下の対応.
/home/wataru/rcll-refbox/src/libs/mps_comm/opcua/opc_utils.cpp:606:56: error: ‘streamed’ is not a member of ‘fmt’ 606 | logger->info("{}>{}", std::string(lvl[0], ' '), fmt::streamed(node));
logger なので,無視して良いからコメントアウト.
home/wataru/rcll-refbox/src/libs/rest-api/clips-rest-api/clips-rest-api.cpp:179:27:error: ISO C++ forbids converting a string constant to ‘char*’ [-Werror=write-string]
RefBox の更新(RCAP2022時点)のは話なので,
etc/buildsys/config.mkの最後の方に以下を加えて対応.
CLIPS_OLD_63_API = YES
後は,今年のプログラムを扱いたいので,btr2023と,robotino_nodeを落としておきましょうか.
cd ~/git git clone https://github.com/wadaru/btr2023 git clone https://github.com/ct2034/robotino git clone https://github.com/robocup-logistics/gazebo-rcll cd ~/catkin_ws/src ln -s ~/git/robotino/robotino-ros-pkg/* . cd .. catkin_make
/home/robotino/catkin_ws/src/robotino_node/include/ComROS.h:11:10: fatal error:rec/robotino/api2/Com.h: No such file or directory2 11 | #include "rec/robotino/api2/Com.h"
上記のエラーはRobotinoでROS(ct2034)より,
cat src/robotino_node/CMakeLists.txt ... set(CMAKE_MODULE_PATH /usr/local/robotino/api2/cmake) set(RobotinoAPI2_INCLUDE_DIRS /opt/robotino/include) ## System dependencies are found with CMake's conventions # find_package(Boost REQUIRED COMPONENTS system) find_package(RobotinoAPI2) set(REC_ROBOTINO_API2_LIBRARY /opt/robotino/lib/librec_robotino_api2.so) ... ## Specify additional locations of header files ## Your package locations should be listed before other locations # include_directories(include) include_directories( include ${catkin_INCLUDE_DIRS} ${RobotinoAPI2_INCLUDE_DIRS} ) ...
次にBTR2022の設定 の次の話のメモの辺りの話.
sudo apt-get -y install libgazebo9-dev libgazebo9 gazebo9-common sudo apt-get install gazebo9 sudo apt-get install ros-noetic-gazebo-ros # CmakeLists.txt にBoostの情報を追加. echo "find_package(Boost REQUIRED COMPONENTS system program_options filesystem thread)" >> CMakeLists.txt cd gazebo-rcll cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo cmake --build build
ここまで作業中
—-
cd gazebo-rcll # CmakeLists.txt にBoostの情報を追加. echo "find_package(Boost REQUIRED COMPONENTS system program_options filesystem thread)" >> CMakeLists.txt
cd ~/git/gazebo-rcll cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo cmake --build build
あとは,gazebo関係のディレクトリの修正をすれば,動くかな.
GUIでのリモートがつながらないから,ここから先の作業が難しい….
cd ~/git/gazebo-rcll rm CMakeLists.txt; ln -s ~/git/btr2023/bordeaux2023/gazebo/btr/CMakeLists.txt . cd models/carologistics rm -rf carologistics-robotino-3; ln -s ~/git/btr2023/bordeaux2023/gazebo/btr/models/carologistics-robotino-3 . rm -rf robotino-nr-1; ln -s ~/git/btr2023/bordeaux2023/gazebo/btr/models/robotino-nr-1 . rm -rf robotino-nr-2; ln -s ~/git/btr2023/bordeaux2023/gazebo/btr/models/robotino-nr-2 . rm -rf robotino-nr-3; ln -s ~/git/btr2023/bordeaux2023/gazebo/btr/models/robotino-nr-3 . cd ../bbu ln -s ~/git/btr2023/bordeaux2023/gazebo/btr/models/hokuyo_noisy1 . ln -s ~/git/btr2023/bordeaux2023/gazebo/btr/models/hokuyo_noisy2 . ln -s ~/git/btr2023/bordeaux2023/gazebo/btr/models/hokuyo_noisy3 . cd .. ln -s pyro/C920_ros . cd ../plugins/src/plugins rm -rf motor; ln -s ~/git/btr2023/bordeaux2023/gazebo/btr/plugins/src/plugins/motor . rm -rf odometry; ln -s ~/git/btr2023/bordeaux2023/gazebo/btr/plugins/src/plugins/odometry . cd ../../../worlds/carologistics ln -s ~/git/btr2023/bordeaux2023/gazebo/btr/world/llsf_btr.world . echo "export GAZEBO_WORLD_PATH=$GAZEBO_RCLL/worlds/carologistics/llsf_btr.world" >> ~.bashrc echo "export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:$GAZEBO_RCLL/models/bbi" >> ~.bashrc source ~/.bashrc cd ~/gazebo-rcll cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo cmake --build build
ResetOdometry.h 等が見つからないってエラーが出た場合は,
/git/btr2023/bordeaux2023/gazebo/btr/plugins/src/plugins/odometry
のディレクトリ内のシンボリックリンクを見直してください.
おそらく,ユーザ名に依存する部分(/home/ryukokuなど)が異なっている状態かと思います.
シンボリックリンクを張り直してください.
cd ~/git/btr2023/bordeaux2023/gazebo/btr/plugins/src/plugins/odometry rm ResetOdometry.h rm ResetOdometryRequest.h rm ResetOdometryResponse.h ln -s ~/catkin_ws/devel/include/robotino_msgs/ResetOdometry*.h . # ResetOdometry.h から上の二つのヘッダファイルを読み込んでいますが、 # includeをダブルクォーテーションのファイル名に修正しないといけないハズ。
で,完了のはず.
/scan が出ないのは,以下のパッケージが抜けていたからかなぁ.
sudo apt-get install ros-noetic-gazebo-plugins libignition-sensors3-lidar
実行方法は以下です.
cd ~/git/btr2023/bordeaux2023/scripts ./startRCLL.bash gazebo
コメントを残す