Comments (19)
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 :)
from micro_ros_platformio.
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,
from micro_ros_platformio.
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.
from micro_ros_platformio.
Hello @kevinEberson are you using Plaform.IO in a Windows environment?
from micro_ros_platformio.
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.
from micro_ros_platformio.
What are the differences between those two projects? Could determine exactly the change that makes micro-ROS fail in the clone procedure?
from micro_ros_platformio.
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.
from micro_ros_platformio.
Could you add a print(command)
after this line:
To check which is the git command?
from micro_ros_platformio.
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.
from micro_ros_platformio.
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.
from micro_ros_platformio.
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.
from micro_ros_platformio.
Cool, thanks for contributing!
from micro_ros_platformio.
@kevinEberson
Where/how do you open up the Build class? (How can I modify that stuff) I am running into this problem for ever now and I have no Idea how to fix it. It occurs on Windows and with WSL soooo.
(Lol, so this Problem is still here and nobody fixed it)
Thx for the help, cheers
from micro_ros_platformio.
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.
from micro_ros_platformio.
from micro_ros_platformio.
Thanks for the help, I'll try that next.
Is this just a ESP32 Problem or generally mircoRos?
So the solution is to use the ArduinoIDE 🤢 (wich is able to compile the Example) or VS Code on Ubuntu.
I tried to use the Arduino library as zip in PlatformIO but that didn't work either. Any Idea why that doesn't work?
I think that would be a nice workaround (Normally Arduino libs are mostly compatible with PIO)
from micro_ros_platformio.
It's coming together now.
The learning curve is pretty steep. But at least I can compile and do stuff now. Thanks for the help. @hippo5329
I think it would be great to have your Example next to the ESP32 / have examples next to the supported Hardware.
(Here: https://github.com/micro-ROS/micro_ros_platformio) (Or have a examples sub Site)
It so easy to get lost in all the possibilities and versions of ROS / micro_ros.
(I don't know if that makes sense in a git-project manner..)
I am working on a simple esp32 robot (SLAM) with a replacement lidar for vacuum cleaners from Aliexpress.
(They are available for less than 20$$ )
from micro_ros_platformio.
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.
linorobot2_hardware firmware for mobile robots
from micro_ros_platformio.
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.
from micro_ros_platformio.
Related Issues (20)
- rosidl_runtime_cppConfig.cmake missing error HOT 2
- Modules won't compile with colcon build HOT 1
- 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
- Failer build the firmware HOT 5
- 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.