-
Notifications
You must be signed in to change notification settings - Fork 54
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
No connection/execution with the raspberry #26
Comments
Hello @kappa95, I have replicated the issue and it is related to connection timing. The function I have modified the example to solve this problem (PR #29), now it will wait for a reachable agent for up to 2 minutes using the function Please give it a try and let us know the results |
I have pulled the repo, I have seen the changes in the code. But I get the same issue: $ ros2 node list
// May i have missed some passes or package install? Is it correct to install Update 2: |
Could you please try with the dockerized foxy agent?
|
Same results: docker run -it -v /dev:/dev --privileged microros/micro-ros-agent:foxy serial --dev /dev/ttyACM0 -v6
[1619164483.342955] info | TermiosAgentLinux.cpp | init | running... | fd: 4
[1619164483.343359] info | Root.cpp | set_verbose_level | logger setup | verbose_level: 6
Second terminal: ros2 node list
// Both terminal are sourced with ROS Dashing: |
Could you check the serial port output without the agent, using miniterm or similar? Disconnect and reconnect the board, then for the first 2 minutes there should appear a periodic message each second, like this:
If nothing appears, check that your raspberry pico is actually on the /dev/ttyACM0 port, by disconnecting it and checking that it is not on the /dev/tty list using |
With miniterm, nothing appear: no messages. ls /dev/ttyACM*
/dev/ttyACM0
I tried the hello world program from the raspberry site and using minicom the serial connection worked on this port |
After some investigation, the problem relies on the arm-none-eabi-gcc installed version: Ubuntu 18.04 uses 6.3.1, while the micro-ros library is compiled using 9.2.1. To check your actual version: This commands will download a compatible version from source and set the cmake compiler path.
Anyway, check the version output on the cmake command is at least 9.x.x:
|
Thank you so much! Something now is changed: docker run -it -v /dev:/dev --privileged microros/micro-ros-agent:foxy serial --dev /dev/ttyACM0 -v6
[1619178075.701850] info | TermiosAgentLinux.cpp | init | running... | fd: 3
[1619178075.702175] info | Root.cpp | set_verbose_level | logger setup | verbose_level: 6
[1619178075.714481] info | Root.cpp | create_client | create | client_key: 0x2B5411CA, session_id: 0x81
[1619178075.714548] info | SessionManager.hpp | establish_session | session established | client_key: 0x726929866, address: 0
[1619178075.714607] debug | SerialAgentLinux.cpp | send_message | [** <<SER>> **] | client_key: 0x2B5411CA, len: 19, data:
0000: 81 00 00 00 04 01 0B 00 00 00 58 52 43 45 01 00 01 0F 00
[1619178075.717420] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0x2B5411CA, len: 24, data:
0000: 80 00 00 00 00 01 10 00 58 52 43 45 01 00 01 0F 2B 54 11 CA 81 00 FC 01
[1619178075.717486] info | SessionManager.hpp | establish_session | session re-established | client_key: 0x726929866, address: 0
[1619178075.717542] debug | SerialAgentLinux.cpp | send_message | [** <<SER>> **] | client_key: 0x2B5411CA, len: 19, data:
0000: 81 00 00 00 04 01 0B 00 00 00 58 52 43 45 01 00 01 0F 00
[1619178075.719486] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0x2B5411CA, len: 24, data:
0000: 80 00 00 00 00 01 10 00 58 52 43 45 01 00 01 0F 2B 54 11 CA 81 00 FC 01
[1619178075.719580] info | SessionManager.hpp | establish_session | session re-established | client_key: 0x726929866, address: 0
[1619178075.719652] debug | SerialAgentLinux.cpp | send_message | [** <<SER>> **] | client_key: 0x2B5411CA, len: 19, data:
0000: 81 00 00 00 04 01 0B 00 00 00 58 52 43 45 01 00 01 0F 00
[1619178075.824008] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0x2B5411CA, len: 24, data:
0000: 80 00 00 00 00 01 10 00 58 52 43 45 01 00 01 0F 2B 54 11 CA 81 00 FC 01
[1619178075.824408] info | SessionManager.hpp | establish_session | session re-established | client_key: 0x726929866, address: 0
[1619178075.824503] debug | SerialAgentLinux.cpp | send_message | [** <<SER>> **] | client_key: 0x2B5411CA, len: 19, data:
0000: 81 00 00 00 04 01 0B 00 00 00 58 52 43 45 01 00 01 0F 00
The Led on the Raspberry now is on ros2 node list
//
Another note: It seems that using: micro-ros-agent serial --dev /dev/ttyACM0 baudrate=115200 -v6 is not working because it stays: /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
[1619179129.875510] info | TermiosAgentLinux.cpp | init | running... | fd: 4
[1619179129.876131] info | Root.cpp | set_verbose_level | logger setup | verbose_level: 6 UPDATE: 😃 🤩 ros2 node list
//
/pico_node In any case is working only with: |
Thank you for the feedback! |
I uses Ubuntu 20.04 and ros2 foxy. Is it possible to run the example code correctly? |
I am trying to executing the example:
pico_micro_ros_example.c
following this guideThe building seems ok: it returns from visual studio code this:
I generate the uf2 file and I have uploaded it as in the guide.
I have followed all the next steps of the guide and after:
micro-ros-agent serial --dev /dev/ttyACM0 baudrate=115200
I get:
The raspberry pico doesn't blink and I don't find the topics and nodes. i.e. :
I am using ROS2 Dashing with Ubuntu 18.04.5 LTS.
Update:
I don't know if it could be useful for solving the issue, but I checked the return value from
rmw_uros_set_custom_transport()
function using a simple if condition for blinking the led if the return value is false. And it shows that it is false.The text was updated successfully, but these errors were encountered: