micro-ROS-demos icon indicating copy to clipboard operation
micro-ROS-demos copied to clipboard

Application stuck on "Waiting for device"

Open Cagdas4 opened this issue 2 years ago • 5 comments

Issue template

  • Hardware description: STM32L4 IoT Disovery Kit
  • RTOS: Zephyr 10.2.0
  • Installation type: Installed through https://github.com/micro-ROS/micro-ROS_sensors_demo
  • Version or commit hash: 7fd84a2664fbfcc8aaccd4c483b3e87114272673

Steps to reproduce the issue

Run the application on an Ubuntu 22.04.3 VM on a Windows 11 machine Launch the application normally through "Docker-compose up -d"

Expected behavior

Board is recognized

Actual behavior

App stuck on "Waiting for device"

Additional information

I've tried everything that came to mind, the connection is there, the firmware is properly configured and the board is recognized. I granted every access permission I could think of, as well.

I'd really appreciate any help or advice, and please let me know if you'd like me to provide more information.

Update: After days of trying, it magically seems to have resolved itself. However, when I list the ros2 topics in my terminal, nothing seems to appear. When I try to publish on the LEDs, it can't find any subscriptions either.

Cagdas4 avatar Sep 20 '23 16:09 Cagdas4

I'm having issues with micro-ros-agent as well. Though I don't know if they're related. When I try to launch it with my board attached, it says "error 13 please run with superuser privileges. Error while starting serial agent!". Again, I tried to give it any permission I could think of.

Cagdas4 avatar Sep 20 '23 16:09 Cagdas4

Hello @Cagdas4,

  • As far as I understand you have managed to flash your board and run the micro-ROS Client in the MCU. Is that right?
  • The permissions error in the micro-ROS Agent is just a matter of providing your user enough Linux privileges to open a serial port, not really related to micro-ROS. A quick look drives me to a possible solution consisting in adding your user to dialout group (check here). Another option is running the micro-ROS Agent with sudo
  • Finally, the repository you are using is archived and deprecated, probably this will be a source of problems. The recommended option for running micro-ROS on top of Zephyr RTOS is using the micro-ROS Zephyr module

pablogs9 avatar Sep 26 '23 05:09 pablogs9

Hi @pablogs9

Thank you for your reply. I guess I forgot to mention I already tried adding the user to dialout as well as using sudo. No results there.

I'll give the up to date repository a shot too. Thanks for the heads up.

Cagdas4 avatar Sep 26 '23 06:09 Cagdas4

The serial permission problem shall be solved with one of this options: https://stackoverflow.com/a/27886201

pablogs9 avatar Sep 26 '23 06:09 pablogs9

I did follow that post when dealing with this problem initially. But I don't think I tried the one using vim. I'll go over them and give vim a shot. Thanks!

Cagdas4 avatar Sep 26 '23 09:09 Cagdas4