diff --git a/.cspell.json b/.cspell.json index df7e9be3..a42af469 100644 --- a/.cspell.json +++ b/.cspell.json @@ -54,8 +54,10 @@ "ackermann", "adapi", "aichallenge", + "argmin", "astar", "autocompute", + "autoconnect", "autodetermine", "automotiveaichallenge", "autoware", @@ -63,6 +65,8 @@ "booars", "brakemap", "buildtool", + "cind", + "coeffs", "colcon", "costmap", "cuda", @@ -70,13 +74,21 @@ "dallara", "dcmake", "decel", + "dind", "distro", "downsample", + "downsampling", + "dtheta", + "eguchi", "freespace", "gnss", "gnucxx", + "Golay", "gtest", + "Iceoryx", "initialpose", + "ints", + "Kohei", "lanechange", "lanefollowing", "lanelet", @@ -86,58 +98,58 @@ "linalg", "linestring", "linestrings", + "linkstate", "lowpass", "mapfile", "mathcal", "mgrs", + "michikuni", + "mppi", + "MPPI", + "mpss", + "multihop", + "ncourse", + "nodename", "odometry", "osrf", + "pinv", "pitstop", "pointcloud", + "Qdin", "rclcpp", "rclpy", "rcutils", + "reparameting", "rgba", "rois", + "rosbag", "rosdep", "rosdistro", + "rosout", "rrtstar", + "rsample", "rviz", + "satitzky", + "Savitzky", "schematypens", "sideshift", + "softplus", "srvs", "stddev", + "tempature", "traj", "urdf", + "vander", + "Vandermonde", "velodyne", "wextra", "wmctrl", "wpedantic", "xacro", + "xclip", "xyzrpy", "zcvf", - "mppi", - "Qdin", - "Kohei", - "MPPI", - "Savitzky", - "satitzky", - "Golay", - "Vandermonde", - "michikuni", - "eguchi", - "vander", - "pinv", - "dtheta", - "cind", - "dind", - "ncourse", - "argmin", - "reparameting", - "tempature", - "rsample", - "coeffs", - "softplus", - "mpss" + "zenoh", + "zenohd" ] } diff --git a/Dockerfile b/Dockerfile index b8ab1752..ccd789a9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,10 +13,9 @@ RUN apt-get -y install ros-humble-rqt-graph ENV XDG_RUNTIME_DIR=/tmp/xdg ENV ROS_LOCALHOST_ONLY=0 ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp -ENV ROS_DOMAIN_ID=71 ENV CYCLONEDDS_URI=file:///opt/autoware/cyclonedds.xml -COPY cyclonedds.xml /opt/autoware/cyclonedds.xml +COPY vehicle/cyclonedds.xml /opt/autoware/cyclonedds.xml FROM common AS dev diff --git a/aichallenge/run_autoware.bash b/aichallenge/run_autoware.bash index fa41976b..ec6325da 100755 --- a/aichallenge/run_autoware.bash +++ b/aichallenge/run_autoware.bash @@ -1,6 +1,26 @@ #!/bin/bash +mode=${1} + +case "${mode}" in +"awsim") + opts="simulation:=true use_sim_time:=true run_rviz:=true" + ;; +"vehicle") + opts="simulation:=false use_sim_time:=false run_rviz:=false" + ;; +"rosbag") + opts="simulation:=false use_sim_time:=true run_rviz:=true" + ;; +*) + echo "invalid argument (use 'awsim' or 'vehicle' or 'rosbag')" + exit 1 + ;; +esac + # shellcheck disable=SC1091 source /aichallenge/workspace/install/setup.bash sudo ip link set multicast on lo -ros2 launch aichallenge_system_launch aichallenge_system.launch.xml + +# shellcheck disable=SC2086 +ros2 launch aichallenge_system_launch aichallenge_system.launch.xml ${opts} diff --git a/aichallenge/run_evaluation.bash b/aichallenge/run_evaluation.bash index 46fd6582..43ccdb87 100755 --- a/aichallenge/run_evaluation.bash +++ b/aichallenge/run_evaluation.bash @@ -24,7 +24,7 @@ sleep 20 # Start Autoware echo "Start Autoware" -ros2 launch aichallenge_system_launch aichallenge_system.launch.xml >autoware.log 2>&1 & +ros2 launch aichallenge_system_launch aichallenge_system.launch.xml simulation:=true use_sim_time:=true run_rviz:=true >autoware.log 2>&1 & PID_AUTOWARE=$! sleep 10 diff --git a/aichallenge/workspace/run_aichallenge_launch_replay_rosbag.sh b/aichallenge/workspace/run_aichallenge_launch_replay_rosbag.sh deleted file mode 100644 index d7e86d0e..00000000 --- a/aichallenge/workspace/run_aichallenge_launch_replay_rosbag.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/bash - -source install/setup.bash - -ros2 launch aichallenge_system_launch aichallenge_system.launch.xml simulation:=false use_sim_time:=true run_rviz:=true diff --git a/aichallenge/workspace/run_aichallenge_launch_run_vehicle.sh b/aichallenge/workspace/run_aichallenge_launch_run_vehicle.sh deleted file mode 100644 index 2497e9e9..00000000 --- a/aichallenge/workspace/run_aichallenge_launch_run_vehicle.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/bash - -source install/setup.bash - -ros2 launch aichallenge_system_launch aichallenge_system.launch.xml simulation:=false use_sim_time:=false run_rviz:=false diff --git a/aichallenge/workspace/run_aichallenge_launch_simulation.sh b/aichallenge/workspace/run_aichallenge_launch_simulation.sh deleted file mode 100644 index 406f621a..00000000 --- a/aichallenge/workspace/run_aichallenge_launch_simulation.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/bash - -source install/setup.bash - -ros2 launch aichallenge_system_launch aichallenge_system.launch.xml simulation:=true use_sim_time:=true run_rviz:=true diff --git a/aichallenge/workspace/src/aichallenge_submit/aichallenge_submit_launch/launch/reference.launch.xml b/aichallenge/workspace/src/aichallenge_submit/aichallenge_submit_launch/launch/reference.launch.xml index d671b0bb..51878e63 100644 --- a/aichallenge/workspace/src/aichallenge_submit/aichallenge_submit_launch/launch/reference.launch.xml +++ b/aichallenge/workspace/src/aichallenge_submit/aichallenge_submit_launch/launch/reference.launch.xml @@ -2,11 +2,11 @@ - + + - diff --git a/aichallenge/workspace/src/aichallenge_submit/aichallenge_submit_launch/map/lanelet2_map.osm b/aichallenge/workspace/src/aichallenge_submit/aichallenge_submit_launch/map/lanelet2_map.osm index 49147919..0501b7a0 100644 --- a/aichallenge/workspace/src/aichallenge_submit/aichallenge_submit_launch/map/lanelet2_map.osm +++ b/aichallenge/workspace/src/aichallenge_submit/aichallenge_submit_launch/map/lanelet2_map.osm @@ -1,6 +1,6 @@ - + @@ -1561,39 +1561,39 @@ - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + @@ -1746,29 +1746,29 @@ - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + @@ -2336,929 +2336,914 @@ - - - + + + - - - - + + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - + + + - - - - + + + + - - - - + + + + - - - + + + - - - + + + @@ -3281,57 +3266,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -3343,13 +3277,6 @@ - - - - - - - @@ -3365,6 +3292,11 @@ + + + + + @@ -3376,41 +3308,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -3484,20 +3385,6 @@ - - - - - - - - - - - - - - @@ -3525,197 +3412,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -3780,83 +3480,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -3926,115 +3549,699 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + \ No newline at end of file diff --git a/aichallenge/workspace/src/aichallenge_submit/booars_launch/map/lanelet2_map.osm b/aichallenge/workspace/src/aichallenge_submit/booars_launch/map/lanelet2_map.osm index 49147919..0501b7a0 100644 --- a/aichallenge/workspace/src/aichallenge_submit/booars_launch/map/lanelet2_map.osm +++ b/aichallenge/workspace/src/aichallenge_submit/booars_launch/map/lanelet2_map.osm @@ -1,6 +1,6 @@ - + @@ -1561,39 +1561,39 @@ - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + @@ -1746,29 +1746,29 @@ - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + @@ -2336,929 +2336,914 @@ - - - + + + - - - - + + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - + + + - - - - + + + + - - - - + + + + - - - + + + - - - + + + @@ -3281,57 +3266,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -3343,13 +3277,6 @@ - - - - - - - @@ -3365,6 +3292,11 @@ + + + + + @@ -3376,41 +3308,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -3484,20 +3385,6 @@ - - - - - - - - - - - - - - @@ -3525,197 +3412,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -3780,83 +3480,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -3926,115 +3549,699 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + \ No newline at end of file diff --git a/aichallenge/workspace/src/aichallenge_system/aichallenge_awsim_adapter/launch/aichallenge_awsim_adapter.launch.xml b/aichallenge/workspace/src/aichallenge_system/aichallenge_awsim_adapter/launch/aichallenge_awsim_adapter.launch.xml index 090a0514..dc0b8ab6 100644 --- a/aichallenge/workspace/src/aichallenge_system/aichallenge_awsim_adapter/launch/aichallenge_awsim_adapter.launch.xml +++ b/aichallenge/workspace/src/aichallenge_system/aichallenge_awsim_adapter/launch/aichallenge_awsim_adapter.launch.xml @@ -5,7 +5,7 @@ - + diff --git a/aichallenge/workspace/src/aichallenge_system/aichallenge_system_launch/launch/aichallenge_system.launch.xml b/aichallenge/workspace/src/aichallenge_system/aichallenge_system_launch/launch/aichallenge_system.launch.xml index 03c8124a..8cb04494 100644 --- a/aichallenge/workspace/src/aichallenge_system/aichallenge_system_launch/launch/aichallenge_system.launch.xml +++ b/aichallenge/workspace/src/aichallenge_system/aichallenge_system_launch/launch/aichallenge_system.launch.xml @@ -1,9 +1,9 @@ - - - + + + diff --git a/docker_build.sh b/docker_build.sh index 2fc35bda..39e6cba5 100755 --- a/docker_build.sh +++ b/docker_build.sh @@ -7,7 +7,7 @@ case "${target}" in opts="--no-cache" ;; "dev") - opts="" + opts="--no-cache" ;; *) echo "invalid argument (use 'dev' or 'eval')" @@ -16,4 +16,4 @@ case "${target}" in esac # shellcheck disable=SC2086 -docker build ${opts} --target "${target}" -t "aichallenge-2024-${target}" . +docker build ${opts} --target "${target}" -t "aichallenge-2024-${target}-${USER}" . diff --git a/docker_run.sh b/docker_run.sh index 3362083e..10c21996 100755 --- a/docker_run.sh +++ b/docker_run.sh @@ -32,4 +32,4 @@ esac mkdir -p output # shellcheck disable=SC2086 -rocker ${opts} --x11 --device /dev/dri --user --net host --privileged --volume ${volume} -- "aichallenge-2024-${target}" +rocker ${opts} --x11 --devices /dev/dri --user --net host --privileged --name aichallenge-2024-$(date "+%Y-%m-%d-%H-%M-%S") --volume ${volume} -- "aichallenge-2024-${target}-${USER}" diff --git a/run_script.tmux b/run_script.tmux new file mode 100644 index 00000000..907043f3 --- /dev/null +++ b/run_script.tmux @@ -0,0 +1,70 @@ +#!/bin/bash + +# docker setup +AIC_DIR="/home/$USER/aichallenge-2024" +VEHICLE_DIR="/home/$USER/aichallenge-2024/vehicle" + +AIC_CD="cd $AIC_DIR" +VEHICLE_CD="cd $VEHICLE_DIR" + +AIC_DOCKER_RUN_CMD="bash docker_run.sh dev cpu" +KART_DOCKER_RUN_CMD="bash run_driver.bash" +ZENOH_DOCKER_RUN_CMD="bash run_zenoh.bash" + +AIC_WORKSPACE_CD_CMD="cd /aichallenge" +SOURCE_CMD="source install/setup.bash" + +# mouse setup +set-option -g mouse on +bind-key -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'" +bind-key -n WheelDownPane select-pane -t= \; send-keys -M + +set-window-option -g mode-keys vi +bind-key -T copy-mode-vi v send -X begin-selection +bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "xclip -sel clip -i" + + +# split-vertical +# 1. 初期のペインで左右に分割 +select-pane -t 0 # 最初のペイン (0) を選択 +split-window -h -p 50 # 左右に 50% 分割して、右にペイン 1 を作成 + +# 2. 右側のペインを選択して上下に 3 回分割 +select-pane -t 1 # 右側のペイン (1) を選択 +split-window -v -p 67 # ペイン 1 を 67% 下で分割し、ペイン 2 を作成 +split-window -v -p 50 # ペイン 2 を 50% 下で分割し、ペイン 3 を作成 +split-window -v -p 50 # ペイン 3 を 50% 下で分割し、ペイン 4 を作成 +# pane 0 is used for aic +select-pane -t 0 +send-keys "set -x" C-m +send-keys "$AIC_CD" C-m +send-keys "echo $AIC_WORKSPACE_CD_CMD" C-m +send-keys "echo $SOURCE_CMD" C-m +send-keys "echo run_autoware.bash vehicle" C-m +send-keys "$AIC_DOCKER_RUN_CMD" C-m + +# pane 1 is used for aic rosbag record +select-pane -t 1 +send-keys "set -x" C-m +send-keys "$AIC_CD" C-m +send-keys "sleep 2" C-m +send-keys "echo $AIC_WORKSPACE_CD_CMD" C-m +send-keys "echo $SOURCE_CMD" C-m +send-keys "$AIC_DOCKER_RUN_CMD" C-m + +# pane 2 is used for racing kart docker +select-pane -t 2 +send-keys "set -x" C-m +send-keys "$VEHICLE_CD" C-m +send-keys "$KART_DOCKER_RUN_CMD" C-m + +# pane 3 is used for zenoh docker +select-pane -t 3 +send-keys "set -x" C-m +send-keys "$VEHICLE_CD" C-m +send-keys "sleep 10" C-m +send-keys "$ZENOH_DOCKER_RUN_CMD " C-m + +# pane 4 is used for anything +select-pane -t 4 +send-keys "set -x" C-m diff --git a/run_veihcle_tmux.sh b/run_veihcle_tmux.sh new file mode 100644 index 00000000..ee5d98d3 --- /dev/null +++ b/run_veihcle_tmux.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +bash stop_vehicle_tmux.sh +gnome-terminal --maximize --zoom 0.7 -- tmux new-session \; source-file run_script.tmux diff --git a/stop_vehicle_tmux.sh b/stop_vehicle_tmux.sh new file mode 100644 index 00000000..9066df0d --- /dev/null +++ b/stop_vehicle_tmux.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# kill tmux server +tmux kill-server +# kill all docker +docker rm -f "$(docker ps -a -q)" diff --git a/cyclonedds.xml b/vehicle/cyclonedds.xml similarity index 100% rename from cyclonedds.xml rename to vehicle/cyclonedds.xml diff --git a/vehicle/run_driver.bash b/vehicle/run_driver.bash new file mode 100755 index 00000000..efc7d987 --- /dev/null +++ b/vehicle/run_driver.bash @@ -0,0 +1,2 @@ +#!/bin/bash +rocker --x11 --devices /dev/dri --volume /dev/vcu --user --user-preserve-groups dialout --net host --privileged --name racing_kart_interface ghcr.io/automotiveaichallenge/racing_kart_interface "$@" diff --git a/vehicle/run_zenoh.bash b/vehicle/run_zenoh.bash new file mode 100755 index 00000000..a1e13a21 --- /dev/null +++ b/vehicle/run_zenoh.bash @@ -0,0 +1,10 @@ +#!/bin/bash +SCRIPT_DIR=$(readlink -f "$(dirname "$0")") +docker run --rm \ + --net=host \ + -e ROS_DISTRO=humble \ + -e RMW_IMPLEMENTATION=rmw_cyclonedds_cpp \ + -e CYCLONEDDS_URI=file:///vehicle/cyclonedds.xml \ + -v "${SCRIPT_DIR}:/vehicle" \ + --name zenoh \ + eclipse/zenoh-bridge-ros2dds:latest -c /vehicle/zenoh.json5 diff --git a/vehicle/try_vcu_reset.py b/vehicle/try_vcu_reset.py new file mode 100755 index 00000000..63d6feb5 --- /dev/null +++ b/vehicle/try_vcu_reset.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python3 +# This script send Ctrl + C several times, then send Ctrl + D. + +import argparse +import serial +import time + +parser = argparse.ArgumentParser() +parser.add_argument("--device", default="/dev/vcu/usb") +args = parser.parse_args() + +device = serial.Serial(args.device, 115200, timeout=None) +for _ in range(10): + device.write(b"\x03") + time.sleep(0.1) +device.write(b"\x04") +device.close() diff --git a/vehicle/zenoh.json5 b/vehicle/zenoh.json5 new file mode 100644 index 00000000..2209157f --- /dev/null +++ b/vehicle/zenoh.json5 @@ -0,0 +1,232 @@ +//// +//// This file presents the default configuration used by both the `zenoh-plugin-ros2dds` plugin and the `zenoh-bridge-ros2dds` standalone executable. +//// The "ros2" JSON5 object below can be used as such in the "plugins" part of a config file for the zenoh router (zenohd). +//// +{ + plugins: { + //// + //// ROS2 related configuration + //// All settings are optional and are unset by default - uncomment the ones you want to set + //// + ros2dds: { + //// + //// nodename: A ROS node name to be used by this bridge. + //// Default: "zenoh_bridge_ros2dds" + //// + // nodename: "zenoh_bridge_ros2dds", + + //// + //// namespace: A ROS namespace which: + //// - is used for the "zenoh_bridge_ros2dds" node itself + //// - is added to all discovered interfaces when routed to Zenoh + //// (i.e. a "cmd_vel" topic in the robot will be seen as "namespace/cmd_vel" outside the robot) + //// Note that this also applies to topics with absolute path such as "/rosout", "/tf" and "/tf_static". + //// Default: "/" + //// + // namespace: "/", + + //// + //// domain: The DDS Domain ID. By default set to 0, or to "$ROS_DOMAIN_ID" is this environment variable is defined. + //// + // domain: 0, + + //// + //// ros_localhost_only: If set to true, the DDS discovery and traffic will occur only on the localhost interface (127.0.0.1). + //// By default set to false, unless the "ROS_LOCALHOST_ONLY=1" environment variable is defined. + //// + // ros_localhost_only: true, + + //// + //// shm_enabled: If set to true, the DDS implementation will use Iceoryx shared memory. + //// Requires the bridge to be built with the 'dds_shm' feature for this option to valid. + //// By default set to false. + //// + // shm_enabled: false, + + //// + //// allow / deny: Specify the lists of ROS 2 interfaces that are allowed or denied to be routed over Zenoh. + //// Each element of the lists is a regular expression that must match the full interface name. + //// You cannot set both 'allow' and 'deny' in the same configuration. + //// If neither 'allow' nor 'deny' are set, all interfaces are allowed. + //// Use 'allow' to allow only the specified interfaces. If an interface type is set to an empty list + //// or is not specified at all, it means that NO such interface is allowed. + //// Use 'deny' to allow all except the specified interfaces. If an interface type is set to an empty list + //// or is not specified at all, it means that ALL such interface are allowed. + //allow: { + // publishers: [], + // subscribers: [], + // service_servers: [], + // service_clients: [], + // action_servers: [], + // action_clients: [], + //}, + // deny: { + // publishers: ["/rosout", "/parameter_events"], + // subscribers: ["/rosout"], + // service_servers: [".*/set_parameters"], + // service_clients: [".*/set_parameters"], + // action_servers: [], + // action_clients: [], + // }, + + //// + //// pub_max_frequencies: Specify a list of maximum frequency of publications routing over zenoh for a set of Publishers. + //// The strings must have the format "=": + //// - "regex" is a regular expression matching a Publisher interface name + //// - "float" is the maximum frequency in Hertz; + //// if publication rate is higher, downsampling will occur when routing. + // pub_max_frequencies: [".*/laser_scan=5", "/tf=10"], + + //// + //// pub_priorities: Specify a list of priorities of publications routing over zenoh for a set of Publishers. + //// In case of high traffic, the publications with higher priorities will overtake + //// the publications with lower priorities in Zenoh publication queues. + //// The strings must have the format "=[:express]": + //// - "regex" is a regular expression matching a Publisher topic name + //// - "integer" is a priority value in the range [1-7]. Highest priority is 1, lowest is 7 and default is 5. + //// (see Zenoh Priority definition here: https://docs.rs/zenoh/latest/zenoh/publication/enum.Priority.html) + //// - ":express" is an option to indicate that the Zenoh express policy must be used for those publications. + //// The express policy makes Zenoh to to send the message immediately, not waiting for possible further messages + //// to create a bigger batch of messages. This usually has a positive impact on latency for the topic + //// but a negative impact on the general throughput, as more overhead is used for those topics. + pub_priorities: ["/joy=1:express"], + + //// + //// reliable_routes_blocking: When true, the publications from a RELIABLE DDS Writer will be + //// routed to zenoh using the CongestionControl::Block option. + //// Meaning the routing will be blocked in case of network congestion, + //// blocking the DDS Reader and the RELIABLE DDS Writer in return. + //// When false (or for BEST_EFFORT DDS Writers), CongestionControl::Drop + //// is used, meaning the route might drop some data in case of congestion. + //// + // reliable_routes_blocking: true, + + //// + //// queries_timeout: Timeouts configuration for various Zenoh queries. + //// Each field is optional. If not set, the 'default' timeout (5.0 seconds by default) applies to all queries. + //// Each value can be either a float in seconds that will apply as a timeout to all queries, + //// either a list of strings with format "=" where: + //// - "regex" is a regular expression matching an interface name + //// - "float" is the timeout in seconds + queries_timeout: { + // //// default timeout that will apply to all query, except the ones specified below + // //// in 'transient_local_subscribers', 'services' and 'actions' + default: 2.0, + // //// timeouts for TRANSIENT_LOCAL subscriber when querying publishers for historical publications + // transient_local_subscribers: 1.0, + // //// timeouts for Service clients calling a Service server + // services: ["add_two_ints=0.5", ".*=1.0"], + // //// timeouts for Action clients calling an Action server (send_goal, cancel_goal and get_result services) + // actions: { + // send_goal: 1.0, + // cancel_goal: 1.0, + // get_result: [".*long_mission=3600", ".*short_action=10.0"], + // } + }, + + //// + //// This plugin uses Tokio (https://tokio.rs/) for asynchronous programming. + //// When running as a plugin within a Zenoh router, the plugin creates its own Runtime managing 2 pools of threads: + //// - worker threads for non-blocking tasks. Those threads are spawn at Runtime creation. + //// - blocking threads for blocking tasks (e.g. I/O). Those threads are spawn when needed. + //// For more details see https://github.com/tokio-rs/tokio/discussions/3858#discussioncomment-869878 + //// When running as a standalone bridge the Zenoh Session's Runtime is used and can be configured via the + //// `ZENOH_RUNTIME` environment variable. See https://docs.rs/zenoh-runtime/latest/zenoh_runtime/enum.ZRuntime.html + //// + + //// work_thread_num: The number of worker thread in the asynchronous runtime will use. (default: 2) + //// Only for a plugin, no effect on a bridge. + // work_thread_num: 2, + + //// max_block_thread_num: The number of blocking thread in the asynchronous runtime will use. (default: 50) + //// Only for a plugin, no effect on a bridge. + // max_block_thread_num: 50, + }, + + //// + //// REST API configuration (active only if this part is defined) + //// + // rest: { + // //// + // //// The HTTP port number (for all network interfaces). + // //// You can bind on a specific interface setting a ":" string. + // //// + // http_port: 8000, + // }, + }, + + //// + //// Zenoh related configuration. + //// Only the most relevant sections are displayed here. + //// For a complete view of configuration possibilities, see https://github.com/eclipse-zenoh/zenoh/blob/main/DEFAULT_CONFIG.json5 + //// + + /// The identifier (as unsigned 128bit integer in hexadecimal lowercase - leading zeros are not accepted) + /// that zenoh runtime will use. + /// If not set, a random unsigned 128bit integer will be used. + /// WARNING: this id must be unique in your zenoh network. + // id: "1234567890abcdef", + + //// + //// mode: The bridge's mode (router, peer or client) + //// + //mode: "router", + + //// + //// Which endpoints to connect to. E.g. tcp/localhost:7447. + //// By configuring the endpoints, it is possible to tell zenoh which remote router or other zenoh-bridge-ros2dds to connect to at startup. + //// + connect: { + endpoints: [ + // "/:" + ], + }, + + //// + //// Which endpoints to listen on. + //// By configuring the endpoints, it is possible to tell zenoh which are the endpoints that other routers, + //// peers, or client can use to establish a zenoh session. + //// In 'router' mode (default) the zenoh-bridge-ros2dds is listening by default on `tcp/0.0.0.0:7447` (`0.0.0.0` meaning all the available network interfaces) + //// + // listen: { + // endpoints: [ + // // "/:" + // ] + //}, + + //// + //// Configure the scouting mechanisms and their behaviors + //// + //scouting: { + // /// The UDP multicast scouting configuration. + // multicast: { + // /// Whether multicast scouting is enabled or not + // enabled: true, + // /// The socket which should be used for multicast scouting + // address: "224.0.0.224:7446", + // /// The network interface which should be used for multicast scouting + // interface: "auto", // If not set or set to "auto" the interface if picked automatically + // /// Which type of Zenoh instances to automatically establish sessions with upon discovery on UDP multicast. + // /// Accepts a single value or different values for router, peer and client. + // /// Each value is bit-or-like combinations of "peer", "router" and "client". + // autoconnect: { router: "", peer: "router|peer" }, + // /// Whether or not to listen for scout messages on UDP multicast and reply to them. + // listen: true, + // }, + // /// The gossip scouting configuration. + // gossip: { + // /// Whether gossip scouting is enabled or not + // enabled: true, + // /// When true, gossip scouting information is propagated multiple hops to all nodes in the local network. + // /// When false, gossip scouting information is only propagated to the next hop. + // /// Activating multihop gossip implies more scouting traffic and a lower scalability. + // /// It mostly makes sense when using "linkstate" routing mode where all nodes in the subsystem don't have + // /// direct connectivity with each other. + // multihop: false, + // /// Which type of Zenoh instances to automatically establish sessions with upon discovery on gossip. + // /// Accepts a single value or different values for router, peer and client. + // /// Each value is bit-or-like combinations of "peer", "router" and "client". + // autoconnect: { router: "", peer: "router|peer" }, + // }, + //}, +}