Skip to content

Commit 38ae4b7

Browse files
authored
Fix broken rosidl_cli (#726)
* Fix broken rosidl_cli Fix rosidl_pycommon New approach Upgrade pip Remove upgrading sphynx Add Zephyr virtual env Fix IDF Fix Zephyr Fix adf * Fix idf * Fix * Update esp32
1 parent b864716 commit 38ae4b7

8 files changed

Lines changed: 34 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
path: src/micro_ros_setup
2525
ref: ${{ inputs.ci_target_ref }}
2626

27-
- uses: ros-tooling/setup-ros@0.7.7
27+
- uses: ros-tooling/setup-ros@0.7.9
2828
with:
2929
use-ros2-testing: false
3030
required-ros-distributions: ${{ env.ROS_DISTRO }}
@@ -63,7 +63,7 @@ jobs:
6363
path: src/micro_ros_setup
6464
ref: ${{ inputs.ci_target_ref }}
6565

66-
- uses: ros-tooling/setup-ros@0.7.7
66+
- uses: ros-tooling/setup-ros@0.7.9
6767
with:
6868
use-ros2-testing: false
6969
required-ros-distributions: ${{ env.ROS_DISTRO }}
@@ -205,7 +205,7 @@ jobs:
205205
path: src/micro_ros_setup
206206
ref: ${{ inputs.ci_target_ref }}
207207

208-
- uses: ros-tooling/setup-ros@0.7.7
208+
- uses: ros-tooling/setup-ros@0.7.9
209209
with:
210210
use-ros2-testing: false
211211
required-ros-distributions: ${{ env.ROS_DISTRO }}

config/freertos/esp32/build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
EXTENSIONS_DIR=$FW_TARGETDIR/freertos_apps/microros_esp32_extensions
22

3+
# Source virtualenv
4+
source $FW_TARGETDIR/venv/bin/activate
5+
36
. $PREFIX/config/utils.sh
47

58
export IDF_TOOLS_PATH=$FW_TARGETDIR/toolchain/espressif

config/freertos/esp32/create.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
pushd $FW_TARGETDIR >/dev/null
2+
# Create a virtual environment
3+
python3 -m venv $FW_TARGETDIR/venv
4+
source $FW_TARGETDIR/venv/bin/activate
5+
6+
# Install deps
7+
pip3 install catkin_pkg empy lark-parser colcon-common-extensions
8+
9+
pip3 install virtualenv
10+
211
# Install toolchain
312
mkdir toolchain
413

@@ -19,14 +28,13 @@ pushd $FW_TARGETDIR >/dev/null
1928
echo "Error: python3-pip package must be installed before continuing..."
2029
exit 1
2130
fi
22-
pip3 install virtualenv --break-system-packages
2331
python3 esp-idf/tools/idf_tools.py install-python-env
2432

2533
eval $(python3 $FW_TARGETDIR/toolchain/esp-idf/tools/idf_tools.py export --prefer-system)
2634

2735
. $IDF_PATH/export.sh
2836

29-
pip3 install catkin_pkg lark-parser colcon-common-extensions --break-system-packages
37+
pip3 install catkin_pkg lark-parser colcon-common-extensions
3038

3139
popd >/dev/null
3240

config/freertos/esp32/flash.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ EXTENSIONS_DIR=$FW_TARGETDIR/freertos_apps/microros_esp32_extensions
33
export IDF_TOOLS_PATH=$FW_TARGETDIR/toolchain/espressif
44
export IDF_PATH=$FW_TARGETDIR/toolchain/esp-idf
55

6+
# Source virtualenv
7+
source $FW_TARGETDIR/venv/bin/activate
8+
69
eval $(python3 $FW_TARGETDIR/toolchain/esp-idf/tools/idf_tools.py export --prefer-system)
710

811
. $IDF_PATH/export.sh

config/zephyr/generic/build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
. $PREFIX/config/utils.sh
22

33
pushd $FW_TARGETDIR >/dev/null
4+
source $FW_TARGETDIR/venv/bin/activate
5+
46
source $FW_TARGETDIR/zephyrproject/zephyr/zephyr-env.sh
57

68
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr

config/zephyr/generic/create.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,15 @@ export PATH=~/.local/bin:"$PATH"
1818
export ZEPHYR_VERSION="v0.12.4"
1919
export ARCH=$(uname -m)
2020

21+
# Create a virtual environment
22+
python3 -m venv $FW_TARGETDIR/venv
23+
source $FW_TARGETDIR/venv/bin/activate
24+
2125
# Install west
22-
pip3 install --user -U west --break-system-packages
26+
pip3 install west
27+
28+
# Install requirements
29+
pip3 install catkin_pkg empy
2330

2431
pushd $FW_TARGETDIR >/dev/null
2532

@@ -31,7 +38,7 @@ pushd $FW_TARGETDIR >/dev/null
3138
west update
3239
popd >/dev/null
3340

34-
pip3 install -r zephyrproject/zephyr/scripts/requirements.txt --ignore-installed --break-system-packages
41+
pip3 install -r zephyrproject/zephyr/scripts/requirements.txt --ignore-installed
3542

3643
if [ "$PLATFORM" = "host" ]; then
3744
if [ "$ARCH" = "aarch64" ]; then
@@ -72,6 +79,6 @@ pushd $FW_TARGETDIR >/dev/null
7279
touch mcu_ws/ros2/ros2_tracing/lttngpy/COLCON_IGNORE
7380

7481
# Upgrade sphinx
75-
pip install --force-reinstall Sphinx==4.2.0 --break-system-packages
82+
pip install --force-reinstall Sphinx==4.2.0
7683

7784
popd >/dev/null

config/zephyr/generic/flash.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
pushd $FW_TARGETDIR > /dev/null
22

3+
source $FW_TARGETDIR/venv/bin/activate
4+
35
ZEPHYR_BUILD_DIR="$FW_TARGETDIR/build/zephyr"
46

57
# Host platform (=native_posix) is special, as flashing is actually just executing the binary

config/zephyr/generic/package.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
<build_depend>gcc-multilib</build_depend>
1616
<build_depend>g++-multilib</build_depend>
1717
<build_depend>openocd</build_depend>
18+
<build_depend>python3-venv</build_depend>
1819

1920
</package>

0 commit comments

Comments
 (0)