Skip to content
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

Custom message leads to "the application ros2 has stopped unexpectedly" #717

Open
MiguelMartinez-HAW opened this issue Nov 22, 2022 · 0 comments

Comments

@MiguelMartinez-HAW
Copy link

MiguelMartinez-HAW commented Nov 22, 2022

Ros2 crashes after ModuleNotFoundError

  • Hardware description: RaspberryPi Pico
  • RTOS: FreeRTOS
  • Installation type: micro_ros_raspberrypi_pico_sdk
  • Version or commit hash: foxy

Steps to reproduce the issue

I need some custom interfaces so I followed this tutorial.
I put my new interface in ~/micro_ros_ws/src/micro_ros_raspberrypi_pico_sdk/microros_static_library/library_generation/extra_packages
The problem is when I'm supposed to execute this line: ros2 run micro_ros_setup build_firmware.sh
Since we're not using micro_ros_setup with the Pico, I tried to build the library with:

docker pull microros/micro_ros_static_library_builder:foxy
docker run -it --rm -v $(pwd):/project microros/micro_ros_static_library_builder:foxy

Then I used cmake .. and make in ~/micro_ros_ws/src/micro_ros_raspberrypi_pico_sdk/build and in the custom message folder.

Expected behavior

I have a program with a subscriber to twist messages, another subscriber to Int32, one publisher of Int16MultiArray and one publisher of my custom message.
I would expect that ros2 topic echo /my_topic would show what the publisher of my custom message is publishing.

Actual behavior

After some CMakeLists tweaking, the program compiles well and without errors. I am able to start the microROS agent and I use topic echo and topic pub to interact successfully with the 2 subscribers and the publisher. However, when I echo the topic where the publisher with the custom message is publishing, it shows the error:
ModuleNotFoundError: No module named 'custom_message'
And then a window pops up with the message "the application ros2 has stopped unexpectedly". The other publisher and subscribers still work, nonetheless.

Additional information

It's apparent that the module is not detected. The question then is: how do I add a custom message for the Raspberry Pi Pico? What did I miss?
I've been looking everywhere for instructions but they all seem to use the micro_ros_setup. I may have forgotten to mention a couple of things I may have tried while searching through blogs but so far nothing has worked. Has anybody used custom interfaces with microros and the pico?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant