Code Monkey home page Code Monkey logo

Comments (13)

AndyBlightLeeds avatar AndyBlightLeeds commented on September 21, 2024 1

I took another look at the error messages, I took a guess that the (discriminator 3) text means the 3rd parameter to the function
rclc_node_init_default. I reviewed my code changes again and realised that the support structure was not initialised when being used by rclc_node_init_default. Having fixed the code and used the colcon.meta with your suggested changes, I now have a working publisher and subscriber. Yay!

The working code is on my branch publisher-1.

Thanks for your help and support.

from micro_ros_espidf_component.

AndyBlightLeeds avatar AndyBlightLeeds commented on September 21, 2024 1

@pablogs9 Good idea! I'm busy with other work at the moment but I should be able to create a PR in a few days time.

from micro_ros_espidf_component.

pablogs9 avatar pablogs9 commented on September 21, 2024

Hello @AndyBlightLeeds, have you configured the RMW in the colcon.meta file?

Check here and rebuild: https://github.com/AndyBlightLeeds/micro_ros_espidf_component/blob/d08716642e7ecd6c14391c1423f519624ab78c14/components/micro-ROS/colcon.meta#L36

If you want to know more about the static memory pools in the micro-ROS middleware you can read this: https://micro-ros.github.io/docs/tutorials/core/microxrcedds_rmw_configuration/

Let me know if this solves your problem!

from micro_ros_espidf_component.

AndyBlightLeeds avatar AndyBlightLeeds commented on September 21, 2024

Hi @pablogs9,
Thanks for the quick reply.

I have modified the colcon.meta file by changing "-DRMW_UXRCE_MAX_SUBSCRIPTIONS=0", to
"-DRMW_UXRCE_MAX_SUBSCRIPTIONS=1", rebuilt and flashed but I had exactly the same result. I then put some rubbish characters in the colcon.meta file to generate an error message and rebuilt but the changes were not picked up. How do I force the build system to rebuild the colcon.meta file?

from micro_ros_espidf_component.

pablogs9 avatar pablogs9 commented on September 21, 2024

I guess that we have work to do here because files that are generated inside the component/micro-ROS folder are not cleaned properly.

Could you test this in a brand new fork?

from micro_ros_espidf_component.

AndyBlightLeeds avatar AndyBlightLeeds commented on September 21, 2024

I'll test on a new clone of the repo and let you know how I get on.

from micro_ros_espidf_component.

AndyBlightLeeds avatar AndyBlightLeeds commented on September 21, 2024

I have created a new clone using the foxy branch with no changes, did menuconfig, build and flash. All OK.

I then added rubbish characters to the the colcon.meta file and rebuilt. The build succeeded so the file isn't being picked up.

Just to find out what how the build fails when colcon.meta won't compile, I started again with a new clone, did menuconfig, added the characters AJB on a new line and rebuilt. The build failed as expected with the message:

...
Starting >>> rmw_microxrcedds
--- stderr: rmw_microxrcedds
CMake Error: The source directory "/home/build/micro_ros_idf/components/micro-ROS/micro_ros_src/build/rmw_microxrcedds/AJB"-DRMW_UXRCE_MAX_SUBSCRIPTIONS=0"" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
...

So the colcon.meta file does not get checked on the second rebuild.

Let me know if there is anything else you want me to test.

from micro_ros_espidf_component.

pablogs9 avatar pablogs9 commented on September 21, 2024

Ok, so I will keep this issue open in order to remind us that this should be taken into account in further builds of the project.

Regarding your test, are you able to use the micro-ROS subscription by modifying the colcon.meta before building the project? Is the Guru Meditation Error solved?

from micro_ros_espidf_component.

AndyBlightLeeds avatar AndyBlightLeeds commented on September 21, 2024

BTW, when cleaning the repo to force a rebuild of the colcon.meta file, I used the following commands:

cd <repo_root>
git reset --hard
git clean -dfx
rm -rf components/micro-ROS/micro_ros_dev/ components/micro-ROS/micro_ros_src

These commands reset the sdkconfig.defaults file so I keep a modified copy outside the repo with my WiFi SSID and password and the IP address of my server and copy it over the file in the repo root. After that, it is the usual sequence of commands to rebuild and run.

from micro_ros_espidf_component.

zhivko avatar zhivko commented on September 21, 2024

Can you add subscriber example? Repository link?

from micro_ros_espidf_component.

AndyBlightLeeds avatar AndyBlightLeeds commented on September 21, 2024

@zhivko My personal repo has an example of the subscriber, see:
https://github.com/AndyBlightLeeds/micro_ros_espidf_component/blob/publisher-1/main/rclc_int32_publisher_subscriber.c
Hope this helps!

from micro_ros_espidf_component.

pablogs9 avatar pablogs9 commented on September 21, 2024

Hello @AndyBlightLeeds it would be super nice if you create a PR with your code to our repo. This way everyone will have access to it.

Hope that you have some time for this. Thanks!

from micro_ros_espidf_component.

AndyBlightLeeds avatar AndyBlightLeeds commented on September 21, 2024

@pablogs9 Finally found time to add my example code to PR #56. Please let me know if anything else needs to be done.

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.