概要
KiltedからLyricalにアップグレードしたところ,以下の部分を変更しなければ動かない,エラーがでる,警告がでる.
cmakeの必要最低限バージョンが変わったため.
cmakeの必要version
プロジェクトのCmakeList.txtの中の1行目cmake_minimum_requiredを修正
- Kilted Kaijuまで
cmake_minimum_required(VERSION 3.8)
- Lyrical Luthから
cmake_minimum_required(VERSION 3.8)
グローバルなsetup.bashの実行
.bashrcの中で以下を実行しているはず.
-
`/opt/ros//setup.bash
- jazzyの場合は以下となる.
-
/opt/ros/jazzy/setup.bash
これをLyrical用にする.
-
- jazzyの場合は以下となる.
-
/opt/ros/lyrical/setup.bash
研究室内の場合
研究室では.bashrcが以下のようになっている.
.bashrc
# for ROS2
## User settings
ROS2_TOP_DIRECTORY="$HOME/program/ros2/"
#DISTRO_ROS2="humble"
#DISTRO_ROS2="jazzy"
DISTRO_ROS2="lyrical"
ID=1 # pleas contact Kurashige
## commands
if [ -f /usr/share/colcon_cd/function/colcon_cd.sh ]; then
source /usr/share/colcon_cd/function/colcon_cd.sh
echo "colcon cd root is $ROS2_TOP_DIRECTORY ."
export _colcon_cd_root=$ROS2_TOP_DIRECTORY
# export _colcon_cd_root=~/program/ros2
fi
if [ -f /opt/ros/$DISTRO_ROS2/setup.bash ]; then
echo "ROS2 $DISTRO_ROS2 is activated."
source /opt/ros/$DISTRO_ROS2/setup.bash
fi
if [ $ID -eq 0 ]; then
echo "ROS2 is executed only for local."
export ROS_LOCALHOST_ONLY=1
else
echo "ROS2 is executed through a network."
export ROS_DOMAIN_ID=$ID
fi
DISTRO_ROS2の部分を"lyrical"にする.