Skip to content

Commit fb67947

Browse files
committed
Initial changes for Rolling release
Update Add ament_index (#61) * Add ament_index * Update * Update CI
1 parent 76b97c8 commit fb67947

3 files changed

Lines changed: 42 additions & 37 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ jobs:
3737
apt install -y git python3-pip
3838
. $IDF_PATH/export.sh
3939
pip3 install catkin_pkg lark-parser empy colcon-common-extensions
40+
# This line avoids the error when using Python < 3.7 https://importlib-resources.readthedocs.io/en/latest/
41+
pip3 install importlib-resources
4042
4143
- name: Build sample - int32_publisher
4244
shell: bash

CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ externalproject_add(libmicroros_project
2020
CONFIGURE_COMMAND ""
2121
BUILD_COMMAND
2222
${submake} -j -f libmicroros.mk
23-
CC=${CMAKE_C_COMPILER}
24-
AR=${CMAKE_AR}
25-
STRIP=${CMAKE_STRIP}
26-
CFLAGS=${CMAKE_C_FLAGS}
27-
CXX=${CMAKE_CXX_COMPILER}
28-
CXXFLAGS=${CMAKE_CXX_FLAGS}
23+
X_CC=${CMAKE_C_COMPILER}
24+
X_AR=${CMAKE_AR}
25+
X_STRIP=${CMAKE_STRIP}
26+
X_CFLAGS=${CMAKE_C_FLAGS}
27+
X_CXX=${CMAKE_CXX_COMPILER}
28+
X_CXXFLAGS=${CMAKE_CXX_FLAGS}
2929
BUILD_DIR=${CMAKE_BINARY_DIR}
3030
IDF_PATH=${IDF_PATH}
3131
IDF_TARGET=${IDF_TARGET}

libmicroros.mk

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ else
1010
BUILD_TYPE = Release
1111
endif
1212

13-
CFLAGS_INTERNAL := $(CFLAGS) -ffunction-sections -fdata-sections
14-
CXXFLAGS_INTERNAL := $(CXXFLAGS) -ffunction-sections -fdata-sections
13+
CFLAGS_INTERNAL := $(X_CFLAGS) -ffunction-sections -fdata-sections
14+
CXXFLAGS_INTERNAL := $(X_CXXFLAGS) -ffunction-sections -fdata-sections
1515

1616
all: $(EXTENSIONS_DIR)/libmicroros.a
1717

@@ -25,8 +25,8 @@ clean:
2525
$(EXTENSIONS_DIR)/esp32_toolchain.cmake: $(EXTENSIONS_DIR)/esp32_toolchain.cmake.in
2626
rm -f $(EXTENSIONS_DIR)/esp32_toolchain.cmake; \
2727
cat $(EXTENSIONS_DIR)/esp32_toolchain.cmake.in | \
28-
sed "s/@CMAKE_C_COMPILER@/$(subst /,\/,$(CC))/g" | \
29-
sed "s/@CMAKE_CXX_COMPILER@/$(subst /,\/,$(CXX))/g" | \
28+
sed "s/@CMAKE_C_COMPILER@/$(subst /,\/,$(X_CC))/g" | \
29+
sed "s/@CMAKE_CXX_COMPILER@/$(subst /,\/,$(X_CXX))/g" | \
3030
sed "s/@CFLAGS@/$(subst /,\/,$(CFLAGS_INTERNAL))/g" | \
3131
sed "s/@CXXFLAGS@/$(subst /,\/,$(CXXFLAGS_INTERNAL))/g" | \
3232
sed "s/@IDF_TARGET@/$(subst /,\/,$(IDF_TARGET))/g" | \
@@ -37,37 +37,40 @@ $(EXTENSIONS_DIR)/esp32_toolchain.cmake: $(EXTENSIONS_DIR)/esp32_toolchain.cmake
3737
$(EXTENSIONS_DIR)/micro_ros_dev/install:
3838
rm -rf micro_ros_dev; \
3939
mkdir micro_ros_dev; cd micro_ros_dev; \
40-
git clone -b foxy https://github.com/ament/ament_cmake src/ament_cmake; \
41-
git clone -b foxy https://github.com/ament/ament_lint src/ament_lint; \
42-
git clone -b foxy https://github.com/ament/ament_package src/ament_package; \
43-
git clone -b foxy https://github.com/ament/googletest src/googletest; \
44-
git clone -b foxy https://github.com/ros2/ament_cmake_ros src/ament_cmake_ros; \
45-
colcon build;
40+
git clone -b master https://github.com/ament/ament_cmake src/ament_cmake; \
41+
git clone -b master https://github.com/ament/ament_lint src/ament_lint; \
42+
git clone -b master https://github.com/ament/ament_package src/ament_package; \
43+
git clone -b ros2 https://github.com/ament/googletest src/googletest; \
44+
git clone -b master https://github.com/ros2/ament_cmake_ros src/ament_cmake_ros; \
45+
git clone -b master https://github.com/ament/ament_index src/ament_index; \
46+
colcon build --cmake-args -DBUILD_TESTING=OFF;
4647

4748
$(EXTENSIONS_DIR)/micro_ros_src/src:
4849
rm -rf micro_ros_src; \
4950
mkdir micro_ros_src; cd micro_ros_src; \
5051
git clone -b foxy https://github.com/eProsima/micro-CDR src/micro-CDR; \
5152
git clone -b foxy https://github.com/eProsima/Micro-XRCE-DDS-Client src/Micro-XRCE-DDS-Client; \
52-
git clone -b foxy https://github.com/micro-ROS/rcl src/rcl; \
53-
git clone -b foxy https://github.com/ros2/rclc src/rclc; \
54-
git clone -b foxy https://github.com/micro-ROS/rcutils src/rcutils; \
55-
git clone -b foxy https://github.com/micro-ROS/micro_ros_msgs src/micro_ros_msgs; \
56-
git clone -b foxy https://github.com/micro-ROS/rmw-microxrcedds src/rmw-microxrcedds; \
57-
git clone -b foxy https://github.com/micro-ROS/rosidl_typesupport src/rosidl_typesupport; \
58-
git clone -b foxy https://github.com/micro-ROS/rosidl_typesupport_microxrcedds src/rosidl_typesupport_microxrcedds; \
59-
git clone -b master https://github.com/ros2/tinydir_vendor src/tinydir_vendor; \
60-
git clone -b foxy https://github.com/ros2/rosidl src/rosidl; \
61-
git clone -b foxy https://github.com/ros2/rmw src/rmw; \
62-
git clone -b foxy https://github.com/ros2/rcl_interfaces src/rcl_interfaces; \
63-
git clone -b foxy https://github.com/ros2/rosidl_defaults src/rosidl_defaults; \
64-
git clone -b foxy https://github.com/ros2/unique_identifier_msgs src/unique_identifier_msgs; \
65-
git clone -b foxy https://github.com/ros2/common_interfaces src/common_interfaces; \
66-
git clone -b foxy https://github.com/ros2/test_interface_files src/test_interface_files; \
67-
git clone -b foxy https://github.com/ros2/rmw_implementation src/rmw_implementation; \
68-
git clone -b foxy_microros https://gitlab.com/micro-ROS/ros_tracing/ros2_tracing src/ros2_tracing; \
53+
git clone -b master https://github.com/micro-ROS/rcl src/rcl; \
54+
git clone -b master https://github.com/ros2/rclc src/rclc; \
55+
git clone -b master https://github.com/micro-ROS/rcutils src/rcutils; \
56+
git clone -b main https://github.com/micro-ROS/micro_ros_msgs src/micro_ros_msgs; \
57+
git clone -b main https://github.com/micro-ROS/rmw-microxrcedds src/rmw-microxrcedds; \
58+
git clone -b master https://github.com/micro-ROS/rosidl_typesupport src/rosidl_typesupport; \
59+
git clone -b main https://github.com/micro-ROS/rosidl_typesupport_microxrcedds src/rosidl_typesupport_microxrcedds; \
60+
git clone -b master https://github.com/ros2/rosidl src/rosidl; \
61+
git clone -b master https://github.com/ros2/rmw src/rmw; \
62+
git clone -b master https://github.com/ros2/rcl_interfaces src/rcl_interfaces; \
63+
git clone -b master https://github.com/ros2/rosidl_defaults src/rosidl_defaults; \
64+
git clone -b master https://github.com/ros2/unique_identifier_msgs src/unique_identifier_msgs; \
65+
git clone -b master https://github.com/ros2/common_interfaces src/common_interfaces; \
66+
git clone -b master https://github.com/ros2/test_interface_files src/test_interface_files; \
67+
git clone -b master https://github.com/ros2/rmw_implementation src/rmw_implementation; \
68+
git clone -b master https://github.com/ros2/rcl_logging src/rcl_logging; \
69+
git clone -b master https://gitlab.com/micro-ROS/ros_tracing/ros2_tracing src/ros2_tracing; \
6970
touch src/rosidl/rosidl_typesupport_introspection_c/COLCON_IGNORE; \
7071
touch src/rosidl/rosidl_typesupport_introspection_cpp/COLCON_IGNORE; \
72+
touch src/rcl_logging/rcl_logging_log4cxx/COLCON_IGNORE; \
73+
touch src/rcl_logging/rcl_logging_spdlog/COLCON_IGNORE; \
7174
touch src/rclc/rclc_examples/COLCON_IGNORE; \
7275
touch src/rcl/rcl_yaml_param_parser/COLCON_IGNORE; \
7376
cp -rf ../extra_packages src/extra_packages || :;
@@ -97,12 +100,12 @@ patch_atomic:$(EXTENSIONS_DIR)/micro_ros_src/install
97100
ifeq ($(IDF_TARGET),$(filter $(IDF_TARGET),esp32s2 esp32c3))
98101
echo $(UROS_DIR)/atomic_workaround; \
99102
mkdir $(UROS_DIR)/atomic_workaround; cd $(UROS_DIR)/atomic_workaround; \
100-
$(AR) x $(UROS_DIR)/install/lib/librcutils.a; \
101-
$(STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_fetch_add_8; \
103+
$(X_AR) x $(UROS_DIR)/install/lib/librcutils.a; \
104+
$(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_fetch_add_8; \
102105
if [ $(IDF_VERSION_MAJOR) -ge 4 ] && [ $(IDF_VERSION_MINOR) -ge 3 ]; then \
103-
$(STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_exchange_8; \
106+
$(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_exchange_8; \
104107
fi; \
105-
$(AR) rc -s librcutils.a *.obj; \
108+
$(X_AR) rc -s librcutils.a *.obj; \
106109
cp -rf librcutils.a $(UROS_DIR)/install/lib/librcutils.a; \
107110
rm -rf $(UROS_DIR)/atomic_workaround; \
108111
cd ..;

0 commit comments

Comments
 (0)