Skip to content

Commit 3c1e82e

Browse files
committed
ros2param WIP
1 parent 21df44f commit 3c1e82e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1268
-171
lines changed

.github/workflows/head_2.yml

+44-16
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-22.04
1313

1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1616
- run: sudo make install-deps
1717
- run: $APT fakeroot devscripts build-essential
1818
- run: |
@@ -30,9 +30,8 @@ jobs:
3030
ROS_CI_DESKTOP: focal
3131

3232
steps:
33-
- uses: actions/checkout@v3
33+
- uses: actions/checkout@v4
3434
- run: sudo make install-ros ROS_DISTRO=$ROS_DISTRO UBUNTU_DISTRO=$ROS_CI_DESKTOP
35-
- run: rosdep update
3635
- run: sudo make install-deps
3736
- run: $APT fakeroot devscripts build-essential
3837
- run: |
@@ -45,7 +44,7 @@ jobs:
4544
clang_noros:
4645
runs-on: ubuntu-22.04
4746
steps:
48-
- uses: actions/checkout@v3
47+
- uses: actions/checkout@v4
4948
- run: sudo apt update
5049
- run: sudo make install-deps
5150
- run: make build-tests TYPE=Debug OPTIONS=noros TARGETS="all" TC=clang ARGS=-V
@@ -54,16 +53,31 @@ jobs:
5453
jammy_gcc_noros:
5554
runs-on: ubuntu-22.04
5655
steps:
57-
- uses: actions/checkout@v3
56+
- uses: actions/checkout@v4
5857
- run: sudo apt update
5958
- run: sudo make install-deps
6059
- run: make build-tests TYPE=Debug OPTIONS=noros TARGETS="all" TC=gcc ARGS=-V
6160

61+
jammy_gcc_ros:
62+
runs-on: ubuntu-22.04
63+
64+
env:
65+
ROS_DISTRO: humble
66+
ROS_CI_DESKTOP: jammy
67+
68+
steps:
69+
- uses: actions/checkout@v4
70+
- run: sudo make install-ros ROS_DISTRO=$ROS_DISTRO UBUNTU_DISTRO=$ROS_CI_DESKTOP
71+
- run: sudo make install-deps
72+
- run: |
73+
source /opt/ros/$ROS_DISTRO/setup.bash
74+
make build-tests TYPE=Debug OPTIONS=ros2 TARGETS="all" TC=gcc ARGS=-V
75+
6276
6377
focal_gcc_noros:
6478
runs-on: ubuntu-20.04
6579
steps:
66-
- uses: actions/checkout@v3
80+
- uses: actions/checkout@v4
6781
- run: sudo apt update
6882
- run: sudo make install-deps
6983
- run: make build-tests TYPE=Debug OPTIONS=noros TARGETS="all" TC=gcc ARGS=-V
@@ -78,9 +92,8 @@ jobs:
7892
ROS_CI_DESKTOP: focal
7993

8094
steps:
81-
- uses: actions/checkout@v3
95+
- uses: actions/checkout@v4
8296
- run: sudo make install-ros ROS_DISTRO=$ROS_DISTRO UBUNTU_DISTRO=$ROS_CI_DESKTOP
83-
- run: rosdep update
8497
- run: sudo make install-deps
8598
- run: |
8699
source /opt/ros/$ROS_DISTRO/setup.bash
@@ -96,9 +109,8 @@ jobs:
96109
ROS_CI_DESKTOP: focal
97110

98111
steps:
99-
- uses: actions/checkout@v3
112+
- uses: actions/checkout@v4
100113
- run: sudo make install-ros ROS_DISTRO=$ROS_DISTRO UBUNTU_DISTRO=$ROS_CI_DESKTOP
101-
- run: rosdep update
102114
- run: sudo make install-deps
103115
- run: |
104116
source /opt/ros/$ROS_DISTRO/setup.bash
@@ -109,7 +121,7 @@ jobs:
109121
runs-on: ubuntu-22.04
110122

111123
steps:
112-
- uses: actions/checkout@v3
124+
- uses: actions/checkout@v4
113125
- run: sudo apt update
114126
- run: $APT cppcheck
115127
- run: $APT python3-pip python3-setuptools
@@ -127,22 +139,38 @@ jobs:
127139
ROS_CI_DESKTOP: focal
128140

129141
steps:
130-
- uses: actions/checkout@v3
142+
- uses: actions/checkout@v4
131143
- run: sudo make install-ros ROS_DISTRO=$ROS_DISTRO UBUNTU_DISTRO=$ROS_CI_DESKTOP
132-
- run: rosdep update
133144
- run: sudo make install-deps
134145
- run: $APT clang-tools-12 clang-tidy-12
135146
- run: |
136147
source /opt/ros/$ROS_DISTRO/setup.bash
137148
make clangcheck SCANBUILD=scan-build-12 OPTIONS=ros_tidy TC=gcc
138149
139150
151+
jammy_gcc_ros_scanbuild:
152+
runs-on: ubuntu-22.04
153+
154+
env:
155+
ROS_DISTRO: humble
156+
ROS_CI_DESKTOP: jammy
157+
158+
steps:
159+
- uses: actions/checkout@v4
160+
- run: sudo make install-ros ROS_DISTRO=$ROS_DISTRO UBUNTU_DISTRO=$ROS_CI_DESKTOP
161+
- run: sudo make install-deps
162+
- run: $APT clang-tools-15 clang-tidy-15
163+
- run: |
164+
source /opt/ros/$ROS_DISTRO/setup.bash
165+
make clangcheck SCANBUILD=scan-build-15 OPTIONS=ros2_tidy TC=gcc
166+
167+
140168
jammy_gcc_noros_scanbuild:
141169
runs-on: ubuntu-22.04
142170

143171
steps:
144-
- uses: actions/checkout@v3
172+
- uses: actions/checkout@v4
145173
- run: sudo apt update
146174
- run: sudo make install-deps
147-
- run: $APT clang-tools-14 clang-tidy-14
148-
- run: make clangcheck SCANBUILD=scan-build-14 OPTIONS=noros TC=gcc
175+
- run: $APT clang-tools-15 clang-tidy-15
176+
- run: make clangcheck SCANBUILD=scan-build-15 OPTIONS=noros TC=gcc

.github/workflows/tag.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
DEB_TARGET: jammy
1919

2020
steps:
21-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
2222
- run: sudo make install-deps
2323
- run: $APT fakeroot devscripts build-essential
2424
- run: make deb-build DEB_TARGET=$DEB_TARGET
@@ -36,7 +36,7 @@ jobs:
3636
DEB_TARGET: focal
3737

3838
steps:
39-
- uses: actions/checkout@v3
39+
- uses: actions/checkout@v4
4040
- run: sudo make install-ros ROS_DISTRO=$ROS_DISTRO UBUNTU_DISTRO=$ROS_CI_DESKTOP
4141
- run: rosdep update
4242
- run: sudo make install-deps

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ option (ARILES_VERBOSE "Verbose build" ON)
3030
option (ARILES_BUILD_REGRESSION_TESTS "Build regression tests." ON)
3131
option (ARILES_CCACHE "Enable ccache if available" ON)
3232
set (ARILES_DEB_TARGETS "" CACHE STRING "Enable debian package generation.")
33-
set (ARILES_CPP_STANDARD "11" CACHE STRING "14 is required for boost >= 1.82, 11 is still ok for ariles")
33+
set (ARILES_CPP_STANDARD "17" CACHE STRING "must not be older than 17")
3434

3535
# install parameters
3636
set (ARILES_PKGCONFIG_INSTALL_PATH "" CACHE STRING "pkg-config pc-file install path, not installed if empty")

Makefile

+19-16
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ test-ros: clean
140140
${MAKE} build-tests TC=${TC} TYPE=Debug OPTIONS=ros TARGETS="${TARGETS}" EXTRA_CMAKE_PARAM="${EXTRA_CMAKE_PARAM}"
141141

142142

143+
test-ros2: clean
144+
#${MAKE} build-tests TC=${TC} TYPE=Debug OPTIONS=default TARGETS="${TARGETS}" EXTRA_CMAKE_PARAM="${EXTRA_CMAKE_PARAM}"
145+
${MAKE} build-tests TC=${TC} TYPE=Debug OPTIONS=ros2 TARGETS="${TARGETS}" EXTRA_CMAKE_PARAM="${EXTRA_CMAKE_PARAM}"
146+
147+
143148
test-noros: clean
144149
${MAKE} build-tests TC=${TC} TYPE=Debug OPTIONS=noros TARGETS="${TARGETS}" EXTRA_CMAKE_PARAM="${EXTRA_CMAKE_PARAM}"
145150
${MAKE} clangcheck SCANBUILD=scan-build15 OPTIONS=noros_tidy
@@ -179,27 +184,25 @@ dox: doxclean clean
179184

180185

181186
install-ros:
182-
sh -c "echo \"deb http://packages.ros.org/ros/ubuntu ${UBUNTU_DISTRO} main\" > /etc/apt/sources.list.d/ros-latest.list"
183-
sh -c "apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 \
184-
|| apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 \
185-
|| apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654"
186-
sh -c "apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key 6B05F25D762E3157 \
187-
|| apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key 6B05F25D762E3157 \
188-
|| apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key 6B05F25D762E3157"
189-
apt update -qq
190-
${APT_INSTALL} dpkg
191-
${APT_INSTALL} ros-${ROS_DISTRO}-ros-base
187+
wget -qO- https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo tee /etc/apt/trusted.gpg.d/ros.asc
192188
${MAKE} install-ros-${ROS_DISTRO}
189+
${APT_INSTALL} dpkg
190+
${APT_INSTALL} python3-rosdep python3-rosinstall python3-rosinstall-generator build-essential
193191
bash -c 'source /opt/ros/${ROS_DISTRO}/setup.bash; rosdep init'
192+
rosdep update
194193

195-
install-ros-%:
196-
${APT_INSTALL} python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential
194+
install-ros-noetic:
195+
sh -c 'test -f /etc/apt/sources.list.d/ros-latest.list \
196+
|| (echo "deb http://packages.ros.org/ros/ubuntu ${UBUNTU_DISTRO} main" > /etc/apt/sources.list.d/ros-latest.list)'
197+
apt update -qq
198+
${APT_INSTALL} ros-${ROS_DISTRO}-ros-base
197199

198-
install-ros-melodic: install-ros-kinetic
199-
#
200+
install-ros-humble:
201+
sh -c 'test -f /etc/apt/sources.list.d/ros2-latest.list \
202+
|| (echo "deb [arch=amd64,arm64] http://repo.ros2.org/ubuntu/main ${UBUNTU_DISTRO} main" > /etc/apt/sources.list.d/ros2-latest.list)'
203+
apt update -qq
204+
${APT_INSTALL} ros-${ROS_DISTRO}-rclcpp
200205

201-
install-ros-kinetic:
202-
${APT_INSTALL} python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
203206

204207
install-deps:
205208
${APT_INSTALL} cmake libboost-all-dev libeigen3-dev

cmake/cmakeut_compiler_flags.cmake

+2
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ function(cmakeut_compiler_flags STANDARD)
9191
set(CMAKE_CXX_CLANG_TIDY "${CMAKE_CXX_CLANG_TIDY},-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-hicpp-no-array-decay")
9292
# long functions are ok
9393
set(CMAKE_CXX_CLANG_TIDY "${CMAKE_CXX_CLANG_TIDY},-google-readability-function-size,-readability-function-size,-hicpp-function-size")
94+
# do not enforce nested namespace concatenation
95+
set(CMAKE_CXX_CLANG_TIDY "${CMAKE_CXX_CLANG_TIDY},-modernize-concat-nested-namespaces")
9496

9597

9698
# overly restrictive fuchsia stuff

cmake/options_deb_packages_bionic.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ set(ARILES_BUILD_REGRESSION_TESTS "OFF" CACHE STRING "")
55

66
set(ARILES_VISITORS_DEFAULT_MODE "ON" CACHE STRING "")
77
set(ARILES_VISITOR_rosparam "$ENV{ROS_DISTRO}" CACHE STRING "")
8+
set(ARILES_VISITOR_ros2param "OFF" CACHE STRING "")

cmake/options_deb_packages_focal.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ set(ARILES_BUILD_REGRESSION_TESTS "OFF" CACHE STRING "")
66
set(ARILES_VISITORS_DEFAULT_MODE "ON" CACHE STRING "")
77
set(ARILES_VISITOR_rosparam "$ENV{ROS_DISTRO}" CACHE STRING "")
88
set(ARILES_VISITOR_msgpack "OFF" CACHE STRING "")
9+
set(ARILES_VISITOR_ros2param "OFF" CACHE STRING "")

cmake/options_deb_packages_jammy.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ set(ARILES_BUILD_REGRESSION_TESTS "OFF" CACHE STRING "")
55

66
set(ARILES_VISITORS_DEFAULT_MODE "ON" CACHE STRING "")
77
set(ARILES_VISITOR_rosparam "OFF" CACHE STRING "")
8+
set(ARILES_VISITOR_ros2param "$ENV{ROS_DISTRO}" CACHE STRING "")

cmake/options_deb_packages_xenial.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ set(ARILES_VISITORS_DEFAULT_MODE "ON" CACHE STRING "")
66
set(ARILES_VISITOR_rosparam "$ENV{ROS_DISTRO}" CACHE STRING "")
77
set(ARILES_VISITOR_jsonnet "OFF" CACHE STRING "")
88
set(ARILES_VISITOR_msgpack "OFF" CACHE STRING "")
9+
set(ARILES_VISITOR_ros2param "OFF" CACHE STRING "")

cmake/options_default.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
set(ARILES_CPP_SANITIZERS "ON" CACHE STRING "")
1+
#set(ARILES_CPP_SANITIZERS "ON" CACHE STRING "")

cmake/options_noros.cmake

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
set(ARILES_CPP_SANITIZERS "ON" CACHE STRING "")
1+
#set(ARILES_CPP_SANITIZERS "ON" CACHE STRING "")
22

33
set(ARILES_VISITOR_graphviz "ON" CACHE STRING "")
44
set(ARILES_VISITOR_pugixml "ON" CACHE STRING "")
@@ -7,3 +7,4 @@ set(ARILES_VISITOR_jsonnet "ON" CACHE STRING "")
77
set(ARILES_VISITOR_msgpack "ON" CACHE STRING "")
88
set(ARILES_VISITOR_yaml_cpp "ON" CACHE STRING "")
99
set(ARILES_VISITOR_rosparam "OFF" CACHE STRING "")
10+
set(ARILES_VISITOR_ros2param "OFF" CACHE STRING "")

cmake/options_noros_tidy.cmake

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
set(ARILES_CPP_SANITIZERS "ON" CACHE STRING "")
1+
#set(ARILES_CPP_SANITIZERS "ON" CACHE STRING "")
22
set(ARILES_CPP_CLANG_TIDY "ON" CACHE STRING "")
33

44
set(ARILES_VISITOR_graphviz "ON" CACHE STRING "")
@@ -8,3 +8,4 @@ set(ARILES_VISITOR_jsonnet "ON" CACHE STRING "")
88
set(ARILES_VISITOR_msgpack "ON" CACHE STRING "")
99
set(ARILES_VISITOR_yaml_cpp "ON" CACHE STRING "")
1010
set(ARILES_VISITOR_rosparam "OFF" CACHE STRING "")
11+
set(ARILES_VISITOR_ros2param "OFF" CACHE STRING "")

cmake/options_noros_xenial.cmake

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#- rapidjson-dev # not found
22
#- libmsgpack-dev # version is too old
33

4-
set(ARILES_CPP_SANITIZERS "ON" CACHE STRING "")
4+
#set(ARILES_CPP_SANITIZERS "ON" CACHE STRING "")
55

66
set(ARILES_VISITOR_graphviz "ON" CACHE STRING "")
77
set(ARILES_VISITOR_pugixml "ON" CACHE STRING "")
@@ -10,3 +10,4 @@ set(ARILES_VISITOR_jsonnet "OFF" CACHE STRING "")
1010
set(ARILES_VISITOR_msgpack "OFF" CACHE STRING "")
1111
set(ARILES_VISITOR_yaml_cpp "ON" CACHE STRING "")
1212
set(ARILES_VISITOR_rosparam "OFF" CACHE STRING "")
13+
set(ARILES_VISITOR_ros2param "OFF" CACHE STRING "")

cmake/options_ros.cmake

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
set(ARILES_CPP_SANITIZERS "ON" CACHE STRING "")
1+
#set(ARILES_CPP_SANITIZERS "ON" CACHE STRING "")
22

33
set(ARILES_VISITOR_msgpack "OFF" CACHE STRING "")
44
set(ARILES_VISITOR_pugixml "OFF" CACHE STRING "")
55
set(ARILES_VISITOR_rapidjson "OFF" CACHE STRING "")
66
set(ARILES_VISITOR_jsonnet "OFF" CACHE STRING "")
7+
set(ARILES_VISITOR_ros2param "OFF" CACHE STRING "")

cmake/options_ros2.cmake

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#set(ARILES_CPP_SANITIZERS "ON" CACHE STRING "")
2+
3+
set(ARILES_VISITOR_msgpack "OFF" CACHE STRING "")
4+
set(ARILES_VISITOR_pugixml "OFF" CACHE STRING "")
5+
set(ARILES_VISITOR_rapidjson "OFF" CACHE STRING "")
6+
set(ARILES_VISITOR_jsonnet "OFF" CACHE STRING "")
7+
set(ARILES_VISITOR_rosparam "OFF" CACHE STRING "")

cmake/options_ros2_tidy.cmake

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#set(ARILES_CPP_SANITIZERS "ON" CACHE STRING "")
2+
set(ARILES_CPP_CLANG_TIDY "ON" CACHE STRING "")
3+
4+
set(ARILES_VISITOR_msgpack "OFF" CACHE STRING "")
5+
set(ARILES_VISITOR_pugixml "OFF" CACHE STRING "")
6+
set(ARILES_VISITOR_rapidjson "OFF" CACHE STRING "")
7+
set(ARILES_VISITOR_jsonnet "OFF" CACHE STRING "")
8+
set(ARILES_VISITOR_rosparam "OFF" CACHE STRING "")

cmake/options_ros_tidy.cmake

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
set(ARILES_CPP_SANITIZERS "ON" CACHE STRING "")
1+
#set(ARILES_CPP_SANITIZERS "ON" CACHE STRING "")
22
set(ARILES_CPP_CLANG_TIDY "ON" CACHE STRING "")
33

44
set(ARILES_VISITOR_msgpack "OFF" CACHE STRING "")
55
set(ARILES_VISITOR_pugixml "OFF" CACHE STRING "")
66
set(ARILES_VISITOR_rapidjson "OFF" CACHE STRING "")
77
set(ARILES_VISITOR_jsonnet "OFF" CACHE STRING "")
8+
set(ARILES_VISITOR_ros2param "OFF" CACHE STRING "")

extra_visitors/graphviz/src/writer.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ namespace ariles2
3333

3434

3535
public:
36-
explicit NodeWrapper(const std::string &node, const Base::Type type = Base::GENERIC) : Base(node, type)
36+
explicit NodeWrapper(const std::string &node, const Base::Type type = Base::Type::GENERIC)
37+
: Base(node, type)
3738
{
3839
label_ = node;
3940
actual_id_ = node;
@@ -42,7 +43,7 @@ namespace ariles2
4243
explicit NodeWrapper(
4344
const std::string &node,
4445
const std::string &label,
45-
const Base::Type type = Base::GENERIC)
46+
const Base::Type type = Base::Type::GENERIC)
4647
: Base(node, type)
4748
{
4849
label_ = label;

extra_visitors/msgpack/src/reader.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ namespace ariles2
202202
{
203203
ARILES2_ASSERT(
204204
impl_->node_stack_.back().index_ < impl_->node_stack_.back().size_,
205-
"Internal error: namevalue.has more elements than expected.");
205+
"Internal error: array has more elements than expected.");
206206
}
207207

208208

extra_visitors/msgpack/src/reader_compact.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ namespace ariles2
141141
void Reader::endMap()
142142
{
143143
ARILES2_ASSERT(
144-
impl_->node_stack_.back().isAllParsed(),
144+
impl_->node_stack_.back().isCompleted(),
145145
"Some entries were not parsed, which is not allowed by this visitor.");
146146
impl_->node_stack_.pop_back();
147147
}
@@ -166,7 +166,7 @@ namespace ariles2
166166
{
167167
ARILES2_ASSERT(
168168
impl_->node_stack_.back().index_ < impl_->node_stack_.back().size_,
169-
"Internal error: namevalue.has more elements than expected.");
169+
"Internal error: array has more elements than expected.");
170170
}
171171

172172

extra_visitors/namevalue/ariles2/visitors/namevalue/writer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ namespace ariles2
153153
std::string node;
154154
if (node_stack_.back().isArray())
155155
{
156-
node.reserve(node_stack_.back().node_.size() + map_name.size() + 15);
156+
node.reserve(node_stack_.back().node_.size() + map_name.size() + num_chars_for_index_reserve + 3);
157157

158158
node = node_stack_.back().node_;
159159
node += "{";

0 commit comments

Comments
 (0)