Closed yuasabe closed 1 year ago
mkdir ~/workspace/kashiwa_experiments
git clone git@github.com:tlab-wide/golf_cart_autoware.git
git clone git@github.com:tlab-wide/autoware_rsu.git
# GC
rocker --nvidia --x11 --user --privileged --volume $HOME/workspace/kashiwa_experiments/golf_cart_autoware --volume $HOME/data -- ghcr.io/autowarefoundation/autoware-universe:galactic-latest-cuda
cd ~/workspace/kashiwa_experiments/golf_cart_autoware
sudo apt update
rosdep update --include-eol-distros
rosdep install --from-paths . --ignore-src --rosdistro $ROS_DISTRO -r
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
# RSU
rocker --nvidia --x11 --user --privileged --volume $HOME/workspace/kashiwa_experiments/autoware_rsu --volume $HOME/data -- ghcr.io/autowarefoundation/autoware-universe:galactic-latest-cuda
cd ~/workspace/kashiwa_experiments/autoware_rsu
sudo apt update
rosdep update --include-eol-distros
rosdep install --from-paths . --ignore-src --rosdistro $ROS_DISTRO -r
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
# AWV2X
cd ~/workspace/kashiwa_experiments
git clone git@github.com:tlab-wide/AutowareV2X.proj.git
cd AutowareV2X.proj
mkdir src
vcs import src < AutowareV2X.proj.repos
rocker --nvidia --x11 --user --privileged --volume $HOME/workspace/kashiwa_experiments/AutowareV2X.proj --volume $HOME/data -- ghcr.io/autowarefoundation/autoware-universe:galactic-latest-cuda
cd ~/workspace/kashiwa_experiments/AutowareV2X.proj
sudo apt update
rosdep update --include-eol-distros
rosdep install --from-paths . --ignore-src --rosdistro $ROS_DISTRO -r
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
yuasabe@44acf49929e1:~/workspace/kashiwa_experiments/golf_cart_autoware$ rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
autoware_auto_geometry: Cannot locate rosdep definition for [osrf_testing_tools_cpp]
had_map_utils: Cannot locate rosdep definition for [lanelet2]
plotjuggler_ros: Cannot locate rosdep definition for [fastcdr]
system_launch: Cannot locate rosdep definition for [system_monitor]
autoware_auto_tf2: Cannot locate rosdep definition for [orocos_kdl]
septentrio_gnss_driver_msgs: Cannot locate rosdep definition for [gps_msgs]
aip_aichallenge_description: Cannot locate rosdep definition for [velodyne_description]
septentrio_gnss_driver: Cannot locate rosdep definition for [gps_msgs]
motion_common: Cannot locate rosdep definition for [apex_test_tools]
tier4_system_launch: Cannot locate rosdep definition for [system_monitor]
vehicle_launch: Cannot locate rosdep definition for [velodyne_description]
pe_ars408_ros: Cannot locate rosdep definition for [ros2_socketcan]
extrinsic_calibration_manager: Cannot locate rosdep definition for [image_proc]
colcon buildエラー
--- stderr: septentrio_gnss_driver_msgs
CMake Error at /opt/ros/galactic/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:162 (message):
rosidl_generate_interfaces() the passed dependency 'gps_msgs' has not been
found before using find_package()
Call Stack (most recent call first):
CMakeLists.txt:15 (rosidl_generate_interfaces)
---
Failed <<< septentrio_gnss_driver_msgs [15.3s, exited with code 1]
GalacticがEOLだからrosdep update
した時にSKIPされちゃってる.
Skip end-of-life distro "galactic"
以下を実行.
rosdep update --include-eol-distros
rosdep install --from-paths src --ignore-src --rosdistro $ROS_DISTRO -r
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
無事ビルド完了
--- stderr: traffic_light_classifier
/home/yuasabe/workspace/kashiwa_experiments/autoware_rsu/src/universe/autoware.universe/perception/traffic_light_classifier/utils/trt_common.cpp: In member function ‘bool Tn::TrtCommon::buildEngineFromOnnx(std::string, std::string)’:
/home/yuasabe/workspace/kashiwa_experiments/autoware_rsu/src/universe/autoware.universe/perception/traffic_light_classifier/utils/trt_common.cpp:109:43: error: ‘void nvinfer1::IBuilder::setMaxBatchSize(int32_t)’ is deprecated [-Werror=deprecated-declarations]
109 | builder->setMaxBatchSize(max_batch_size_);
| ^
In file included from /home/yuasabe/workspace/kashiwa_experiments/autoware_rsu/src/universe/autoware.universe/perception/traffic_light_classifier/utils/trt_common.hpp:22,
from /home/yuasabe/workspace/kashiwa_experiments/autoware_rsu/src/universe/autoware.universe/perception/traffic_light_classifier/utils/trt_common.cpp:15:
/usr/include/x86_64-linux-gnu/NvInfer.h:8795:25: note: declared here
8795 | TRT_DEPRECATED void setMaxBatchSize(int32_t batchSize) noexcept
| ^~~~~~~~~~~~~~~
/home/yuasabe/workspace/kashiwa_experiments/autoware_rsu/src/universe/autoware.universe/perception/traffic_light_classifier/utils/trt_common.cpp:110:39: error: ‘void nvinfer1::IBuilderConfig::setMaxWorkspaceSize(std::size_t)’ is deprecated [-Werror=deprecated-declarations]
110 | config->setMaxWorkspaceSize(16 << 20);
| ^
In file included from /home/yuasabe/workspace/kashiwa_experiments/autoware_rsu/src/universe/autoware.universe/perception/traffic_light_classifier/utils/trt_common.hpp:22,
from /home/yuasabe/workspace/kashiwa_experiments/autoware_rsu/src/universe/autoware.universe/perception/traffic_light_classifier/utils/trt_common.cpp:15:
/usr/include/x86_64-linux-gnu/NvInfer.h:8192:25: note: declared here
8192 | TRT_DEPRECATED void setMaxWorkspaceSize(std::size_t workspaceSize) noexcept
| ^~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/libutils.dir/build.make:63: CMakeFiles/libutils.dir/utils/trt_common.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:136: CMakeFiles/libutils.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
---
Failed <<< traffic_light_classifier [29.8s, exited with code 2]
tensorrt周りのバージョンが変わっているからだろう. traffic_light_classifierはなくても良さそう. traffic_light_ssd_fine_detectorでもビルドエラー. 上記2つのディレクトリにCOLCON_IGNOREファイルを設置. lidar_centerpointもエラー. そもそもこの古いバージョンのAutowareをビルドすること自体困難.
~/workspace/kashiwa_experiments/autoware
に最新のAutowareのgalacticブランチをclone.
galacticの最新バージョンをビルドする.
coms, rsuのsensor_kitとvehicleだけコピー.
これでビルド成功.
Networkを作成
# V2X_NET
docker network create --driver=bridge --subnet=10.0.0.0/24 v2x_net -o com.docker.network.bridge.name="v2x_net"
# LTE_NET
docker network create --driver=bridge --subnet=10.0.1.0/24 lte_net -o com.docker.network.bridge.name="lte_net"
# RSU_NET
docker network create --driver=bridge --subnet=192.168.0.0/24 rsu_net -o com.docker.network.bridge.name="rsu_net"
# VEH_NET
docker network create --driver=bridge --subnet=192.168.10.0/24 veh_net -o com.docker.network.bridge.name="veh_net"
./launch_autoware_sender.sh
. install/setup.bash
export CYCLONEDDS_URI=file://$PWD/cyclonedds.xml
export ROS_DOMAIN_ID=1
ros2 launch autoware_launch planning_simulator.launch.xml vehicle_model:=rsu_vehicle sensor_model:=rsu_sensor_kit map_path:=$HOME/data/maps/kashiwa_aichallenge
./launch_v2x_sender.sh
. install/setup.bash
export CYCLONEDDS_URI=file://$PWD/cyclonedds_R1.xml
export ROS_DOMAIN_ID=1
ros2 launch autoware_v2x v2x.launch.xml network_interface:=eth2 is_sender:=true
# veh_A2
cd /home/yuasabe/workspace/kashiwa_experiments/AutowareV2X.proj/scripts
./launch_autoware_receiver.sh
cd ~/workspace/kashiwa_experiments/golf_cart_autoware/
. install/setup.bash
export CYCLONEDDS_URI=file://$PWD/cyclonedds.xml
export ROS_DOMAIN_ID=2
cd scripts
./psim.sh
cd /home/yuasabe/workspace/kashiwa_experiments/AutowareV2X.proj/scripts
./launch_v2x_receiver.sh
cd home/yuasabe/workspace/kashiwa_experiments/AutowareV2X.proj/
. install/setup.bash
export CYCLONEDDS_URI=file://$PWD/cyclonedds_R2.xml
export ROS_DOMAIN_ID=2
ros2 launch autoware_v2x v2x.launch.xml network_interface:=eth1 is_sender:=false