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

MicroROS suddenly stopped working. Not enough memory in the buffer stream AND vector larger than max_size() #748

Open
BotEngineer03 opened this issue Nov 20, 2024 · 0 comments

Comments

@BotEngineer03
Copy link

BotEngineer03 commented Nov 20, 2024

The problem

I was using microROS to test some hardware. I was publishing some int32 values with ros2 topic pub and the microcontroller (Raspberry Pi Pico) decoded those values and acted accordingly.
All had been working well for several days of short tests. Then the day I started running longer tests, the microcontroller had been working all morning without interrupting the connection to microROS.
Then when I went for lunch and I didn't interrupt the connection on purpose, I just left the computer on because in the real-life scenario the hardware will be working for hours so if there was an issue I wanted to know. Careful what you wish for.
When I came back the connection had stopped with a buffer message error. Without thinking much of it I tried to restart the connection but now this error appears.

terminate called after throwing an instance of 'eprosima::fastcdr::exception::NotEnoughMemoryException'
  what():  Not enough memory in the buffer stream
Aborted

Ever since I get the same error no matter the microcontroller or the code. I restarted the computer, changed the microcontroller, even changed the code to other code that had been tested before without issues and even tried the example code. Nothing works anymore. They all throw the same memory error after showing "datawriter created".
I connect using the command
micro-ros-agent serial --dev /dev/ttyACM0 baudrate=115200
I thought of trying a different method with
ros2 run micro_ros_agent micro_ros_agent serial --dev /dev/ttyACM0
This generates a different error after "session established" it throws

terminate called after throwing an instance of 'std::length_error'
  what():  cannot create std::vector larger than max_size()
[ros2run]: Aborted

Any ideas on how to solve this? even a quick fix so I can finish the tests would be greatly appreciated.

System description: Lenovo intel core i7 running ROS2 Humble, no RTOS.

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