Skip to content

Commit 47f92ea

Browse files
authored
Merge pull request #1154 from n-kawauchi/add_ubuntu2404
Ubuntu24.04のdebパッケージ生成向け整備
2 parents 6e0cadc + 18e1fe3 commit 47f92ea

File tree

10 files changed

+1210
-29
lines changed

10 files changed

+1210
-29
lines changed

CMakeLists.txt

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -965,17 +965,27 @@ if(UNIX)
965965
)
966966
endif()
967967
file(STRINGS "/etc/os-release" data_list REGEX "^(VERSION_CODENAME)=")
968+
# Look for lines like VERSION_CODENAME="..."
969+
foreach(var ${data_list})
970+
if("${var}" MATCHES "^(VERSION_CODENAME)=(.*)$")
971+
set(ubuntu_codename "${CMAKE_MATCH_2}")
972+
endif()
973+
endforeach()
974+
975+
if(${ubuntu_codename} MATCHES "focal" OR
976+
${ubuntu_codename} MATCHES "jammy")
977+
configure_file(${PROJECT_SOURCE_DIR}/src/ext/transport/FastRTPS/CORBACdrDataPubSubTypes.cpp.ubuntu2204_earlier
978+
${PROJECT_SOURCE_DIR}/src/ext/transport/FastRTPS/CORBACdrDataPubSubTypes.cpp @ONLY
979+
)
980+
configure_file(${PROJECT_SOURCE_DIR}/src/ext/transport/ROS2Transport/ROS2Serializer.h.ubuntu2204_earlier
981+
${PROJECT_SOURCE_DIR}/src/ext/transport/ROS2Transport/ROS2Serializer.h @ONLY
982+
)
983+
endif()
968984

969985
if(BUILD_RTM_LINUX_PKGS)
970-
# Look for lines like VERSION_CODENAME="..."
971-
foreach(var ${data_list})
972-
if("${var}" MATCHES "^(VERSION_CODENAME)=(.*)$")
973-
set(ubuntu_codename "${CMAKE_MATCH_2}")
974-
configure_file(${PROJECT_SOURCE_DIR}/packages/deb/debian/control.${ubuntu_codename}
986+
configure_file(${PROJECT_SOURCE_DIR}/packages/deb/debian/control.${ubuntu_codename}
975987
${PROJECT_BINARY_DIR}/control @ONLY
976-
)
977-
endif()
978-
endforeach()
988+
)
979989
endif()
980990
else()
981991
configure_file(${PROJECT_SOURCE_DIR}/packages/deb/debian/rules.not-ros-support.in

packages/deb/debian/control.noble

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
Source: openrtm2
2+
Section: science
3+
Priority: extra
4+
Maintainer: Noriaki Ando <n-ando@aist.go.jp>
5+
Build-Depends: debhelper (>= 9), libomniorb4-dev, omniidl4 | omniidl, omniorb4-nameserver | omniorb-nameserver, python3, uuid-dev
6+
Standards-Version: 3.8.4
7+
Homepage: http://www.openrtm.org
8+
9+
Package: openrtm2
10+
Architecture: any
11+
Multi-Arch: same
12+
Pre-Depends: ${misc:Pre-Depends}
13+
Depends: ${misc:Depends}, omniorb-nameserver, openrtm2-naming (>= 2.0.2-0)
14+
Description: OpenRTM-aist, RT-Middleware distributed by AIST
15+
OpenRTM-aist is a reference implementation of RTC (Robotic Technology
16+
Component Version 1.1, formal/12-09-01) specification which is OMG
17+
standard (http://www.omg.org/spec/RTC/). OpenRTM-aist includes
18+
RT-Middleware runtime environment and RTC framework. The OMG standard
19+
defines a component model and certain important infrastructure
20+
services applicable to the domain of robotics software
21+
development. OpenRTM-aist is being developed and distributed by
22+
National Institute of Advanced Industrial Science and Technology
23+
(AIST), Japan. Please see http://www.openrtm.org/ for more detail.
24+
25+
Package: openrtm2-naming
26+
Architecture: any
27+
Multi-Arch: same
28+
Replaces: openrtm2 (<< 2.0.2-0)
29+
Breaks: openrtm2 (<< 2.0.2-0)
30+
Description: OpenRTM-aist name server launcher
31+
32+
Package: openrtm2-ros2-tp
33+
Architecture: any
34+
Multi-Arch: same
35+
Depends: openrtm2, ros-jazzy-ros-core
36+
Description: OpenRTM-aist extension ROS2 package
37+
Extensions of OpenRTM-aist
38+
39+
Package: openrtm2-dev
40+
Architecture: any
41+
Multi-Arch: same
42+
Depends: openrtm2, openrtm2-idl
43+
Description: OpenRTM-aist headers for development
44+
The header files and libraries needed for developing RT-Components
45+
using OpenRTM-aist.
46+
47+
Package: openrtm2-idl
48+
Architecture: any
49+
Multi-Arch: same
50+
Description: OpenRTM-aist idls for development
51+
The idl files needed for developing RT-Components using OpenRTM-aist.
52+
53+
Package: openrtm2-example
54+
Architecture: any
55+
Multi-Arch: same
56+
Depends: openrtm2
57+
Description: OpenRTM-aist examples
58+
Example components and sources of OpenRTM-aist
59+
60+
Package: openrtm2-doc
61+
Architecture: all
62+
Description: Documentation for openrtm2
63+
Class reference manual of OpenRTM-aist.

scripts/openrtm2_install_ubuntu.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# = OPT_UNINST : uninstallation
1515
#
1616

17-
VERSION=2.0.2.01
17+
VERSION=2.0.2.02
1818
FILENAME=openrtm2_install_ubuntu.sh
1919

2020
#
@@ -92,6 +92,7 @@ cmake_tools="cmake doxygen graphviz nkf"
9292
build_tools="subversion git"
9393
deb_pkg="uuid-dev libboost-filesystem-dev"
9494
pkg_tools="build-essential debhelper devscripts"
95+
fluentbit19="td-agent-bit"
9596
fluentbit="fluent-bit"
9697
omni_devel="libomniorb4-dev omniidl"
9798
omni_runtime="omniorb-nameserver"
@@ -567,7 +568,11 @@ u_src_pkgs="$omni_runtime $omni_devel"
567568
dev_pkgs="$runtime_pkgs $src_pkgs $openrtm2_devel"
568569
u_dev_pkgs="$u_runtime_pkgs $openrtm2_devel"
569570

570-
core_pkgs="$src_pkgs $autotools $build_tools $pkg_tools $fluentbit"
571+
if test "x$code_name" = "xfocal" || test "x$code_name" = "xjammy" ; then
572+
core_pkgs="$src_pkgs $autotools $build_tools $pkg_tools $fluentbit19"
573+
else
574+
core_pkgs="$src_pkgs $autotools $build_tools $pkg_tools"
575+
fi
571576
u_core_pkgs="$u_src_pkgs"
572577

573578
ros_pkg="$openrtm2_ros"
@@ -912,8 +917,10 @@ if test "x$OPT_UNINST" = "xtrue" ; then
912917
fi
913918

914919
if test "x$OPT_COREDEVEL" = "xtrue" ; then
915-
sudo systemctl enable fluent-bit
916-
sudo systemctl start fluent-bit
920+
if test "x$code_name" = "xfocal" || test "x$code_name" = "xjammy" ; then
921+
sudo systemctl enable td-agent-bit
922+
sudo systemctl start td-agent-bit
923+
fi
917924
fi
918925

919926
install_result $install_pkgs

scripts/ubuntu_2404/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM openrtm/devel-rtm:ubuntu24.04
2+
3+
COPY OpenRTM-aist /root/OpenRTM-aist
4+
RUN cmake\
5+
-DSSL_ENABLE=ON\
6+
-DOBSERVER_ENABLE=ON\
7+
-DFLUENTBIT_ENABLE=ON\
8+
-DFLUENTBIT_ROOT=/usr/local\
9+
-DFLUENTBIT_ADD_INCLUDE=ON\
10+
-DFASTRTPS_ENABLE=ON\
11+
-DROS2_ENABLE=ON\
12+
-DCMAKE_BUILD_TYPE=Release\
13+
-S /root/OpenRTM-aist\
14+
-B /tmp/rtm/build\
15+
&& cmake --build /tmp/rtm/build -j $(nproc)
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
FROM ubuntu:24.04 as fluent
2+
3+
RUN apt update\
4+
&& apt install -y --no-install-recommends\
5+
g++\
6+
make\
7+
cmake\
8+
ca-certificates\
9+
wget\
10+
flex\
11+
bison\
12+
libyaml-dev\
13+
libssl-dev
14+
15+
# downlaod fluent-bit.
16+
RUN mkdir /root/fluent-bit
17+
RUN wget -O - https://github.com/fluent/fluent-bit/archive/refs/tags/v3.0.7.tar.gz\
18+
| tar xfz - -C /root/fluent-bit --strip-components 1
19+
RUN sed -i -e 's/jemalloc-5.3.0\/configure/jemalloc-5.3.0\/configure --disable-initial-exec-tls/g' /root/fluent-bit/CMakeLists.txt
20+
21+
# build fluent-bit.
22+
RUN cmake -DFLB_DEBUG=Off\
23+
-DFLB_TRACE=Off\
24+
-DFLB_JEMALLOC=On\
25+
-DFLB_TLS=On\
26+
-DFLB_SHARED_LIB=On\
27+
-DFLB_EXAMPLES=Off\
28+
-DFLB_HTTP_SERVER=On\
29+
-DFLB_IN_SYSTEMD=On\
30+
-DFLB_OUT_KAFKA=On\
31+
-DCMAKE_BUILD_TYPE=Release\
32+
-DCMAKE_INSTALL_PREFIX=/tmp/flb/install\
33+
-S /root/fluent-bit\
34+
-B/tmp/flb/build
35+
RUN cmake --build /tmp/flb/build --target install/strip -- -j$(nproc)
36+
37+
# install header files.
38+
RUN cp -r /tmp/flb/build/include/jemalloc\
39+
/root/fluent-bit/lib/cfl/include/cfl\
40+
/root/fluent-bit/lib/cfl/lib/xxhash/*.h\
41+
/root/fluent-bit/lib/msgpack-*/include/msgpack.h\
42+
/root/fluent-bit/lib/msgpack-*/include/msgpack\
43+
/root/fluent-bit/lib/ctraces/lib/mpack/src/mpack\
44+
/root/fluent-bit/lib/c-ares-*/include/*.h\
45+
/tmp/flb/install/include/
46+
RUN cp -r /tmp/flb/build/lib/c-ares-*/ares_build.h\
47+
/tmp/flb/build/lib/c-ares-*/ares_config.h\
48+
/root/fluent-bit/lib/cmetrics/include/cmetrics\
49+
/root/fluent-bit/lib/cmetrics/include/prometheus_remote_write\
50+
/root/fluent-bit/lib/ctraces/include/ctraces\
51+
/tmp/flb/install/include/
52+
RUN cp /tmp/flb/build/lib/monkey/include/monkey/mk_core/mk_core_info.h\
53+
/tmp/flb/install/include/monkey/mk_core/
54+
55+
############################################################
56+
FROM ubuntu:24.04 as rtm-build
57+
58+
ENV ROS2_DISTRO=jazzy
59+
ENV AMENT_PREFIX_PATH=/opt/ros/${ROS2_DISTRO}
60+
ENV PYTHONPATH=/opt/ros/${ROS2_DISTRO}/lib/python3.12/site-packages:${PYTHONPATH}
61+
ENV PATH=/opt/ros/${ROS2_DISTRO}/bin:${PATH}
62+
ENV CMAKE_PREFIX_PATH=/opt/ros/${ROS2_DISTRO}:${CMAKE_PREFIX_PATH}
63+
RUN apt update\
64+
&& apt install -y --no-install-recommends curl gnupg2 lsb-release ca-certificates\
65+
&& curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg\
66+
&& sh -c 'echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros2.list'\
67+
&& apt update\
68+
&& DEBIAN_FRONTEND=noninteractive apt install -y ros-${ROS2_DISTRO}-ros-core\
69+
&& apt clean\
70+
&& rm -rf /var/lib/apt/lists/*
71+
72+
RUN apt update\
73+
&& apt install -y --no-install-recommends\
74+
g++\
75+
make\
76+
cmake\
77+
uuid-dev\
78+
libboost-filesystem-dev\
79+
omniorb-nameserver\
80+
libomniorb4-dev\
81+
omniidl\
82+
&& apt clean\
83+
&& rm -rf /var/lib/apt/lists/*
84+
85+
COPY --from=fluent /tmp/flb/install /usr/local/
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
FROM openrtm/devel-rtm:ubuntu24.04
2+
3+
RUN apt-get update\
4+
&& apt-get install -y --no-install-recommends\
5+
doxygen\
6+
graphviz\
7+
build-essential\
8+
debhelper\
9+
devscripts\
10+
fakeroot
11+
12+
COPY OpenRTM-aist /root/OpenRTM-aist
13+
RUN cmake\
14+
-DSSL_ENABLE=ON\
15+
-DOBSERVER_ENABLE=ON\
16+
-DFASTRTPS_ENABLE=ON\
17+
-DROS2_ENABLE=ON\
18+
-DDOCUMENTS_ENABLE=ON\
19+
-DBUILD_RTM_LINUX_PKGS=ON\
20+
-DCMAKE_BUILD_TYPE=Release\
21+
-DCMAKE_INSTALL_PREFIX=/tmp/rtm/install\
22+
-S /root/OpenRTM-aist\
23+
-B/tmp/rtm/build\
24+
&& cmake --build /tmp/rtm/build --target install/strip -- -j$(nproc)
25+
26+
WORKDIR /root/OpenRTM-aist/packages/deb/
27+
RUN mkdir -p /root/cxx-deb-pkgs\
28+
&& cp /tmp/rtm/build/rules debian/\
29+
&& cp /tmp/rtm/build/control debian/\
30+
&& chmod 775 dpkg_build.sh\
31+
&& export LD_LIBRARY_PATH=/opt/ros/jazzy/lib\
32+
&& ./dpkg_build.sh
33+
34+
RUN cp /root/OpenRTM-aist/packages/openrtm* /root/cxx-deb-pkgs/

src/ext/transport/FastRTPS/CORBACdrDataPubSubTypes.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ namespace RTC
7070
endian = eprosima::fastcdr::Cdr::BIG_ENDIANNESS;
7171
}
7272
eprosima::fastcdr::Cdr ser(fastbuffer, endian,
73-
eprosima::fastcdr::Cdr::DDS_CDR); // Object that serializes the data.
74-
payload->encapsulation = ser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE;
73+
eprosima::fastcdr::DDS_CDR); // Object that serializes the data.
74+
payload->encapsulation = ser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE;
7575
// Serialize encapsulation
7676
try
7777
{
@@ -87,7 +87,7 @@ namespace RTC
8787
std::cout << "BadParamException:" << e.what() << std::endl;
8888
return false;
8989
}
90-
uint32_t data_size = p_type->getDataLength() + (uint32_t)ser.getSerializedDataLength();
90+
uint32_t data_size = p_type->getDataLength() + (uint32_t)ser.get_serialized_data_length();
9191
try
9292
{
9393
payload->reserve(data_size);
@@ -100,7 +100,7 @@ namespace RTC
100100
payload->length = data_size;
101101
if (payload->max_size >= data_size)
102102
{
103-
memcpy(payload->data + ser.getSerializedDataLength(), p_type->getBuffer(), p_type->getDataLength());
103+
memcpy(payload->data + ser.get_serialized_data_length(), p_type->getBuffer(), p_type->getDataLength());
104104
}
105105
}
106106
else
@@ -138,7 +138,7 @@ namespace RTC
138138
endian = eprosima::fastcdr::Cdr::BIG_ENDIANNESS;
139139
}
140140
eprosima::fastcdr::Cdr deser(fastbuffer, endian,
141-
eprosima::fastcdr::Cdr::DDS_CDR); // Object that deserializes the data.
141+
eprosima::fastcdr::DDS_CDR); // Object that deserializes the data.
142142
// Deserialize encapsulation.
143143
try
144144
{
@@ -158,9 +158,9 @@ namespace RTC
158158

159159
if (!m_header_enable)
160160
{
161-
if (payload->length >= (uint32_t)deser.getSerializedDataLength())
161+
if (payload->length >= (uint32_t)deser.get_serialized_data_length())
162162
{
163-
p_type->writeData(payload->data + deser.getSerializedDataLength(), payload->length - (uint32_t)deser.getSerializedDataLength());
163+
p_type->writeData(payload->data + deser.get_serialized_data_length(), payload->length - (uint32_t)deser.get_serialized_data_length());
164164
}
165165
}
166166
else
@@ -201,7 +201,7 @@ namespace RTC
201201

202202
if(CORBACdrData::getKeyMaxCdrSerializedSize()>16){
203203
m_md5.init();
204-
m_md5.update(m_keyBuffer,(unsigned int)ser.getSerializedDataLength());
204+
m_md5.update(m_keyBuffer,(unsigned int)ser.get_serialized_data_length());
205205
m_md5.finalize();
206206
for(uint8_t i = 0;i<16;++i) {
207207
handle->value[i] = m_md5.digest[i];

0 commit comments

Comments
 (0)