Closed jbmouret closed 1 year ago
Hello @jbmouret, if you choose XRCE-DDS as middleware, can you compile?
If yes, I will check the menuconfig for Embedded RTPS.
Thank you for your answer.
If I use the XRCE-DDS (and use the int32_publisher
example), I get another compilation error (with the embeddedRTPS middleware, no issue with the includes):
/project/eurobin_iot/main/main.cpp:18:10: fatal error: rmw_microros/rmw_microros.h: No such file or directory
#include <rmw_microros/rmw_microros.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Clean the whole environment before rebuilding, this error is related to the files generated in the micro-ROS module.
Thank you. I cleaned and switched to XRCE-DDS. I now get the same compilation error as before (undefined CONFIG_MICRO_ROS_APP_STACK etc.).
If you have time to test / look at, I've put everything online here: https://github.com/hucebot/ros_m5core
I've put the Arduino and m5stack components in the repository but I don't think this is causing the issue.
I used the expressif docker:
docker run -it --rm -v $PWD:/project -v /dev:/dev --volume="/etc/timezone:/etc/timezone:ro" --privileged --workdir /project espressif/idf:release-v4.4
pip3 install catkin_pkg lark-parser empy colcon-common-extensions
git clone https://github.com/hucebot/ros_m5core.git
cd ros_m5core
git submodule update --init --recursive --progress
(the arduino-esp32 component takes a while! sorry)idf.py menuconfig
idf.py build
-> failsOne more thing before taking a look (we are quite busy this weeks). If you define #define CONFIG_MICRO_ROS_APP_STACK 4000
in your main.c does this compiles and work?
Yes, it does work if I define the 2 constants manually.
To add more context, I am also having an issue using the esp idf component architecture, I was able to work around this issue by manually including my module cpp files in my CMakeLists.txt. See current main branch of my code.
Here is a thread I started on Answeres, https://answers.ros.org/question/405631/esp32-microros-component-linker-error/
here is a branch that illustrates the problem. https://github.com/gentijo/MaqueenBattleBots/tree/component-link-fail
Hello @pablogs9 and others to add to this i am also facing the similar issue .
I have cloned micro_ros_idf_component into esp-idf components folder and tried building example int32_publisher with RTPS Enabled. i installed dependencies also as said with below commands mentioned . $IDF_PATH/export.sh pip3 install catkin_pkg lark-parser empy colcon-common-extensions
After that i have given command esp-idf set-target esp32 which is trying to build micro_ros_idf_component and generated two extra folders in it ie. 1. micro_ros_src 2. micro_ros_dev somehow the build process not generating all the required files. I could see below messages with error.
i could see only 3 folders in install directory of micro ros component
After above step if i proceed with esp-idf set-target esp32 and esp-idf menuconfig still i could able to do these configurations.
But during idf.py build i am getting issues in following order
rcl/rcl.h include issue ---->Found this file in esp_idf_microros_component install/include folder I have added this path manually in cmakelist.txt of esp_idf_microros_component rmw/init.h include issue ---> found this file also. Added this also Similarly like this many .h file issues came I have added those path manually in cmakelist.txt
Finally . msgs/int32.h issue -----> this file was not found as the build generation for component not happened as I said early.
Could you please help us on what might be missing since i am new to this i might be not aware much about micro-ROS and why we are unable to build like video you shared at link https://asciinema.org/a/G39IxQZkzipXSxrnbqepXh6iF.
@ManvithRaj sorry but we do not have the bandwidth for taking a look at that. If you find a solution please open a PR.
@ManvithRaj sorry but we do not have the bandwidth for taking a look at that. If you find a solution please open a PR.
@pablogs9 i am able to fix this issue and build is successful. the problem is here freeRTOS Components path are not properly configured in one of the cmake.in files.
I did that and also I did clean installation of ESP-IDF which has solved the issue. Now the issue is during testing subscriber not receiving data in this RTPS Mode i have raised a new issue here... [https://github.com/micro-ROS/micro_ros_espidf_component/issues/164] could you please help in this i think it wont take much time of you just have a look. since you are owner of this source code it might be easy for you to detect missing things
Working on a different problem trying to move directories around, I found this https://answers.ros.org/question/409614/help-with-micro-ros-cmakefiles-and-directory-configuration/?answer=410141#post-id-410141
I think the fact that the ROS Build system is using the CMakeLists.txt file found as a sibling as the EXTRA_COMPONENT_DIR to compile the ROS code, it may not be processing the extra components correctly.
This is just a guess. -John
Using
#define CONFIG_MICRO_ROS_APP_STACK 4000
#define CONFIG_MICRO_ROS_APP_TASK_PRIO 5
in my code works. This is still a hack, but this is OK.
For the errors from the others, usually this comes from running a first make without having colcon etc. installed. This "breaks" future builds. Do not forget to do a idf.py clean-microros
+ idf.py fullclean
(+ potentially remove the build folder).
Hello
Thank you for your efforts with micro-ROS. This is a very promising project!
I am trying to get my M5Core2 working with micro-ros + the standard (Arduino-based) M5Core2 library (to access the screen, sensors, etc.).
PROBLEM: I can compile the micro-ROS examples but I do not find how to use micro-ros as a component in my project.
Details
docker run -it --rm -v $PWD:/project -v /dev:/dev --volume="/etc/timezone:/etc/timezone:ro" --privileged --workdir /project espressif/idf:release-v4.4
Steps to reproduce the issue
I created a project based on the esp-idf template. Here is the directory structure:
In a few words, I added
micro_ros_espidf_component
in the component folder of my project.When I do a
menuconfig
, I can configure the middleware and the WIFI credentials (but nothing more)[I selected embeddedRTPS].In the root
CmakeLists.txt
, I have:And for the CMakeLists.txt in the
main
directory:My
main.cpp
is a copy ofexamples/int32_publisher_embeddedrtps/main/main.cpp
.Expected behavior
I expect this to compile when I do
idf.py build
Actual behavior
Defines are not found:
I guess I am doing something wrong with idf.py or micro-ros because these defines should be defined during the make.
Thanks!