Comments (5)
@hippo5329, Thank you, but I found the problem, it seems I use windows and ubuntu in parallel, I save my code on a removable hard drive, when the code runs build and initializes the aux folder, the system cannot initialize it.
OSError: [Errno 22] Invalid argument: '/home/ubuntu/uROS2_ws/firmware/.pio/libdeps/esp32doit-devkit-v1/micro_ros_platformio/build/aux':
I changed library_builder.py in folder libdeps/esp32doit-devkit-v1/micro_ros_platformio/microros_utils at location def package_mcu_library "/aux" -> "/aux_fix"
def package_mcu_library(self):
binutils_path = self.resolve_binutils_path()
//aux_folder = self.build_folder + "/aux"
aux_folder = self.build_folder + "/aux_fix"
shutil.rmtree(aux_folder, ignore_errors=True)
shutil.rmtree(self.library_path, ignore_errors=True)
os.makedirs(aux_folder, exist_ok=True)
os.makedirs(self.library_path, exist_ok=True)
for root, dirs, files in os.walk(self.mcu_folder + "/install/lib"):
for f in files:
if f.endswith('.a'):
os.makedirs(aux_folder + "/naming", exist_ok=True)
os.chdir(aux_folder + "/naming")
os.system("{}ar x {}".format(binutils_path, root + "/" + f))
for obj in [x for x in os.listdir() if x.endswith('obj')]:
os.rename(obj, '../' + f.split('.')[0] + "__" + obj)
os.chdir(aux_folder)
command = "{binutils}ar rc libmicroros.a $(ls *.o *.obj 2> /dev/null); rm *.o *.obj 2> /dev/null; {binutils}ranlib libmicroros.a".format(binutils=binutils_path)
result = run_cmd(command)
if 0 != result.returncode:
print("micro-ROS static library build failed: \n{}".format(result.stderr.decode("utf-8")))
sys.exit(1)
os.rename('libmicroros.a', self.library)
# Copy includes
shutil.copytree(self.build_folder + "/mcu/install/include", self.includes)
# Fix include paths
include_folders = os.listdir(self.includes)
for folder in include_folders:
folder_path = self.includes + "/{}".format(folder)
repeated_path = folder_path + "/{}".format(folder)
if os.path.exists(repeated_path):
shutil.copytree(repeated_path, folder_path, copy_function=shutil.move, dirs_exist_ok=True)
shutil.rmtree(repeated_path)
And I was finally able to build it successfully.
from micro_ros_platformio.
I got more or less the same stack trace.
> pio run
Processing due (platform: atmelsam; board: due; framework: zephyr)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelsam/due.html
PLATFORM: Atmel SAM (8.0.0) > Arduino Due (Programming Port)
HARDWARE: AT91SAM3X8E 84MHz, 96KB RAM, 512KB Flash
DEBUG: Current (atmel-ice) External (atmel-ice, blackmagic, jlink, stlink)
PACKAGES:
- framework-zephyr @ 2.20701.220422 (2.7.1)
- tool-cmake @ 3.21.3
- tool-dtc @ 1.4.7
- tool-gperf @ 3.1.0
- tool-ninja @ 1.9.0
- toolchain-gccarmnoneeabi @ 1.80201.181220 (8.2.1)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Installing importlib-resources with pip at PlatformIO environment
/usr/local/Cellar/platformio/6.1.15/libexec/bin/python -m pip install importlib-resources
Requirement already satisfied: importlib-resources in /usr/local/Cellar/platformio/6.1.15/libexec/lib/python3.12/site-packages (6.4.0)
Installing pyyaml with pip at PlatformIO environment
/usr/local/Cellar/platformio/6.1.15/libexec/bin/python -m pip install pyyaml
Requirement already satisfied: pyyaml in /usr/local/Cellar/platformio/6.1.15/libexec/lib/python3.12/site-packages (6.0.1)
Installing markupsafe==2.0.1 with pip at PlatformIO environment
/usr/local/Cellar/platformio/6.1.15/libexec/bin/python -m pip install markupsafe==2.0.1
Requirement already satisfied: markupsafe==2.0.1 in /usr/local/Cellar/platformio/6.1.15/libexec/lib/python3.12/site-packages (2.0.1)
Configuring due with transport serial
TypeError: sequence item 0: expected str instance, tuple found:
File "/usr/local/Cellar/platformio/6.1.15/libexec/lib/python3.12/site-packages/platformio/builder/main.py", line 173:
env.SConscript("$BUILD_SCRIPT")
File "~/.platformio/packages/tool-scons/scons-local-4.7.0/SCons/Script/SConscript.py", line 612:
return _SConscript(self.fs, *files, **subst_kw)
File "~/.platformio/packages/tool-scons/scons-local-4.7.0/SCons/Script/SConscript.py", line 279:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "~/.platformio/platforms/atmelsam/builder/main.py", line 127:
target_elf = env.BuildProgram()
File "~/.platformio/packages/tool-scons/scons-local-4.7.0/SCons/Util/envs.py", line 251:
return self.method(*nargs, **kwargs)
File "~/.platformio/packages/framework-zephyr/scripts/platformio/platformio-build-pre.py", line 26:
env.ProcessProjectDeps()
File "~/.platformio/packages/tool-scons/scons-local-4.7.0/SCons/Util/envs.py", line 251:
return self.method(*nargs, **kwargs)
File "/usr/local/Cellar/platformio/6.1.15/libexec/lib/python3.12/site-packages/platformio/builder/tools/piobuild.py", line 152:
plb = env.ConfigureProjectLibBuilder()
File "~/.platformio/packages/tool-scons/scons-local-4.7.0/SCons/Util/envs.py", line 251:
return self.method(*nargs, **kwargs)
File "/usr/local/Cellar/platformio/6.1.15/libexec/lib/python3.12/site-packages/platformio/builder/tools/piolib.py", line 1202:
project.install_dependencies()
File "/usr/local/Cellar/platformio/6.1.15/libexec/lib/python3.12/site-packages/platformio/builder/tools/piolib.py", line 987:
if _is_builtin(spec):
File "/usr/local/Cellar/platformio/6.1.15/libexec/lib/python3.12/site-packages/platformio/builder/tools/piolib.py", line 979:
for lb in self.env.GetLibBuilders():
File "~/.platformio/packages/tool-scons/scons-local-4.7.0/SCons/Util/envs.py", line 251:
return self.method(*nargs, **kwargs)
File "/usr/local/Cellar/platformio/6.1.15/libexec/lib/python3.12/site-packages/platformio/builder/tools/piolib.py", line 1115:
lb = LibBuilderFactory.new(env, lib_dir)
File "/usr/local/Cellar/platformio/6.1.15/libexec/lib/python3.12/site-packages/platformio/builder/tools/piolib.py", line 60:
obj = globals()[clsname](env, path, verbose=verbose)
File "/usr/local/Cellar/platformio/6.1.15/libexec/lib/python3.12/site-packages/platformio/builder/tools/piolib.py", line 153:
self.process_extra_options()
File "/usr/local/Cellar/platformio/6.1.15/libexec/lib/python3.12/site-packages/platformio/builder/tools/piolib.py", line 301:
self.env.SConscript(
File "~/.platformio/packages/tool-scons/scons-local-4.7.0/SCons/Script/SConscript.py", line 612:
return _SConscript(self.fs, *files, **subst_kw)
File "~/.platformio/packages/tool-scons/scons-local-4.7.0/SCons/Script/SConscript.py", line 279:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "~/dev/iot/ros2-due-demo/.pio/libdeps/due/micro_ros_platformio/extra_script.py", line 157:
build_microros()
File "~/dev/iot/ros2-due-demo/.pio/libdeps/due/micro_ros_platformio/extra_script.py", line 93:
"{} {} -DCLOCK_MONOTONIC=0 -D'__attribute__(x)='".format(' '.join(env['CFLAGS']), ' '.join(env['CCFLAGS'])),
Here is my system information:
pio system info
-------------------------- ------------------------------------------------------
PlatformIO Core 6.1.15
Python 3.12.3-final.0
System Type darwin_x86_64
Platform macOS-14.4.1
File System Encoding utf-8
Locale Encoding UTF-8
(...)
Python Executable /usr/local/Cellar/platformio/6.1.15/libexec/bin/python
Global Libraries 0
Development Platforms 4
Tools & Toolchains 32
-------------------------- ------------------------------------------------------
from micro_ros_platformio.
@Latek framework = arduino
from micro_ros_platformio.
@phn1712002 I followed the tutorial. There is no such error. If you want to build micro-ROS robot. You may follow my wiki https://github.com/hippo5329/linorobot2_hardware/wiki
Building micro-ROS library
Found 26 compatible libraries
Scanning dependencies...
Dependency Graph
|-- micro_ros_platformio @ 0.0.1+sha.48096f8
Building in release mode
Compiling .pio/build/esp32doit-devkit-v1/src/main.cpp.o
Building .pio/build/esp32doit-devkit-v1/bootloader.bin
Generating partitions .pio/build/esp32doit-devkit-v1/partitions.bin
esptool.py v4.7.3
Creating esp32 image...
Merged 1 ELF section
Successfully created esp32 image.
...
Compiling .pio/build/esp32doit-devkit-v1/FrameworkArduino/wiring_shift.c.o
Archiving .pio/build/esp32doit-devkit-v1/libFrameworkArduino.a
Indexing .pio/build/esp32doit-devkit-v1/libFrameworkArduino.a
Linking .pio/build/esp32doit-devkit-v1/firmware.elf
Retrieving maximum program size .pio/build/esp32doit-devkit-v1/firmware.elf
Checking size .pio/build/esp32doit-devkit-v1/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 10.6% (used 34600 bytes from 327680 bytes)
Flash: [== ] 15.6% (used 204605 bytes from 1310720 bytes)
Building .pio/build/esp32doit-devkit-v1/firmware.bin
esptool.py v4.7.3
Creating esp32 image...
Merged 2 ELF sections
Successfully created esp32 image.
======================== [SUCCESS] Took 147.52 seconds ========================
from micro_ros_platformio.
@Latek framework = arduino
That is correct!
from micro_ros_platformio.
Related Issues (20)
- rosidl_runtime_cppConfig.cmake missing error HOT 2
- Modules won't compile with colcon build HOT 1
- ament_cmake clone failed when compiling for esp32-dev HOT 19
- Micro-ROS timer not working on my esp32 board/toolchain HOT 15
- MicroROS spin_some() blocks the functionality of the Adafruit bno08x library HOT 2
- Crashing when connected to Agent over UDP HOT 3
- Windows 11 VSCode "'.' is not recognized as an internal or external command" when adding library to lib_deps in platformio.ini HOT 3
- Micro-ROS parameter server not reporting correct parameter values to host on initial connection HOT 2
- Arduino Wire.h I2C custom transport on Pi Pico is causing a crash
- Same message is received continuously. HOT 6
- Publishing to a subscriber causes rclc_executor_spin_some to return a fail code. HOT 2
- Wrong UNIX time from rmw_uros_sync_session HOT 1
- Can't get topics to show on ROS2 Humble HOT 1
- ESP32-EVB support
- No nodes or topics visible using ESP32 and WiFi transport HOT 31
- [Feature request] custom task kill micro-ros-agent and upload to board HOT 1
- Why use "-DRMW_UXRCE_TRANSPORT=custom" in metas? rmw_microros discovery.c won't build. HOT 1
- tf2_msgs not in micro_ros_platformio HOT 2
- Micro ROS Agent connects to the node only after replugging the USB cable, always
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from micro_ros_platformio.