Closed asukiaaa closed 5 years ago
Hi, @asukiaaa
I tested ESP32 based on wifi. I will debug about Serial.
Hi @OpusK
Thank you. I wait for updating.
Hi, @asukiaaa
In my ESP32, it works normally. (Not WROOM, I do not have this.)
Could you tell me the debugging information from Backtrace above? If you use ESP Exception Decoder, you can get backtrace details.
Hi @OpusK
Thank you for checking but I cannot communicate with using ESP32-WROOM-32(4MB flash) and M5StackFire(16MB flash).
I executed these commands to install Micro-XRCE-DDS-Agent.
git clone https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
cd Micro-XRCE-DDS-Agent
git checkout b3c43bd20b16bd3570a128f05a9bf1a164883435
mkdir build && cd build
cmake -DTHIRDPARTY=ON -DCONFIG_UDP_TRANSPORT_MTU=4096 -DCONFIG_SERIAL_TRANSPORT_MTU=4096 ..
sudo make install
sudo ldconfig /usr/local/lib/
I run with this command after install publishing program to ESP32 with using ArduinoIDE v1.8.9, (Of course, without running a serial monitor.)
MicroXRCEAgent --serial /dev/ttyUSB0 115200
However, I cannot see topic from ESP32.
I set EspExceptionDecoder to ArduinoIDE and install program to ESP32 but nothing shown on stack trace window.
Could you give me some advice to trace the exception? Because I'm not familiar with this tool.
Thank you.
Could you give me some advice to trace the exception?
Please see the link below for instructions.
Did you press the ESP32 reset button while the Agent was running?
And, for debugging information, please add the VERBOSE
option when building the Agent.
cmake -DTHIRDPARTY=ON -DVERBOSE=ON -DCONFIG_UDP_TRANSPORT_MTU=4096 -DCONFIG_SERIAL_TRANSPORT_MTU=4096 ..
sudo make install
sudo ldconfig /usr/local/lib/
Thank you for the information.
Did you press the ESP32 reset button while the Agent was running?
No I did not. I got the following logs when I reset ESP32 at running Micro-XRCE-DDS-Agent that activating VERBOSE option.
$ MicroXRCEAgent --serial /dev/ttyUSB0 115200
Serial agent initialization... OK
Enter 'q' for exit
<== [Client connected | session: 0x81 | client key: 0xAA 0xBB 0xCC 0xDD ]
<== [Create XRCE object | client key: 0xAA 0xBB 0xCC 0xDD | id: 0x0011 | PARTICIPANT]
<== [Create XRCE object | client key: 0xAA 0xBB 0xCC 0xDD | id: 0x0013 | PUBLISHER | participant id: 0x0011]
<== [Create XRCE object | client key: 0xAA 0xBB 0xCC 0xDD | id: 0x0014 | SUBSCRIBER | participant id: 0x0011]
<== [Create XRCE object | client key: 0xAA 0xBB 0xCC 0xDD | id: 0x0052 | TOPIC | participant id: 0x0011]
Segmentation fault
I got topic from ESP32 via Serial port!
I needed to activate ros2 before running Micro-XRCE-DDS-Agent
and also needed to reset ESP after running Micro-XRCE-DDS-Agent
.
Thank you very much sharing many information.
Please let me ask one more question before closing this issue.
Is is possible to communicate ros2serial
and Micro-XRCE-DDS-Agent
without resetting?
If not, it seems difficult that this libray replace rosserial-arduino
because I need to reset usb device manually.
@asukiaaa ,
I needed to activate ros2 before running Micro-XRCE-DDS-Agent
To use Agent with ROS2, you must use FastRTPS, which is used by ROS2. Therefore, Agent must be run after ROS2 first.
Is it possible to communicate ros2serial and Micro-XRCE-DDS-Agent without resetting?
When you first connect to the Agent, you establish a session connection, which you can modify through the configuration file. Currently, this value is minimal and we plan to increase the value in future updates. (when supporting dashing)
However, if the Agent does not exist until this count is exceeded, the Client (ros2arduino) will no longer try.
Anyway, if you need to test immediately, try modifying the two values below!
UXR_CONFIG_MAX_SESSION_CONNECTION_ATTEMPTS
UXR_CONFIG_MIN_SESSION_CONNECTION_INTERVAL
Anyway, if you need to test immediately, try modifying the two values below! UXR_CONFIG_MAX_SESSION_CONNECTION_ATTEMPTS UXR_CONFIG_MIN_SESSION_CONNECTION_INTERVAL
The values of library on my PC were 10 and 1 so I changed both to 100.
After that ESP32 automatically communicate with MicroXRCEAgent
.
Thank you very much for sharing information. I'm looking forward to releasing next version.
Hello, I'm having the same problem. I'm running Ubuntu 20.4, with ROS2 Foxy and using a ESP32 Module (https://www.diymore.cc/collections/esp8266/products/esp32-wifi-bluetooth-cp2104-dht11-soil-temperature-humidity-sensor-18650-battery-base)
I have try the "publisher" example, but I cannot get any message in ROS2.
First, I run XRCE Agent
$ MicroXRCEAgent serial --dev /dev/ttyUSB0 -b 115200 -v 6
Press CTRL+C to exit
[1607931139.777002] info | TermiosAgentLinux.cpp | init | running... | fd: 3
[1607931139.777908] info | Root.cpp | set_verbose_level | logger setup | verbose_level: 6
When I reset the ESP32 module, I got the next messages:
[1607931256.197901] info | Root.cpp | create_client | create | client_key: 0xAABBCCDD, session_id: 0x81
[1607931256.198040] info | SessionManager.hpp | establish_session | session established | client_key: 0x2864434397, address: 0
[1607931256.198155] debug | SerialAgentLinux.cpp | send_message | [** <<SER>> **] | client_key: 0xAABBCCDD, len: 19, data:
0000: 81 00 00 00 04 01 0B 00 00 00 58 52 43 45 01 00 01 0F 00
[1607931256.201832] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0xAABBCCDD, len: 24, data:
0000: 80 00 00 00 00 01 10 00 58 52 43 45 01 00 01 0F AA BB CC DD 81 00 FC 07
[1607931256.202024] info | SessionManager.hpp | establish_session | session re-established | client_key: 0x2864434397, address: 0
[1607931256.202182] debug | SerialAgentLinux.cpp | send_message | [** <<SER>> **] | client_key: 0xAABBCCDD, len: 19, data:
0000: 81 00 00 00 04 01 0B 00 00 00 58 52 43 45 01 00 01 0F 00
[1607931256.207282] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0xAABBCCDD, len: 24, data:
0000: 80 00 00 00 00 01 10 00 58 52 43 45 01 00 01 0F AA BB CC DD 81 00 FC 07
[1607931256.207410] info | SessionManager.hpp | establish_session | session re-established | client_key: 0x2864434397, address: 0
[1607931256.207523] debug | SerialAgentLinux.cpp | send_message | [** <<SER>> **] | client_key: 0xAABBCCDD, len: 19, data:
0000: 81 00 00 00 04 01 0B 00 00 00 58 52 43 45 01 00 01 0F 00
[1607931256.271426] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0xAABBCCDD, len: 108, data:
0000: 81 80 00 00 01 05 64 00 00 0A 00 11 01 02 00 00 55 00 00 00 3C 64 64 73 3E 3C 70 61 72 74 69 63
0020: 69 70 61 6E 74 3E 3C 72 74 70 73 3E 3C 6E 61 6D 65 3E 72 6F 73 32 61 72 64 75 69 6E 6F 5F 70 75
0040: 62 5F 6E 6F 64 65 3C 2F 6E 61 6D 65 3E 3C 2F 72 74 70 73 3E 3C 2F 70 61 72 74 69 63 69 70 61 6E
0060: 74 3E 3C 2F 64 64 73 3E 00 00 00 00
[1607931256.275972] debug | ProxyClient.cpp | create_participant | participant created | client_key: 0xAABBCCDD, participant_id: 0x001(1)
[1607931256.276142] debug | SerialAgentLinux.cpp | send_message | [** <<SER>> **] | client_key: 0xAABBCCDD, len: 14, data:
0000: 81 80 00 00 05 01 06 00 00 0A 00 11 00 00
[1607931256.276254] debug | SerialAgentLinux.cpp | send_message | [** <<SER>> **] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 01 00 00 00 80
[1607931256.283285] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0B 01 05 00 00 00 00 00 80
[1607931256.283434] debug | SerialAgentLinux.cpp | send_message | [** <<SER>> **] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 01 00 00 00 80
[1607931256.288333] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 01 00 00 00 80
[1607931256.394226] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0xAABBCCDD, len: 24, data:
0000: 81 80 01 00 01 05 0F 00 00 0B 00 13 03 02 00 00 01 00 00 00 00 00 11 00
[1607931256.394560] debug | ProxyClient.cpp | create_publisher | publisher created | client_key: 0xAABBCCDD, publisher_id: 0x001(3), participant_id: 0x001(1)
[1607931256.394697] debug | SerialAgentLinux.cpp | send_message | [** <<SER>> **] | client_key: 0xAABBCCDD, len: 14, data:
0000: 81 80 01 00 05 01 06 00 00 0B 00 13 00 00
[1607931256.394717] debug | SerialAgentLinux.cpp | send_message | [** <<SER>> **] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 02 00 00 00 80
[1607931256.403551] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 02 00 00 00 80
[1607931256.407289] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0xAABBCCDD, len: 24, data:
0000: 81 80 02 00 01 05 0F 00 00 0C 00 14 04 02 00 00 01 00 00 00 00 00 11 00
[1607931256.407499] debug | ProxyClient.cpp | create_subscriber | subscriber created | client_key: 0xAABBCCDD, subscriber_id: 0x001(4), participant_id: 0x001(1)
[1607931256.407627] debug | SerialAgentLinux.cpp | send_message | [** <<SER>> **] | client_key: 0xAABBCCDD, len: 14, data:
0000: 81 80 02 00 05 01 06 00 00 0C 00 14 00 00
[1607931256.407675] debug | SerialAgentLinux.cpp | send_message | [** <<SER>> **] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 03 00 00 00 80
[1607931256.415135] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 03 00 00 00 80
[1607931256.514558] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0xAABBCCDD, len: 120, data:
0000: 81 80 03 00 01 03 6D 00 00 0D 00 52 02 02 00 00 5F 00 00 00 3C 64 64 73 3E 3C 74 6F 70 69 63 3E
0020: 3C 6E 61 6D 65 3E 53 74 72 69 6E 67 3C 2F 6E 61 6D 65 3E 3C 64 61 74 61 54 79 70 65 3E 73 74 64
0040: 5F 6D 73 67 73 3A 3A 6D 73 67 3A 3A 64 64 73 5F 3A 3A 53 74 72 69 6E 67 5F 3C 2F 64 61 74 61 54
0060: 79 70 65 3E 3C 2F 74 6F 70 69 63 3E 3C 2F 64 64 73 3E 00 00 11 00 00 00
[1607931256.514940] debug | ProxyClient.cpp | create_topic | topic created | client_key: 0xAABBCCDD, topic_id: 0x005(2), participant_id: 0x001(1)
[1607931256.515067] debug | SerialAgentLinux.cpp | send_message | [** <<SER>> **] | client_key: 0xAABBCCDD, len: 14, data:
0000: 81 80 03 00 05 01 06 00 00 0D 00 52 00 00
[1607931256.515092] debug | SerialAgentLinux.cpp | send_message | [** <<SER>> **] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 04 00 00 00 80
[1607931256.521302] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0B 01 05 00 03 00 03 00 80
[1607931256.521609] debug | SerialAgentLinux.cpp | send_message | [** <<SER>> **] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 04 00 00 00 80
[1607931256.524688] debug | SerialAgentLinux.cpp | send_message | [** <<SER>> **] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0B 01 05 00 03 00 03 00 80
[1607931256.525975] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 04 00 00 00 80
[1607931256.550409] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0xAABBCCDD, len: 176, data:
0000: 81 80 04 00 01 05 A7 00 00 0E 00 15 05 02 00 00 99 00 00 00 3C 64 64 73 3E 3C 64 61 74 61 5F 77
0020: 72 69 74 65 72 3E 3C 74 6F 70 69 63 3E 3C 6B 69 6E 64 3E 4E 4F 5F 4B 45 59 3C 2F 6B 69 6E 64 3E
0040: 3C 6E 61 6D 65 3E 72 74 2F 61 72 64 75 69 6E 6F 5F 63 68 61 74 74 65 72 3C 2F 6E 61 6D 65 3E 3C
0060: 64 61 74 61 54 79 70 65 3E 73 74 64 5F 6D 73 67 73 3A 3A 6D 73 67 3A 3A 64 64 73 5F 3A 3A 53 74
0080: 72 69 6E 67 5F 3C 2F 64 61 74 61 54 79 70 65 3E 3C 2F 74 6F 70 69 63 3E 3C 2F 64 61 74 61 5F 77
00A0: 72 69 74 65 72 3E 3C 2F 64 64 73 3E 00 00 13 00
[*** LOG ERROR #0001 ***] [2020-12-14 08:34:16] [] {argument index out of range}
[1607931256.551058] debug | SerialAgentLinux.cpp | send_message | [** <<SER>> **] | client_key: 0xAABBCCDD, len: 14, data:
0000: 81 80 04 00 05 01 06 00 00 0E 00 15 80 00
[1607931256.551152] debug | SerialAgentLinux.cpp | send_message | [** <<SER>> **] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 05 00 00 00 80
[1607931256.559236] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 05 00 00 00 80
But then, there is not any topic or node active and detected in ros2.
@asukiaaa how do you activate ros2 before running Micro-XRCE-DDS-Agent?
Kinds regards, Jorge
Hi Jorge @grafoteka We are running into the same problem with the same setup. Where you able to solve this? Thanks Nico
Hi @NicoZobernig I was not able to solve this problem. Could you do any progress? Thanks Jorge
I tried to run a serial publishing example on ESP32-WROOM-32(4MB Flash) but it loops rebooting. Is there any additional configuration to run serial publishing on ESP32 or does not support this?
I got these error codes through serial port for ESP32.
Thank you.