File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4545 - role : autoware.dev_env.rmw_implementation
4646 - role : autoware.dev_env.gdown
4747 - role : autoware.dev_env.build_tools
48+ - role : autoware.dev_env.agnocast
4849
4950 # Autoware module dependencies
5051 - role : autoware.dev_env.geographiclib
Original file line number Diff line number Diff line change 1+ # agnocast
2+
3+ This role installs [ Agnocast] ( https://github.com/tier4/agnocast ) , true zero-copy communication middleware for all ROS 2 message types.
4+
5+ ## Inputs
6+
7+ None.
8+
9+ ## Manual Installation
10+
11+ ``` bash
12+ agnocast_version=" 2.1.0"
13+ agnocast_heaphook_package=" agnocast-heaphook-v${agnocast_version} "
14+ agnocast_kmod_package=" agnocast-kmod-v${agnocast_version} "
15+
16+ sudo add-apt-repository -y ppa:t4-system-software/agnocast
17+ sudo apt update
18+ sudo apt install -y " ${agnocast_heaphook_package} "
19+
20+ if dkms status | grep agnocast | grep -q " {agnocast_version}" ; then
21+ echo " agnocast-kmod-v${agnocast_version} is already registered in dkms. Skipping purge and install."
22+ else
23+ sudo apt purge -y " ${agnocast_kmod_package} "
24+ sudo apt install -y " ${agnocast_kmod_package} "
25+ fi
26+
27+ ```
Original file line number Diff line number Diff line change 1+ agnocast_version : 2.1.0
2+ agnocast_heaphook_package : agnocast-heaphook-v{{ agnocast_version }}
3+ agnocast_kmod_package : agnocast-kmod-v{{ agnocast_version }}
Original file line number Diff line number Diff line change 1+ - name : Install linux headers for the running kernel
2+ ansible.builtin.apt :
3+ name : linux-headers-{{ ansible_kernel }}
4+ state : present
5+ become : true
6+
7+ - name : Add agnocast PPA repository
8+ ansible.builtin.apt_repository :
9+ repo : ppa:t4-system-software/agnocast
10+ state : present
11+ become : true
12+
13+ - name : Update apt cache
14+ ansible.builtin.apt :
15+ update_cache : true
16+ become : true
17+
18+ - name : Install {{ agnocast_heaphook_package }}
19+ ansible.builtin.apt :
20+ name : " {{ agnocast_heaphook_package }}"
21+ state : present
22+ become : true
23+
24+ - name : Check if agnocast-kmod is installed in dkms with version v{{ agnocast_version }}
25+ ansible.builtin.shell : dkms status | grep agnocast | grep {{ agnocast_version }} # noqa: risky-shell-pipe
26+ register : dkms_status
27+ failed_when : false
28+ changed_when : false
29+
30+ - name : Purge agnocast-kmod if not found in dkms for version v{{ agnocast_version }}
31+ ansible.builtin.apt :
32+ name : " {{ agnocast_kmod_package }}"
33+ state : absent
34+ become : true
35+ when : dkms_status.rc != 0
36+
37+ - name : Install agnocast-kmod if not found in dkms for version v{{ agnocast_version }}
38+ ansible.builtin.apt :
39+ name : " {{ agnocast_kmod_package }}"
40+ state : present
41+ become : true
42+ when : dkms_status.rc != 0
Original file line number Diff line number Diff line change @@ -116,3 +116,12 @@ repositories:
116116 type: git
117117 url: https://github.com/autowarefoundation/autoware_individual_params.git
118118 version: 70000825155182d9261ce0980076b0e2c6dc3f51
119+ # middleware
120+ # TODO(TIER IV): During the transition period of Agnocast introduction,
121+ # the Agnocast ROS packages are provided as a source build.
122+ # Once the transition stabilizes, use the packages released from the official ROS repository.
123+ # Issue: https://github.com/autowarefoundation/autoware/issues/5968
124+ middleware/external/agnocast:
125+ type: git
126+ url: https://github.com/tier4/agnocast.git
127+ version: 2.1.0
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ COPY src/universe/external /autoware/src/universe/external
4848# trt_batched_nms depends on autoware_tensorrt_common and autoware_cuda_utils, which are not available in universe-common-devel stage
4949RUN rm -rf /autoware/src/universe/external/trt_batched_nms
5050COPY src/universe/autoware_universe/common /autoware/src/universe/autoware_universe/common
51+ COPY src/middleware/external /autoware/src/middleware/external
5152RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} \
5253 > /rosdep-universe-common-depend-packages.txt \
5354 && cat /rosdep-universe-common-depend-packages.txt
@@ -240,6 +241,7 @@ RUN --mount=type=cache,target=${CCACHE_DIR} \
240241 --mount=type=bind,source=src/universe/external/rtklib_ros_bridge,target=/autoware/src/universe/external/rtklib_ros_bridge \
241242 --mount=type=bind,source=src/universe/external/tier4_ad_api_adaptor,target=/autoware/src/universe/external/tier4_ad_api_adaptor \
242243 --mount=type=bind,source=src/universe/external/tier4_autoware_msgs,target=/autoware/src/universe/external/tier4_autoware_msgs \
244+ --mount=type=bind,source=src/middleware/external,target=/autoware/src/middleware/external \
243245 source /opt/ros/"$ROS_DISTRO" /setup.bash \
244246 && source /opt/autoware/setup.bash \
245247 && /autoware/build_and_clean.sh ${CCACHE_DIR} /opt/autoware
Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ This stage installs the dependency packages based on `/rosdep-universe-common-de
121121
122122- ` universe/external `
123123- ` universe/autoware_universe/common `
124+ - ` middleware/external `
124125
125126### ` universe-common-devel-cuda `
126127
You can’t perform that action at this time.
0 commit comments