-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ament_cmake clone failed when compiling for esp32-dev #119
Comments
Hello @kevinEberson are you using Plaform.IO in a Windows environment? |
Hi @pablogs9, I am running platfromIO on Ubuntu Linux 22.04 LTS. I managed to get the example to work, however when trying to apply micro-ros to another project, I get this error. |
What are the differences between those two projects? Could determine exactly the change that makes micro-ROS fail in the clone procedure? |
For testing purposes, I commented all code, and copied the implementation of the platformio.ini and main.c file to the project from the micro-ros example. In theory, everything should be the same but I still get the error as mentioned. |
Could you add a
To check which is the git command? |
the resulting git command output is as following: git clone -b humble https://github.com/ament/ament_cmake /media/kevin/Git drive/git/autonomous-guided-vehicle-platform-3/RIGS-Core/RIGS-Motorcontrol/.pio/libdeps/esp32dev/micro_ros_platformio/build/dev/src/ament_cmake prehaps the error is caused by the space in the path? I will try to validate myself. |
Yes, it seems that this space is not smelling well. Could you check if adding a couple of quotes solves the problem? If it does, could you open a PR with the solution? It would be highly appreciated. |
Formatting folder and self.name as a str() solves the issue in my case. The formatting of the filepath seems to be the issue here. I will look into fixing this in a proper way and create a PR to fix the issue. |
Cool, thanks for contributing! |
I tried a couple of things, but I keep running into some issues with either the file path or shutil not recognizing the file path. My expertise is more in lower-level languages like C. I changed the "init" function of the Build class to the following implementation: def __init__(self, library_folder, packages_folder, distro, python_env):
self.library_folder = '"' + os.path.normcase(library_folder) + '"'
self.packages_folder = '"' + os.path.normcase(packages_folder) + '"'
self.build_folder = '"' + os.path.normcase(os.path.join(library_folder, "build").replace('"', '')) + '"'
self.distro = distro
self.dev_packages = []
self.mcu_packages = []
self.dev_folder = '"' + os.path.normcase(os.path.join(self.build_folder, 'dev').replace('"', '')) + '"'
self.dev_src_folder = '"' + os.path.normcase(os.path.join(self.dev_folder, 'src').replace('"', '')) + '"'
self.mcu_folder = '"' + os.path.normcase(os.path.join(self.build_folder, 'mcu').replace('"', '')) + '"'
self.mcu_src_folder = '"' + os.path.normcase(os.path.join(self.mcu_folder, 'src').replace('"', '')) + '"'
self.library_path = '"' + os.path.normcase(os.path.join(library_folder, 'libmicroros').replace('"', '')) + '"'
self.library = '"' + os.path.normcase(os.path.join(self.library_path, "libmicroros.a").replace('"', '')) + '"'
self.includes = '"' + os.path.normcase(os.path.join(self.library_path, 'include').replace('"', '')) + '"'
self.library_name = "microros"
self.python_env = python_env
self.env = {} It seems a bit hacky, but without a pretty major redesign it does not seem a very easy change to me. Perhaps someone with more knowledge about the package and Python could up with a better fix. My implementation formats the paths correctly, but shutil does not recognize the path anymore (No such file or directory, while it does exists). I am kind of short on time due to some school projects, so dedicating time right now is a bit hard. Perhaps I could look into it at a later date When I have more time available. For now, warn people about using Windows style file paths/ file path with spaces as this breaks the build script. If you have any questions, feel free to ask :) |
@kevinEberson |
Windows/WSL will not build. You should use docker or virtualbox to run ubuntu 22.04 and humble. If you have pi4/5, you may vscode/ssh to edit on windows and compile on Pi. |
Thanks for the help, I'll try that next. |
This issue is not specific to esp32. Though it is possible to run ROS2 Jazzy on Windows, it is difficult for beginners. Docker is popular in ROS development. Platformio and Arduino have minor different micro-ROS implementation. So it won't work to just insert the Arduino library. VScode is a much powerful IDE than Arduino IDE. If you have pi4/5, it would be better to run vscode on Windows and ssh to Pi. Check my wiki, |
The micro_ros_platformio uses ardunio framework. You can use most of the arduino drivers and libraries. The arduino libraries will be built from source. So it will more flexible than the pre-built arduino library. |
It's coming together now. |
It is a good idea to use cheap vacuum cleaner as a robot base. I recalled that irobot did it before. If you are going to do slam with esp32, you may check another wiki. |
About the various ROS2 releases, I am moving to the current LTS stable Jazzy. I will let you know when ready. One of the reason is Pi 5, which is supported with Ubuntu 24.04 but not 22.04. Pi 5 is much faster than Pi 4. The price of them are close. Pi 5 should be considered for new purchase. |
Issue when cloning micro-ros repo
Steps to reproduce the issue
lib_deps = https://github.com/micro-ROS/micro_ros_platformio
Expected behavior
Succesfully compile the package
Actual behavior
Cloning of micro-ros repo fails:
Additional information
Same issue as the following issues: #60, #111
The following platformio.ini configuration is used:
The text was updated successfully, but these errors were encountered: