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

micro-ROS-Agent on ARM32v7 (Odroid XU4) #221

Open
elgarbe opened this issue Mar 3, 2024 · 10 comments
Open

micro-ROS-Agent on ARM32v7 (Odroid XU4) #221

elgarbe opened this issue Mar 3, 2024 · 10 comments

Comments

@elgarbe
Copy link

elgarbe commented Mar 3, 2024

Hi, I need to use micro-ros-agent on docker on an ARM32v7. I build a docker image with ros2 humble from source, using it as base image, do I need to just follow the steps for build micro-ros-agent? (https://micro.ros.org/docs/tutorials/core/first_application_linux/) in a new dockerfile? don't you provide such an image, right?

@pablogs9
Copy link
Member

pablogs9 commented Mar 4, 2024

No we don't, the approach shall be to build the agent in the required platform

@elgarbe
Copy link
Author

elgarbe commented Mar 4, 2024

Ok, I managed to make an image with micro-ros-agent. It doesn't work as expected. I mean, it works but once connected to my custom board (stm32f777) I get this:

�[35m[1709577566.071391]�[m �[32minfo    �[m | �[34mTermiosAgentLinux.cpp�[m | �[37minit                    �[m | �[32mrunning...�[m             | fd: 3
�[35m[1709577566.073126]�[m �[32minfo    �[m | �[34mRoot.cpp          �[m | �[37mset_verbose_level       �[m | �[32mlogger setup�[m           | verbose_level: 6
�[35m[1709577566.123838]�[m �[32minfo    �[m | �[34mRoot.cpp          �[m | �[37mcreate_client           �[m | �[32mcreate�[m                 | client_key: 0x7A6BA362, session_id: 0x81
�[35m[1709577566.123967]�[m �[32minfo    �[m | �[34mSessionManager.hpp�[m | �[37mestablish_session       �[m | �[32msession established�[m    | client_key: 0x7A6BA362, address: 0
�[35m[1709577566.124302]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x7A6BA362, len: 19, data: 
0000: 81 00 00 00 04 01 0B 00 00 00 58 52 43 45 01 00 01 0F 00
�[35m[1709577566.224730]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37mrecv_message            �[m | �[33m[==>> SER <<==]�[m        | client_key: 0x7A6BA362, len: 13, data: 
0000: 81 00 00 00 0B 01 05 00 00 00 00 00 80
�[35m[1709577566.225230]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x7A6BA362, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 00 00 00 01 80
�[35m[1709577566.325752]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37mrecv_message            �[m | �[33m[==>> SER <<==]�[m        | client_key: 0x7A6BA362, len: 13, data: 
0000: 81 00 00 00 0B 01 05 00 00 00 00 00 80
�[35m[1709577566.326372]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x7A6BA362, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 00 00 00 01 80
�[35m[1709577566.427721]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37mrecv_message            �[m | �[33m[==>> SER <<==]�[m        | client_key: 0x7A6BA362, len: 13, data: 
0000: 81 00 00 00 0B 01 05 00 00 00 00 00 80
�[35m[1709577566.428263]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x7A6BA362, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 00 00 00 01 80
�[35m[1709577566.528770]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37mrecv_message            �[m | �[33m[==>> SER <<==]�[m        | client_key: 0x7A6BA362, len: 13, data: 
0000: 81 00 00 00 0B 01 05 00 00 00 00 00 80
�[35m[1709577566.529350]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x7A6BA362, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 00 00 00 01 80
�[35m[1709577566.630760]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37mrecv_message            �[m | �[33m[==>> SER <<==]�[m        | client_key: 0x7A6BA362, len: 13, data: 
0000: 81 00 00 00 0B 01 05 00 00 00 00 00 80
�[35m[1709577566.631252]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x7A6BA362, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 00 00 00 01 80
�[35m[1709577566.731791]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37mrecv_message            �[m | �[33m[==>> SER <<==]�[m        | client_key: 0x7A6BA362, len: 13, data: 
0000: 81 00 00 00 0B 01 05 00 00 00 00 00 80
�[35m[1709577566.732286]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x7A6BA362, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 00 00 00 01 80
�[35m[1709577566.832684]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37mrecv_message            �[m | �[33m[==>> SER <<==]�[m        | client_key: 0x7A6BA362, len: 13, data: 
0000: 81 00 00 00 0B 01 05 00 00 00 00 00 80
�[35m[1709577566.833386]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x7A6BA362, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 00 00 00 01 80
�[35m[1709577566.934704]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37mrecv_message            �[m | �[33m[==>> SER <<==]�[m        | client_key: 0x7A6BA362, len: 13, data: 
0000: 81 00 00 00 0B 01 05 00 00 00 00 00 80
�[35m[1709577566.935216]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x7A6BA362, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 00 00 00 01 80
�[35m[1709577567.035780]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37mrecv_message            �[m | �[33m[==>> SER <<==]�[m        | client_key: 0x7A6BA362, len: 13, data: 
0000: 81 00 00 00 0B 01 05 00 00 00 00 00 80
�[35m[1709577567.036370]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x7A6BA362, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 00 00 00 01 80
�[35m[1709577583.918916]�[m �[32minfo    �[m | �[34mTermiosAgentLinux.cpp�[m | �[37mfini                    �[m | �[32mserver stopped�[m         | fd: 3
�[35m[1709577583.948241]�[m �[31m�[1merror   �[m | �[34mTermiosAgentLinux.cpp�[m | �[37minit                    �[m | �[31mopen device error�[m      | device: /dev/ttyACM0, errno: 6
�[35m[1709577583.969849]�[m �[31m�[1merror   �[m | �[34mTermiosAgentLinux.cpp�[m | �[37minit                    �[m | �[31mopen device error�[m      | device: /dev/ttyACM0, errno: 6
�[35m[1709577584.483926]�[m �[31m�[1merror   �[m | �[34mTermiosAgentLinux.cpp�[m | �[37minit                    �[m | �[31mopen device error�[m      | device: /dev/ttyACM0, errno: 6
�[35m[1709577584.986706]�[m �[32minfo    �[m | �[34mTermiosAgentLinux.cpp�[m | �[37minit                    �[m | �[32mrunning...�[m             | fd: 3
�[35m[1709577585.487454]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37mrecv_message            �[m | �[33m[==>> SER <<==]�[m        | client_key: 0x7A6BA362, len: 16, data: 
0000: 80 00 00 00 02 01 08 00 00 0A FF FD 02 00 00 00
�[35m[1709577585.487834]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37mrecv_message            �[m | �[33m[==>> SER <<==]�[m        | client_key: 0x7A6BA362, len: 16, data: 
0000: 80 00 00 00 02 01 08 00 00 0A FF FD 02 00 00 00
�[35m[1709577585.488052]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37mrecv_message            �[m | �[33m[==>> SER <<==]�[m        | client_key: 0x7A6BA362, len: 16, data: 
0000: 80 00 00 00 02 01 08 00 00 0A FF FD 02 00 00 00
�[35m[1709577585.488327]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37mrecv_message            �[m | �[33m[==>> SER <<==]�[m        | client_key: 0x7A6BA362, len: 16, data: 
0000: 80 00 00 00 02 01 08 00 00 0A FF FD 02 00 00 00
�[35m[1709577585.488689]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x7A6BA362, len: 36, data: 
0000: 80 00 00 00 06 01 1C 00 00 0A FF FD 00 01 01 0D 58 52 43 45 01 00 01 0F 00 01 0D 00 01 00 00 00
0020: 00 00 00 00
�[35m[1709577585.488827]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37mrecv_message            �[m | �[33m[==>> SER <<==]�[m        | client_key: 0x7A6BA362, len: 16, data: 
0000: 80 00 00 00 02 01 08 00 00 0A FF FD 02 00 00 00
�[35m[1709577585.489187]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x7A6BA362, len: 36, data: 
0000: 80 00 00 00 06 01 1C 00 00 0A FF FD 00 01 01 0D 58 52 43 45 01 00 01 0F 00 01 0D 00 01 00 00 00
0020: 00 00 00 00
�[35m[1709577585.489611]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x7A6BA362, len: 36, data: 
0000: 80 00 00 00 06 01 1C 00 00 0A FF FD 00 01 01 0D 58 52 43 45 01 00 01 0F 00 01 0D 00 01 00 00 00
0020: 00 00 00 00
�[35m[1709577585.490027]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x7A6BA362, len: 36, data: 
0000: 80 00 00 00 06 01 1C 00 00 0A FF FD 00 01 01 0D 58 52 43 45 01 00 01 0F 00 01 0D 00 01 00 00 00
0020: 00 00 00 00
�[35m[1709577585.490249]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37mrecv_message            �[m | �[33m[==>> SER <<==]�[m        | client_key: 0x7A6BA362, len: 24, data: 
0000: 80 00 00 00 00 01 10 00 58 52 43 45 01 00 01 0F 68 7E 95 F7 81 00 FC 01
�[35m[1709577585.490859]�[m �[32minfo    �[m | �[34mRoot.cpp          �[m | �[37mdelete_client           �[m | �[32mdelete�[m                 | client_key: 0x7A6BA362
�[35m[1709577585.491354]�[m �[32minfo    �[m | �[34mSessionManager.hpp�[m | �[37mdestroy_session         �[m | �[32msession closed�[m         | client_key: 0x7A6BA362, address: 0
�[35m[1709577585.491566]�[m �[32minfo    �[m | �[34mRoot.cpp          �[m | �[37mcreate_client           �[m | �[32mcreate�[m                 | client_key: 0x687E95F7, session_id: 0x81
�[35m[1709577585.491763]�[m �[32minfo    �[m | �[34mSessionManager.hpp�[m | �[37mestablish_session       �[m | �[32msession established�[m    | client_key: 0x687E95F7, address: 0
�[35m[1709577585.493070]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x687E95F7, len: 36, data: 
0000: 80 00 00 00 06 01 1C 00 00 0A FF FD 00 01 01 0D 58 52 43 45 01 00 01 0F 00 01 0D 00 01 00 00 00
0020: 00 00 00 00
�[35m[1709577585.493347]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x687E95F7, len: 19, data: 
0000: 81 00 00 00 04 01 0B 00 00 00 58 52 43 45 01 00 01 0F 00
�[35m[1709577585.594292]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37mrecv_message            �[m | �[33m[==>> SER <<==]�[m        | client_key: 0x687E95F7, len: 13, data: 
0000: 81 00 00 00 0B 01 05 00 00 00 00 00 80
�[35m[1709577585.594636]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x687E95F7, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 00 00 00 01 80
�[35m[1709577585.695384]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37mrecv_message            �[m | �[33m[==>> SER <<==]�[m        | client_key: 0x687E95F7, len: 13, data: 
0000: 81 00 00 00 0B 01 05 00 00 00 00 00 80
�[35m[1709577585.695920]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x687E95F7, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 00 00 00 01 80
�[35m[1709577585.796389]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37mrecv_message            �[m | �[33m[==>> SER <<==]�[m        | client_key: 0x687E95F7, len: 13, data: 
0000: 81 00 00 00 0B 01 05 00 00 00 00 00 80
�[35m[1709577585.796928]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x687E95F7, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 00 00 00 01 80
�[35m[1709577585.897369]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37mrecv_message            �[m | �[33m[==>> SER <<==]�[m        | client_key: 0x687E95F7, len: 13, data: 
0000: 81 00 00 00 0B 01 05 00 00 00 00 00 80
�[35m[1709577585.898054]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x687E95F7, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 00 00 00 01 80
�[35m[1709577585.999428]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37mrecv_message            �[m | �[33m[==>> SER <<==]�[m        | client_key: 0x687E95F7, len: 13, data: 
0000: 81 00 00 00 0B 01 05 00 00 00 00 00 80
�[35m[1709577585.999958]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x687E95F7, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 00 00 00 01 80
�[35m[1709577586.100380]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37mrecv_message            �[m | �[33m[==>> SER <<==]�[m        | client_key: 0x687E95F7, len: 13, data: 
0000: 81 00 00 00 0B 01 05 00 00 00 00 00 80
�[35m[1709577586.100972]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x687E95F7, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 00 00 00 01 80
�[35m[1709577586.202297]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37mrecv_message            �[m | �[33m[==>> SER <<==]�[m        | client_key: 0x687E95F7, len: 13, data: 
0000: 81 00 00 00 0B 01 05 00 00 00 00 00 80
�[35m[1709577586.203101]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x687E95F7, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 00 00 00 01 80
�[35m[1709577586.304295]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37mrecv_message            �[m | �[33m[==>> SER <<==]�[m        | client_key: 0x687E95F7, len: 13, data: 
0000: 81 00 00 00 0B 01 05 00 00 00 00 00 80
�[35m[1709577586.304921]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x687E95F7, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 00 00 00 01 80
�[35m[1709577586.405261]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37mrecv_message            �[m | �[33m[==>> SER <<==]�[m        | client_key: 0x687E95F7, len: 13, data: 
0000: 81 00 00 00 0B 01 05 00 00 00 00 00 80
�[35m[1709577586.405856]�[m �[36mdebug   �[m | �[34mSerialAgentLinux.cpp�[m | �[37msend_message            �[m | �[33m[** <<SER>> **]�[m        | client_key: 0x687E95F7, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 00 00 00 01 80
^C[ros2run]: Interrupt

On 1709577585.490859 I reset my board and then the connection is established again. In my board some object fail when I try to create them.
Is there an easy way to debug the problem with this messages?
BTW: In my embedded system I create a node two topics and two publishers.

@elgarbe
Copy link
Author

elgarbe commented Mar 4, 2024

The problem is trying to create the node.
I'm debuging my firmware, but some times the node is created and then micro-ros-agent gives:
imagen

I'm not sure what am I missing...

@elgarbe
Copy link
Author

elgarbe commented Mar 4, 2024

Ok, I isolate the problem.
I moved from USB to UART in order to simplify communications.
I moved from my source build in docker on Odroid XU4 to official docker image on my laptop.
I use humble version of microros/micro_ros_static_library_builder in my embedded system.
So I was trying with humble docker image getting "Not enough memory error" then I've tried with iron version and everything works just fine:

image

whats the difference between humble and iron docker image?

@pablogs9
Copy link
Member

pablogs9 commented Mar 5, 2024

You need to have the same ROS 2 distro in all parts of your system. Humble and Iron may not be intercompatible.

@elgarbe
Copy link
Author

elgarbe commented Mar 5, 2024

That's right, but I have used humble for the static library and humble for the agent and it doesn't work. Then changed to iron agent and it started working.

@pablogs9
Copy link
Member

pablogs9 commented Mar 5, 2024

Is there any Iron node in your ROS 2 dataspace while you are running micro-ROS Humble?

@elgarbe
Copy link
Author

elgarbe commented Mar 5, 2024

Is there any Iron node in your ROS 2 dataspace while you are running micro-ROS Humble?

No, I just trying to get micros-ros working right now.

@pablogs9
Copy link
Member

pablogs9 commented Mar 5, 2024

So in that case, I need a replicator to have the same error on my local setup.

@elgarbe
Copy link
Author

elgarbe commented Mar 5, 2024

I have a custom board based on stm32f777. I'm not sure how you can replicate it.
If humble library with humble agent are working ok then I will try to find the problem here. I can try starting with an empty system installing just humble.

BTW USB transport define a 2048 buffer size. I have to increase to 4096 in order to get it working. I was having issue on the node creation function, after that change using USB is working just fine.

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

2 participants