Code Monkey home page Code Monkey logo

Comments (9)

pablogs9 avatar pablogs9 commented on June 27, 2024

Could you provide the whole log on an clean environment?

from micro_ros_espidf_component.

Digitelektro avatar Digitelektro commented on June 27, 2024

A ran into the same problem. I figured out the problem (at least in my case).

  • Do not source ROS2 as stated in the readme!
  • If you had tried to build it with ROS2 sourced, make sure you remove the build folder and also run idf.py clean-microros
  • For me building libmicroros is failed with idf-4.2, I installed a fresh idf-4.4.4 and then the required python packages in a terminal where idf is sourced.
  • With the correct idf libmicroros build should be successful as well as the project. If not, check build output for details.

from micro_ros_espidf_component.

flabrosse avatar flabrosse commented on June 27, 2024

Trying to build example/int32_publisher following the instructions in README.md. I have not sourced any of the ROS2 setup files. esp-idf-4.4.6. From a fresh clone, I get:

[ 99%] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj
/home/ffl/local/src/micro_ros_espidf_component/examples/int32_publisher/main/main.c:11:10: fatal error: rcl/rcl.h: No such file or directory
 #include <rcl/rcl.h>
          ^~~~~~~~~~~

from micro_ros_espidf_component.

flabrosse avatar flabrosse commented on June 27, 2024

Maybe a hint on what is going on. Trying to make a simple example myself. If I clone today's version of the package (I guess defaulting to iron #d0e63d9), then I get the missing rcl/rcl.h issue. If I build from an older version (from about 2 years ago), then it is fine. Sorry this isn't more precise than that.

from micro_ros_espidf_component.

flabrosse avatar flabrosse commented on June 27, 2024

Trying any of the branches of micro_ros_espidf_component, the whole of micro_ros_src folder is missing, ie is not pulled in by the build process, and therefore rcl.h (and others) is missing. If I use the component here then it all works fine. Apart from the obvious branch differences, I cannot see what makes one fail while the other works. It looks like the target $(EXTENSIONS_DIR)/micro_ros_src/src in libmicroros.mk is not executed, but so far I have not been able to figure out why.

from micro_ros_espidf_component.

flabrosse avatar flabrosse commented on June 27, 2024

The reason the micro-ros-src (and other) folder is not pulled in is because the execute_process function in the CMakeLists.txt file fails. It fails because submake expands to $(MAKE) on Unix which either is not expanded further or not defined. If I set submake to make (or replace ${submake} with make in the execute_process command, then all the necessary files are pulled in.

I am not entirely sure why this is the case, but this works. Should MAKE be an environment variable? Can't submake be set to make all the time?

from micro_ros_espidf_component.

flabrosse avatar flabrosse commented on June 27, 2024

@pablogs9 would you have views on this? I am happy to prepare a PR but I am not sure that just setting submake to make in all cases is the right approach.

I have tried to set MAKE in my environment, or to call idf.py build -DMAKE=make, to no avail.

from micro_ros_espidf_component.

pablogs9 avatar pablogs9 commented on June 27, 2024

Please open a PR so we can discuss there about your proposed changes

from micro_ros_espidf_component.

flabrosse avatar flabrosse commented on June 27, 2024

Done (PR #223). I have worked on the humble branch as this is the one I use.

from micro_ros_espidf_component.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.