Skip to content

Commit 8103c3c

Browse files
authored
Update rolling sources (#99)
* Deprecate galactic Signed-off-by: acuadros95 <acuadros1995@gmail.com> * Update rolling sources Signed-off-by: acuadros95 <acuadros1995@gmail.com> * Fix rolling repo name Signed-off-by: acuadros95 <acuadros1995@gmail.com> * Set version for teensy compiler Signed-off-by: acuadros95 <acuadros1995@gmail.com> * Add penv activate Signed-off-by: acuadros95 <acuadros1995@gmail.com> * Test with previous compiler version Signed-off-by: acuadros95 <acuadros1995@gmail.com> * Test with prepend Signed-off-by: acuadros95 <acuadros1995@gmail.com> * Test with nosys.specs Signed-off-by: acuadros95 <acuadros1995@gmail.com> * Fix test Signed-off-by: acuadros95 <acuadros1995@gmail.com> * Fix test Signed-off-by: acuadros95 <acuadros1995@gmail.com> * Remove unnecesary change Signed-off-by: acuadros95 <acuadros1995@gmail.com> * Update repos with micro-ROS fork Signed-off-by: acuadros95 <acuadros1995@gmail.com> --------- Signed-off-by: acuadros95 <acuadros1995@gmail.com>
1 parent 22cf9b6 commit 8103c3c

8 files changed

Lines changed: 23 additions & 60 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
platform: [teensy41, teensy40, teensy36, teensy35, teensy31, due, zero, olimex_e407, esp32dev, nanorp2040connect, portenta_h7_m7, teensy41_eth, nanorp2040connect_wifi, portenta_h7_m7_wifi, esp32dev_wifi, portenta_h7_m7_galactic, portenta_h7_m7_foxy, portenta_h7_m7_rolling, teensy41_custom, pico]
17+
platform: [teensy41, teensy40, teensy36, teensy35, teensy31, due, zero, olimex_e407, esp32dev, nanorp2040connect, portenta_h7_m7, teensy41_eth, nanorp2040connect_wifi, portenta_h7_m7_wifi, esp32dev_wifi, portenta_h7_m7_foxy, portenta_h7_m7_rolling, teensy41_custom, pico]
1818

1919
steps:
2020
- uses: actions/checkout@v3

‎README.md‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ A explanation for adding custom targets is also present
8585
### ROS 2 distribution
8686
The target ROS 2 distribution can be configured with the `board_microros_distro = <distribution>`, supported values are:
8787
- `humble` *(default value)*
88-
- `galactic`
8988
- `rolling`
9089
- `foxy`
9190

@@ -207,7 +206,7 @@ It is also possible to use custom transports on a `micro-XRCE Agent` instance. M
207206
## Examples
208207
A simple publisher project using serial transport is available on the [examples](./examples) directory, this examples is meant to be modified with the user board.
209208

210-
- More micro-ROS usage examples are available on [micro-ROS-demos/rclc](https://github.com/micro-ROS/micro-ROS-demos/tree/galactic/rclc).
209+
- More micro-ROS usage examples are available on [micro-ROS-demos/rclc](https://github.com/micro-ROS/micro-ROS-demos/tree/humble/rclc).
211210
- For a complete micro-ROS tutorial, check [Programming with rcl and rclc](https://micro.ros.org/docs/tutorials/programming_rcl_rclc/overview/) documentation.
212211

213212
## Purpose of the Project

‎ci/extra_packages/extra_packages.repos‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ repositories:
22
control_msgs:
33
type: git
44
url: https://github.com/ros-controls/control_msgs
5-
version: galactic-devel
5+
version: humble

‎ci/platformio.ini‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
; Galactic test
2-
[env:portenta_h7_m7_galactic]
3-
platform = ststm32
4-
board = portenta_h7_m7
5-
framework = arduino
6-
board_microros_transport = serial
7-
board_microros_distro = galactic
8-
lib_deps =
9-
../
10-
111
; Foxy test
122
[env:portenta_h7_m7_foxy]
133
platform = ststm32

‎extra_script.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ def build_microros(*args, **kwargs):
9494
"{} {} -fno-rtti -DCLOCK_MONOTONIC=0 -D'__attribute__(x)='".format(' '.join(env['CXXFLAGS']), ' '.join(env['CCFLAGS']))
9595
)
9696

97-
builder = library_builder.Build(library_folder=main_path, packages_folder=extra_packages_path, distro=microros_distro)
97+
python_env_path = env['PROJECT_CORE_DIR'] + "/penv/bin/activate"
98+
builder = library_builder.Build(library_folder=main_path, packages_folder=extra_packages_path, distro=microros_distro, python_env=python_env_path)
9899
builder.run('{}/metas/{}'.format(main_path, selected_board_meta), cmake_toolchain.path, microros_user_meta)
99100

100101
#######################################################
@@ -132,6 +133,9 @@ def update_env():
132133
main_path + "/platform_code",
133134
main_path + "/platform_code/{}/{}".format(framework, microros_transport)])
134135

136+
if (board == "teensy31" or board == "teensy35" or board == "teensy36"):
137+
projenv.Append(LINKFLAGS=["--specs=nosys.specs"])
138+
135139
# Add micro-ROS defines to user application
136140
projenv.Append(CPPDEFINES=[('MICRO_ROS_TRANSPORT_{}_{}'.format(framework.upper(), microros_transport.upper()), 1)])
137141
projenv.Append(CPPDEFINES=[('MICRO_ROS_DISTRO_{} '.format(microros_distro.upper()), 1)])

‎metas/common.meta‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
"rcl": {
1515
"cmake-args": [
1616
"-DBUILD_TESTING=OFF",
17-
"-DRCL_COMMAND_LINE_ENABLED=OFF",
18-
"-DRCL_LOGGING_ENABLED=OFF"
17+
"-DRCL_MICROROS=ON"
1918
]
2019
},
2120
"rcutils": {

‎microros_utils/library_builder.py‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def __init__(self, path, cc, cxx, ar, cflags, cxxflags):
3333
self.path = os.path.realpath(file.name)
3434

3535
class Build:
36-
def __init__(self, library_folder, packages_folder, distro):
36+
def __init__(self, library_folder, packages_folder, distro, python_env):
3737
self.library_folder = library_folder
3838
self.packages_folder = packages_folder
3939
self.build_folder = library_folder + "/build"
@@ -51,6 +51,7 @@ def __init__(self, library_folder, packages_folder, distro):
5151
self.library = self.library_path + "/libmicroros.a"
5252
self.includes = self.library_path+ '/include'
5353
self.library_name = "microros"
54+
self.python_env = python_env
5455
self.env = {}
5556

5657
def run(self, meta, toolchain, user_meta = ""):
@@ -99,7 +100,7 @@ def download_dev_environment(self):
99100

100101
def build_dev_environment(self):
101102
print("Building micro-ROS dev dependencies")
102-
command = "cd {} && colcon build --cmake-args -DBUILD_TESTING=OFF".format(self.dev_folder)
103+
command = "cd {} && . {} && colcon build --cmake-args -DBUILD_TESTING=OFF".format(self.dev_folder, self.python_env)
103104
result = run_cmd(command, env=self.env)
104105

105106
if 0 != result.returncode:
@@ -173,7 +174,7 @@ def build_mcu_environment(self, meta_file, toolchain_file, user_meta = ""):
173174
print("Building micro-ROS library")
174175

175176
common_meta_path = self.library_folder + '/metas/common.meta'
176-
colcon_command = 'colcon build --merge-install --packages-ignore-regex=.*_cpp --metas {} {} {} --cmake-args -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=OFF -DTHIRDPARTY=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE={}'.format(common_meta_path, meta_file, user_meta, toolchain_file)
177+
colcon_command = '. {} && colcon build --merge-install --packages-ignore-regex=.*_cpp --metas {} {} {} --cmake-args -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=OFF -DTHIRDPARTY=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE={}'.format(self.python_env, common_meta_path, meta_file, user_meta, toolchain_file)
177178
command = "cd {} && . {}/install/setup.sh && {}".format(self.mcu_folder, self.dev_folder, colcon_command)
178179
result = run_cmd(command, env=self.env)
179180

@@ -211,7 +212,7 @@ def package_mcu_library(self):
211212
shutil.copytree(self.build_folder + "/mcu/install/include", self.includes)
212213

213214
# Fix include paths
214-
if self.distro not in ["galactic", "foxy"]:
215+
if self.distro not in ["foxy"]:
215216
include_folders = os.listdir(self.includes)
216217

217218
for folder in include_folders:

‎microros_utils/repositories.py‎

Lines changed: 9 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,13 @@ class Sources:
7575
Repository("ament_cmake_ros", "https://github.com/ros2/ament_cmake_ros", "humble"),
7676
Repository("ament_index", "https://github.com/ament/ament_index", "humble")
7777
],
78-
'galactic': [
79-
Repository("ament_cmake", "https://github.com/ament/ament_cmake", "galactic"),
80-
Repository("ament_lint", "https://github.com/ament/ament_lint", "galactic"),
81-
Repository("ament_package", "https://github.com/ament/ament_package", "galactic"),
82-
Repository("googletest", "https://github.com/ament/googletest", "galactic"),
83-
Repository("ament_cmake_ros", "https://github.com/ros2/ament_cmake_ros", "galactic"),
84-
Repository("ament_index", "https://github.com/ament/ament_index", "galactic")
85-
],
8678
'rolling': [
87-
Repository("ament_cmake", "https://github.com/ament/ament_cmake", "rolling", "master"),
88-
Repository("ament_lint", "https://github.com/ament/ament_lint", "rolling", "master"),
89-
Repository("ament_package", "https://github.com/ament/ament_package", "rolling", "master"),
90-
Repository("googletest", "https://github.com/ament/googletest", "rolling", "ros2"),
91-
Repository("ament_cmake_ros", "https://github.com/ros2/ament_cmake_ros", "rolling", "master"),
92-
Repository("ament_index", "https://github.com/ament/ament_index", "rolling", "master")
79+
Repository("ament_cmake", "https://github.com/ament/ament_cmake", "rolling"),
80+
Repository("ament_lint", "https://github.com/ament/ament_lint", "rolling"),
81+
Repository("ament_package", "https://github.com/ament/ament_package", "rolling"),
82+
Repository("googletest", "https://github.com/ament/googletest", "rolling"),
83+
Repository("ament_cmake_ros", "https://github.com/ros2/ament_cmake_ros", "rolling"),
84+
Repository("ament_index", "https://github.com/ament/ament_index", "rolling")
9385
],
9486
'foxy': [
9587
Repository("ament_cmake", "https://github.com/ament/ament_cmake", "foxy"),
@@ -124,28 +116,6 @@ class Sources:
124116
Repository("rcl_logging", "https://github.com/ros2/rcl_logging", "humble"),
125117
Repository("ros2_tracing", "https://gitlab.com/micro-ROS/ros_tracing/ros2_tracing", "humble"),
126118
],
127-
'galactic': [
128-
Repository("micro-CDR", "https://github.com/eProsima/micro-CDR", "galactic", "ros2"),
129-
Repository("Micro-XRCE-DDS-Client", "https://github.com/eProsima/Micro-XRCE-DDS-Client", "galactic", "ros2"),
130-
Repository("rcl", "https://github.com/micro-ROS/rcl", "galactic"),
131-
Repository("rclc", "https://github.com/ros2/rclc", "galactic"),
132-
Repository("micro_ros_utilities", "https://github.com/micro-ROS/micro_ros_utilities", "galactic"),
133-
Repository("rcutils", "https://github.com/micro-ROS/rcutils", "galactic"),
134-
Repository("micro_ros_msgs", "https://github.com/micro-ROS/micro_ros_msgs", "galactic"),
135-
Repository("rmw-microxrcedds", "https://github.com/micro-ROS/rmw-microxrcedds", "galactic"),
136-
Repository("rosidl_typesupport", "https://github.com/micro-ROS/rosidl_typesupport", "galactic"),
137-
Repository("rosidl_typesupport_microxrcedds", "https://github.com/micro-ROS/rosidl_typesupport_microxrcedds", "galactic"),
138-
Repository("rosidl", "https://github.com/ros2/rosidl", "galactic"),
139-
Repository("rmw", "https://github.com/ros2/rmw", "galactic"),
140-
Repository("rcl_interfaces", "https://github.com/ros2/rcl_interfaces", "galactic"),
141-
Repository("rosidl_defaults", "https://github.com/ros2/rosidl_defaults", "galactic"),
142-
Repository("unique_identifier_msgs", "https://github.com/ros2/unique_identifier_msgs", "galactic"),
143-
Repository("common_interfaces", "https://github.com/ros2/common_interfaces", "galactic"),
144-
Repository("test_interface_files", "https://github.com/ros2/test_interface_files", "galactic"),
145-
Repository("rmw_implementation", "https://github.com/ros2/rmw_implementation", "galactic"),
146-
Repository("rcl_logging", "https://github.com/ros2/rcl_logging", "galactic"),
147-
Repository("ros2_tracing", "https://gitlab.com/micro-ROS/ros_tracing/ros2_tracing", "galactic"),
148-
],
149119
'rolling': [
150120
Repository("micro-CDR", "https://github.com/eProsima/micro-CDR", "rolling", "ros2"),
151121
Repository("Micro-XRCE-DDS-Client", "https://github.com/eProsima/Micro-XRCE-DDS-Client", "rolling", "ros2"),
@@ -162,12 +132,13 @@ class Sources:
162132
Repository("rmw", "https://github.com/ros2/rmw", "rolling"),
163133
Repository("rcl_interfaces", "https://github.com/ros2/rcl_interfaces", "rolling"),
164134
Repository("rosidl_defaults", "https://github.com/ros2/rosidl_defaults", "rolling"),
135+
Repository("rosidl_dynamic_typesupport", "https://github.com/micro-ROS/rosidl_dynamic_typesupport", "rolling"),
165136
Repository("unique_identifier_msgs", "https://github.com/ros2/unique_identifier_msgs", "rolling"),
166137
Repository("common_interfaces", "https://github.com/ros2/common_interfaces", "rolling"),
167138
Repository("test_interface_files", "https://github.com/ros2/test_interface_files", "rolling"),
168139
Repository("rmw_implementation", "https://github.com/ros2/rmw_implementation", "rolling"),
169140
Repository("rcl_logging", "https://github.com/ros2/rcl_logging", "rolling"),
170-
Repository("ros2_tracing", "https://gitlab.com/micro-ROS/ros_tracing/ros2_tracing", "rolling"),
141+
Repository("ros2_tracing", "https://github.com/ros2/ros2_tracing", "rolling"),
171142
],
172143
'foxy': [
173144
Repository("micro-CDR", "https://github.com/eProsima/micro-CDR", "foxy", "ros2"),
@@ -195,7 +166,6 @@ class Sources:
195166

196167
ignore_packages = {
197168
'humble': ['rcl_logging_log4cxx', 'rcl_logging_spdlog', 'rcl_yaml_param_parser', 'rclc_examples'],
198-
'galactic': ['rcl_logging_log4cxx', 'rcl_logging_spdlog', 'rcl_yaml_param_parser', 'rclc_examples'],
199-
'rolling': ['rcl_logging_log4cxx', 'rcl_logging_spdlog', 'rcl_yaml_param_parser', 'rclc_examples'],
169+
'rolling': ['test_tracetools', 'rcl_logging_spdlog', 'rcl_yaml_param_parser', 'rclc_examples'],
200170
'foxy': [ 'rosidl_typesupport_introspection_c', 'rosidl_typesupport_introspection_cpp', 'rcl_logging_log4cxx', 'rcl_logging_spdlog', 'rcl_yaml_param_parser', 'rclc_examples']
201171
}

0 commit comments

Comments
 (0)