Giter Site home page Giter Site logo

ros2arduino's Introduction

ros2arduino Build Status

Arduino library for communicating with ROS2(DDS)


Version-specific dependencies

  • Recommend version (present)
ros2arduino ROS2 Micro-XRCE-DDS Agent
0.2.1 Dashing Diademata Patch6 1.3.0

For the Micro-XRCE-DDS Agent, please install it using following commands.

$ git clone https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
$ cd Micro-XRCE-DDS-Agent && git checkout v1.3.0
$ mkdir build && cd build
$ source /opt/ros/dashing/setup.bash # to share libraries with ros2
$ cmake ..
$ make
$ sudo make install
$ sudo ldconfig /usr/local/lib/
  • All
ros2arduino ROS2 Micro-XRCE-DDS Agent
0.2.1 Dashing Diademata Patch6 1.3.0
0.1.4 Dashing Diademata Patch3 1.1.0
0.1.3 Dashing Diademata Patch3 1.1.0
0.1.2 Dashing Diademata Patch1 1.1.0
0.1.1 Dashing Diademata 1.1.0
0.0.9 Crystal Clemmys 1.0.1

Restrictions

Memory

  • RAM : >= 32Kb
  • Boards tested : Based on the normal behavior of publisher and subscriber.
    • OpenCR
    • Arduino MKR ZERO
    • ESP32 (not support TCP yet)

Communication

Implemented Note
Serial YES
UDP YES ESP32, Ethernet
TCP NO Debugging...

Getting Start

Dependancy Installation

You must install ROS2 and XRCE-DDS Agent. (The version should be the same as the Version-specific dependencies above)

Upload Arduino sketch

  • [File] - [Examples] - [ros2arduino]
    • Serial
      • [publisher]
    • UDP
      • [publisher_wifi_udp]
      • [publisher_ethernet_udp]
    • TCP
      • [publisher_wifi_tcp]
      • [publisher_ethernet_tcp]
  • [Sketch] - [Upload]

Excute Micro-XRCE-DDS Agent

  • Please refer to eProsima manual for Micro-XRCE-DDS-Agent usage.

  • 0.2.1 or above (Micro-XRCE-DDS-Agent 1.3.0)

    • Serial
      $ MicroXRCEAgent serial --dev /dev/ttyACM0 -b 115200
    • UDP
      $ MicroXRCEAgent udp4 -p 2018
    • TCP
      $ MicroXRCEAgent tcp4 -p 2018
  • 0.1.0 ~ 0.1.4 (Micro-XRCE-DDS-Agent 1.1.0)

    • Serial
      $ MicroXRCEAgent serial --dev /dev/ttyACM0 -b 115200
    • UDP
      $ MicroXRCEAgent udp -p 2018
    • TCP
      $ MicroXRCEAgent tcp -p 2018
  • 0.0.9 (Micro-XRCE-DDS-Agent 1.0.1)

    • Serial
      $ MicroXRCEAgent --serial /dev/ttyACM0 115200
    • UDP
      $ MicroXRCEAgent --udp 2018
    • TCP
      $ MicroXRCEAgent --tcp 2018

Check topic on ROS2

$ ros2 topic echo /arduino_chatter

Appendix: How to configure entities from reference file. (available at 0.1.1 or above)

  • Use the reference method supported by Client and Agent. Please refer to eProsima manual for detailed usage.

  • For this feature, you need to set UXR_CREATE_ENTITIES_USING_REF definition to 1.

     #define UXR_CREATE_ENTITIES_USING_REF 1
    • ros2arduino 0.1.1 ~ 0.1.4
      • You need to change the settings(library code) in ros2arduino library. (In the user_config.h)
  • Create .refs file(in XML format) and run the Agent with the following options:

     $ MicroXRCEAgent serial --dev /dev/ttyACM0 -b 115200 -r ros2arduino.refs
    • An example reference file is as follows.
      • ros2arduino.refs
         <profiles>
         	<participant profile_name="ros2arduino_xml_node">
         		<rtps>
         			<name>ros2arduino_basic_node</name>
         			<builtin>
         				<domainId>0</domainId>
         			</builtin>
         		</rtps>
         	</participant>
        
        
         	<data_writer profile_name="arduino_chatter">
         		<topic>
         			<kind>NO_KEY</kind>
         			<name>rt/arduino_chatter</name>
         			<dataType>std_msgs::msg::dds_::String_</dataType>
         			<historyQos>
         				<kind>KEEP_LAST</kind>
         				<depth>10</depth>
         			</historyQos>
         		</topic>
         	</data_writer>
        
        
         	<data_reader profile_name="arduino_led">
         		<topic>
         			<name>rt/arduino_led</name>
         			<dataType>std_msgs::msg::dds_::Bool_</dataType>
         		</topic>
         	</data_reader>
        
        
         	<topic profile_name="Bool">
         		<kind>NO_KEY</kind>
         		<name>Bool</name>
         		<dataType>std_msgs::msg::dds_::Bool_</dataType>
         	</topic>
        
         	<topic profile_name="String">
         		<kind>NO_KEY</kind>
         		<name>String</name>
         		<dataType>std_msgs::msg::dds_::String_</dataType>
         	</topic>
         </profiles>

Appendix: How to use the Security feature. (available at 0.1.1 or above)

This method should be preceded by the function described in "Appendix: How to configure entities from reference file."

And please check eProsima's manual for how to use it.


Development Note

Lastest release

  • Feature
    • Only one node available
    • Publisher
    • Subscriber
  • Communication
    • Serial
    • UDP

ros2arduino's People

Contributors

asukiaaa avatar hancheol-cho avatar njh avatar opusk avatar per1234 avatar taro83 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ros2arduino's Issues

Arduino UNO compiling issue

Hi to all,
I installed the library 0.2.1 in my Arduino IDE 2.0.0 but I've a message error when I verify the publisher.ino sketch:

xrce_types.h:819:55: error: size of array 'data' is too large
PackedSamples data[UXR_PACKED_SAMPLES_SEQUENCE_MAX];

Is this library compatible with Arduino UNO (it has 32kb of RAM) ?
Thanks
Leonard

Missing topic for running client

Hi @OpusK ,

thank you very much for creating ros2arduino!

I have a problem getting it fully to work. I use an ESP32 NodeMCU. After finding a suitable USB port, I was able to flash the udp publisher example. The previously (on Arch Linux) started XRCE agent gave the following:

$ MicroXRCEAgent udp -p 2018
Enter 'q' for exit
[1561411294.860510] info     | UDPServerLinux.cpp | init                     | running...             | port: 2018
[1561411316.612634] info     | Root.cpp           | create_client            | create                 | client_key: 0xAABBCCDD, session_id: 0x81
[1561411316.612674] info     | UDPServerBase.cpp  | on_create_client         | session established    | client_key: 0xAABBCCDD, address: 192.168.0.215:47138

Also the node list is looking good:

$ ros2 node list
/ros2_xrcedds_participant

But the test topic seems to be missing:

$ ros2 topic list
/parameter_events
/rosout

Also something seems to be wrong with the node:

$ ros2 node info /ros2_xrcedds_participant 
/ros2_xrcedds_participant
[ERROR] [rmw_fastrtps_shared_cpp]: Unable to find GUID for node: ros2_xrcedds_participant
Failed to get_subscriber_names_and_types: Unable to find GUID for node , at /opt/ros2_dashing/src/ros2/rmw_fastrtps/rmw_fastrtps_shared_cpp/src/rmw_node_info_and_types.cpp:85

Do you have any idea what could have gone wrong?

Cheers,
Thomas

Could start the node before the Agent?

Sorry for my poor English. Now it works well. I still have a question,maybe an enhancement.
Now , I must start the Agent first ,then start my Esp32 board. The node in the Esp32 board will connect the Agent. But when the Agent crashes, The board will not reconnect.
My question is : How to start the Agent after the Esp32 board started? Now I must reboot the Esp32 board. But in a production environment, It's not a good idea.

error: size of array 'data' is too large by using UNO

Hello:

I use Arduino UNO and it used Atmega328, so it has 32KB ram size.

When I compile the example program, it shows

Arduino: 1.8.12 (Linux), Board: "Arduino Uno"

In file included from /home/leowu/Arduino/libraries/ros2arduino/src/uxr/client/core/type/xrce_types.h:1:0,
from /home/leowu/Arduino/libraries/ros2arduino/src/ros2/xrcedds/micro_xrce_dds/lib/include/uxr/client/core/session/session.h:25,
from /home/leowu/Arduino/libraries/ros2arduino/src/uxr/client/core/session/session.h:1,
from /home/leowu/Arduino/libraries/ros2arduino/src/ros2/xrcedds/micro_xrce_dds/lib/include/uxr/client/client.h:24,
from /home/leowu/Arduino/libraries/ros2arduino/src/uxr/client/client.h:1,
from /home/leowu/Arduino/libraries/ros2arduino/src/ros2/xrcedds/micro_xrce_dds/micro_xrce_dds.h:18,
from /home/leowu/Arduino/libraries/ros2arduino/src/ros2/xrcedds/xrcedds.hpp:12,
from /home/leowu/Arduino/libraries/ros2arduino/src/ros2/publisher.hpp:12,
from /home/leowu/Arduino/libraries/ros2arduino/src/ros2/ros2.hpp:12,
from /home/leowu/Arduino/libraries/ros2arduino/src/ros2arduino.h:15,
from /home/leowu/hosekilu_source_code/arduino/test_ardunio_ros2/test_ardunio_ros2.ino:1:
/home/leowu/Arduino/libraries/ros2arduino/src/ros2/xrcedds/micro_xrce_dds/lib/include/uxr/client/core/type/xrce_types.h:819:55: error: size of array 'data' is too large
PackedSamples data[UXR_PACKED_SAMPLES_SEQUENCE_MAX];

In file included from /home/leowu/Arduino/libraries/ros2arduino/src/ros2/publisher.hpp:12:0,
from /home/leowu/Arduino/libraries/ros2arduino/src/ros2/ros2.hpp:12,
from /home/leowu/Arduino/libraries/ros2arduino/src/ros2arduino.h:15,
from /home/leowu/hosekilu_source_code/arduino/test_ardunio_ros2/test_ardunio_ros2.ino:1:
/home/leowu/Arduino/libraries/ros2arduino/src/ros2/xrcedds/xrcedds.hpp:103:66: warning: large integer implicitly truncated to unsigned type [-Woverflow]
void init(uint8_t rtps_product,unsigned int client_key=0xAABBCCDD);

In file included from /home/leowu/Arduino/libraries/ros2arduino/src/ros2arduino.h:15:0,
from /home/leowu/hosekilu_source_code/arduino/test_ardunio_ros2/test_ardunio_ros2.ino:1:
/home/leowu/Arduino/libraries/ros2arduino/src/ros2/ros2.hpp:27:85: warning: large integer implicitly truncated to unsigned type [-Woverflow]
Node(const char* node_name = "ros2_xrcedds_participant",unsigned int client_key=0xAABBCCDD);

/home/leowu/Arduino/libraries/ros2arduino/src/ros2/ros2.hpp:32:94: warning: large integer implicitly truncated to unsigned type [-Woverflow]
void recreate(const char* node_name = "ros2_xrcedds_participant",unsigned int client_key=0xAABBCCDD);

/home/leowu/hosekilu_source_code/arduino/test_ardunio_ros2/test_ardunio_ros2.ino: In constructor 'StringPub::StringPub()':
/home/leowu/hosekilu_source_code/arduino/test_ardunio_ros2/test_ardunio_ros2.ino:19:32: warning: large integer implicitly truncated to unsigned type [-Woverflow]
: Node("ros2arduino_pub_node")

/home/leowu/hosekilu_source_code/arduino/test_ardunio_ros2/test_ardunio_ros2.ino: In constructor 'LedSub::LedSub()':
/home/leowu/hosekilu_source_code/arduino/test_ardunio_ros2/test_ardunio_ros2.ino:37:32: warning: large integer implicitly truncated to unsigned type [-Woverflow]
: Node("ros2arduino_sub_node")

exit status 1
Error compiling for board Arduino Uno.

It seems the problem is UXR_PACKED_SAMPLES_SEQUENCE_MAX size too big.

Is this a issue? or I should make the ram size bigger?

Can I use Image that belong sensor_msg?

Hello.
Think you for your work. I'm use this repository for my own robot.
Then, I have problem. I want to publish image from esp32-cam. But this library don't have sensor_msg::Image. There, I try creating custom msg, but this ros2 system different original ros2 system. Can you add sensor_msg::Image? or Will you teach how make custom msg?
Think you.

Segmentation fault

I think ros2arduino is a wonderful project.
I thought trying it, but I will not move so I want you to follow me.

〇enviroment
Ubuntu :16.04 x64
ROS2 :Crystal Clemmys
Micro-XRCE-DDS Agent :git checkout a495c65faa964ddc068ac6e1249f17f5c9f92787
Hardware:M5Stack(ESP32)

〇Symptom
Ubuntu:$ MicroXRCEAgent serial /dev/ttyUSB0 115200
and
Arduino:Serial publisher start
[File] - [Examples] - [ros2arduino] - Serial - [publisher]

An error occurs
 $ MicroXRCEAgent serial /dev/ttyUSB0 115200
Serial agent initialization... OK
Enter 'q' for exit
RTPS Participant matched 1.f.a.6e.e.61.0.0.0.0.0.0|0.0.1.c1
Segmentation fault

MicroXRCEAgent is not seem to work

Hello @OpusK ,

I am working with ros2arduino using Arduino Due & ROS2 Dashing. I followed the instruction as below.
image

I run with this command after install publishing program to Arduino with using ArduinoIDE v1.8.10,

$ MicroXRCEAgent serial --dev /dev/ttyACM0 -b 115200

Result is as below:
image

And I cannot see topic(/arduino_chatter) from Arduino side.
Could you give me some advice to check?

Thanks

Ros Foxy Release

I see in the readme that you are planning to suppoert LTS version, you have a date to release foxy version

Publisher (or Topic) is not Registered to DDS/ROS2 Network

I'm working on porting ros2arduino implementation onto XMC4800 platform from Infineon.

Somehow I made to be registered to the agent, and this shows up in the ROS2 network using ros2 node list command. However, s do not attach to the ROS2 network, and using ros2 topic list does not show any topics related to XRCE DDS, and I'm stuck there.

It seems that stream reciprocates twice during topic/publisher registration, first register the topic and then create the publisher. Registering topic runs fine, and then some error occurs while creating the publisher.

In the first screenshot, after the long transmission (which is the XML configuration for entity creation), response goes fine; the trailing two bytes, which corresponds to status and implementation_status each, are both null bytes. However, in the second screenshot, the status byte becomes 0x80. It indicates something is wrong in the agent-side, and simultaneously causes the client-side to be incompletely initialized.

image

image

I tried virtually every possible method in my knowledge, but I couldn't resolve this problem. I would be appreciated if anyone would cooperate on this issue and help me get out from the stuck.

For your convenience, I wrote my environment and copy-pasted the terminal outputs below.

  • OS: Ubuntu 18.04 (WSL on Windows 10)
  • Communication Method: Serial @ 38,400 baud (tried 9600, 19200, 38400, 57600, 115200)
  • MTU Setting: 2048
  • Embedded Environment: XMC4800-2048 (Infineon)

[Terminal Outputs]

[1611220055.796359] info | TermiosAgentLinux.cpp | init | running... | fd: 3
[1611220055.797941] info | Root.cpp | set_verbose_level | logger setup | verbose_level: 6
[1611220721.797807] info | Root.cpp | create_client | create | client_key: 0xAABBCCDD, session_id: 0x81
[1611220721.798654] info | SessionManager.hpp | establish_session | session established | client_key: 0x2864434397, address: 0
[1611220721.799896] debug | SerialAgentLinux.cpp | send_message | [** <> ] | 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
[1611220731.412895] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0xAABBCCDD, len: 96, data:
0000: 81 80 00 00 01 05 56 00 00 0A 00 11 01 02 00 00 48 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 73 63 5F 6E 6F 64 65 3C 2F 6E 61 6D 65 3E
0040: 3C 2F 72 74 70 73 3E 3C 2F 70 61 72 74 69 63 69 70 61 6E 74 3E 3C 2F 64 64 73 3E 00 00 00 00 00
[1611220731.466333] debug | ProxyClient.cpp | create_participant | participant created | client_key: 0xAABBCCDD, participant_id: 0x001(1)
[1611220731.467316] debug | SerialAgentLinux.cpp | send_message | [
<> ] | client_key: 0xAABBCCDD, len: 14, data:
0000: 81 80 00 00 05 01 06 00 00 0A 00 11 00 00
[1611220731.468552] debug | SerialAgentLinux.cpp | send_message | [
<> ] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 01 00 00 00 80
[1611220731.476855] 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
[1611220731.477674] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0xAABBCCDD, len: 14, data:
0000: 81 80 00 00 05 01 06 00 00 0A 00 11 00 00
[1611220731.477922] debug | SerialAgentLinux.cpp | send_message | [
<> ] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 01 00 00 00 80
[1611220731.479035] debug | SerialAgentLinux.cpp | send_message | [
<> ] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 01 00 00 00 80
[1611220731.493329] 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
[1611220731.494255] 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
[1611220731.495997] 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
[1611220733.732759] 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
[1611220733.748690] 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
[1611220733.755965] debug | ProxyClient.cpp | create_publisher | publisher created | client_key: 0xAABBCCDD, publisher_id: 0x001(3), participant_id: 0x001(1)
[1611220733.757427] debug | SerialAgentLinux.cpp | send_message | [
<> ] | client_key: 0xAABBCCDD, len: 14, data:
0000: 81 80 01 00 05 01 06 00 00 0B 00 13 00 00
[1611220733.759561] debug | SerialAgentLinux.cpp | send_message | [
<> ] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 02 00 00 00 80
[1611220733.764739] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0xAABBCCDD, len: 14, data:
0000: 81 80 01 00 05 01 06 00 00 0B 00 13 00 00
[1611220733.765600] debug | SerialAgentLinux.cpp | send_message | [
<> ] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 02 00 00 00 80
[1611220733.781040] 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
[1611220733.783516] 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
[1611220734.948752] 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
[1611220734.949456] 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
[1611220734.951179] debug | ProxyClient.cpp | create_subscriber | subscriber created | client_key: 0xAABBCCDD, subscriber_id: 0x001(4), participant_id: 0x001(1)
[1611220734.952541] debug | SerialAgentLinux.cpp | send_message | [
<> ] | client_key: 0xAABBCCDD, len: 14, data:
0000: 81 80 02 00 05 01 06 00 00 0C 00 14 00 00
[1611220734.953202] debug | SerialAgentLinux.cpp | send_message | [
<> ] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 03 00 00 00 80
[1611220734.956106] debug | SerialAgentLinux.cpp | send_message | [
<> ] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0B 01 05 00 02 00 02 00 80
[1611220734.964985] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0xAABBCCDD, len: 14, data:
0000: 81 80 02 00 05 01 06 00 00 0C 00 14 00 00
[1611220734.965614] 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
[1611220734.965957] debug | SerialAgentLinux.cpp | send_message | [
<> ] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 03 00 00 00 80
[1611220734.980816] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0B 01 05 00 02 00 02 00 80
[1611220734.983469] debug | SerialAgentLinux.cpp | send_message | [
<> ] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 03 00 00 00 80
[1611220734.984380] 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
[1611220734.997380] 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
[1611220739.380824] 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
[1611220739.397140] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0xAABBCCDD, len: 116, data:
0000: 81 80 03 00 01 03 6B 00 00 0D 00 82 02 02 00 00 5D 00 00 00 3C 64 64 73 3E 3C 74 6F 70 69 63 3E
0020: 3C 6E 61 6D 65 3E 49 6E 74 33 32 3C 2F 6E 61 6D 65 3E 3C 64 61 74 61 54 79 70 65 3E 73 74 64 5F
0040: 6D 73 67 73 3A 3A 6D 73 67 3A 3A 64 64 73 5F 3A 3A 49 6E 74 33 32 5F 3C 2F 64 61 74 61 54 79 70
0060: 65 3E 3C 2F 74 6F 70 69 63 3E 3C 2F 64 64 73 3E 00 00 11 00
[1611220739.400912] debug | ProxyClient.cpp | create_topic | topic created | client_key: 0xAABBCCDD, topic_id: 0x008(2), participant_id: 0x001(1)
[1611220739.401767] 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
[1611220739.401917] debug | SerialAgentLinux.cpp | send_message | [
<> ] | client_key: 0xAABBCCDD, len: 14, data:
0000: 81 80 03 00 05 01 06 00 00 0D 00 82 00 00
[1611220739.402979] debug | SerialAgentLinux.cpp | send_message | [
<> ] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 04 00 00 00 80
[1611220739.413190] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0xAABBCCDD, len: 14, data:
0000: 81 80 03 00 05 01 06 00 00 0D 00 82 00 00
[1611220739.414728] debug | SerialAgentLinux.cpp | send_message | [
<> ] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 04 00 00 00 80
[1611220739.431301] 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
[1611220739.434625] 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
[1611220889.986863] 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
[1611220890.018878] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0xAABBCCDD, len: 172, data:
0000: 81 80 04 00 01 05 A1 00 00 0E 00 15 05 02 00 00 93 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 73 63 5F 69 6E 74 65 67 65 72 3C 2F 6E 61 6D 65 3E 3C 64 61 74 61 54
0060: 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 49 6E 74 33 32 5F 3C
0080: 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 72 69 74 65 72 3E
00A0: 3C 2F 64 64 73 3E 00 00 13 00 00 00
[1611220890.020470] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0B 01 05 00 03 00 04 00 80
[
* LOG ERROR #1 *] [2021-01-21 18:21:30] [] {argument index out of range}
[1611220890.025020] debug | SerialAgentLinux.cpp | send_message | [
<> ] | client_key: 0xAABBCCDD, len: 14, data:
0000: 81 80 04 00 05 01 06 00 00 0E 00 15 80 00
[1611220890.025506] debug | SerialAgentLinux.cpp | send_message | [
<> ] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 05 00 00 00 80
[1611220890.026051] debug | SerialAgentLinux.cpp | send_message | [
<> ] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 05 00 00 00 80
[1611220890.035257] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0xAABBCCDD, len: 14, data:
0000: 81 80 04 00 05 01 06 00 00 0E 00 15 80 00
[1611220890.036325] debug | SerialAgentLinux.cpp | send_message | [
<> **] | client_key: 0xAABBCCDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 05 00 00 00 80
[1611220890.051163] 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
[1611220890.052997] 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
[1611220890.054660] 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

Error while compiling publisher.ino

Hi,

I downloaded the latest release and tried to compile publisher.ino with arduino IDE.
But I received these "undefined reference.." errors:

/tmp/ccIgnkyo.ltrans0.ltrans.o: In function `IPAddress::printTo(Print&) const':
<artificial>:(.text+0x40a): undefined reference to `xrcedds::deleteEntity(xrcedds::DataWriter*)'
/tmp/ccIgnkyo.ltrans0.ltrans.o: In function `ros2::Publisher<std_msgs::String>::recreate()':
<artificial>:(.text+0x440): undefined reference to `ros2::getPrefixString(ros2::MessagePrefix)'
<artificial>:(.text+0x476): undefined reference to `xrcedds::createDataWriter(xrcedds::Publisher*, xrcedds::DataWriter*, char*, char const*)'
<artificial>:(.text+0x4b0): undefined reference to `ucdr_alignment'
/tmp/ccIgnkyo.ltrans0.ltrans.o: In function `std_msgs::String::size_of_topic(std_msgs::String const*, unsigned long)':
<artificial>:(.text+0x4f6): undefined reference to `ucdr_deserialize_string'
/tmp/ccIgnkyo.ltrans0.ltrans.o: In function `std_msgs::String::deserialize(void*, std_msgs::String*)':
<artificial>:(.text+0x514): undefined reference to `ucdr_serialize_string'
/tmp/ccIgnkyo.ltrans0.ltrans.o: In function `ros2::Publisher<std_msgs::String>::publish()':
<artificial>:(.text+0x592): undefined reference to `xrcedds::writeData(xrcedds::DataWriter*, void*, unsigned long)'
/tmp/ccIgnkyo.ltrans0.ltrans.o: In function `main':
<artificial>:(.text.startup+0x1e2): undefined reference to `ros2::init(void*)'
<artificial>:(.text.startup+0x232): undefined reference to `ros2::Node::Node(char const*)'
<artificial>:(.text.startup+0x282): undefined reference to `xrcedds::registerTopic(xrcedds::Participant*, char const*, char const*, unsigned char)'
<artificial>:(.text.startup+0x36a): undefined reference to `ros2::Node::createWallFreq(unsigned long, void (*)(void*, void*), void*, ros2::PublisherHandle*)'
<artificial>:(.text.startup+0x378): undefined reference to `ros2::spin(ros2::Node*)'

I moved src file as arduino libraries.
Anybody met this problem and how to solve?

ros2arduino.refs error

bwuk@robots:~/Micro-XRCE-DDS-Agent/build$ ls -l /dev/ttyACM0
crw-rw-rw- 1 root dialout 166, 0 Apr 12 18:04 /dev/ttyACM0
bwuk@robots:~/Micro-XRCE-DDS-Agent/build$ MicroXRCEAgent serial --dev /dev/ttyACM0 -b 115200 -r ros2arduino.refs
[1618272496.596805] info     | TermiosAgentLinux.cpp | init                     | running...             | fd: 3
2021-04-12 18:08:16.597 [XMLPARSER Error] Invalid element found into 'builtinAttributesType'. Name: domainId -> Function getXMLBuiltinAttributes
2021-04-12 18:08:16.597 [XMLPARSER Error] Error parsing participant profile -> Function parseXMLParticipantProf
2021-04-12 18:08:16.597 [XMLPARSER Error] Error parsing profile's tag participant -> Function parseProfiles
2021-04-12 18:08:16.597 [XMLPARSER Error] Error parsing profile's tag data_writer -> Function parseProfiles
2021-04-12 18:08:16.597 [XMLPARSER Error] Error parsing profile's tag data_reader -> Function parseProfiles
2021-04-12 18:08:16.597 [XMLPARSER Error] Error parsing profile's tag topic -> Function parseProfiles
2021-04-12 18:08:16.597 [XMLPARSER Error] Error parsing profile's tag topic -> Function parseProfiles
2021-04-12 18:08:16.597 [XMLPARSER Error] Error parsing 'ros2arduino.refs' -> Function loadXMLFile
[1618272496.597487] info     | Root.cpp           | set_verbose_level        | logger setup           | verbose_level: 4
^C
bwuk@robots:~/Micro-XRCE-DDS-Agent/build$ 

my ros2arduino.refs file:

 <profiles>
 	<participant profile_name="ros2arduino_xml_node">
 		<rtps>
 			<name>ros2arduino_basic_node</name>
 			<builtin>
 				<domainId>0</domainId>
 			</builtin>
 		</rtps>
 	</participant>


 	<data_writer profile_name="arduino_chatter">
 		<topic>
 			<kind>NO_KEY</kind>
 			<name>rt/arduino_chatter</name>
 			<dataType>std_msgs::msg::dds_::String_</dataType>
 			<historyQos>
 				<kind>KEEP_LAST</kind>
 				<depth>10</depth>
 			</historyQos>
 		</topic>
 	</data_writer>


 	<data_reader profile_name="arduino_led">
 		<topic>
 			<name>rt/arduino_led</name>
 			<dataType>std_msgs::msg::dds_::Bool_</dataType>
 		</topic>
 	</data_reader>


 	<topic profile_name="Bool">
 		<kind>NO_KEY</kind>
 		<name>Bool</name>
 		<dataType>std_msgs::msg::dds_::Bool_</dataType>
 	</topic>

 	<topic profile_name="String">
 		<kind>NO_KEY</kind>
 		<name>String</name>
 		<dataType>std_msgs::msg::dds_::String_</dataType>
 	</topic>
 </profiles>

Was I supposed to put something in ? It's saying NO_KEY.

I followed the steps over and over. It seems I get the same result.

OS: 20.04 LTS Focal
Ros2: Foxy
Ardiuno: Ardiuno 1.8.14 Hourly Build 2021
Laptop: Dell xps 13
CPU: I7

Any idea why is this happening?

Portenta H7 with Jetson NX

Hello!
I'm working on a project where I use a NVIDIA Jetson NX (with Ubuntu 18 and ROS Dashing) as a high-level controller, and I want to send ROS messages to a Portenta H7 acting as a low-level controller. I uploaded the publisher.ino example to the Portenta and installed the Micro-XRCE-DDS Agent on the NVIDIA NX. Afterwards, I connected the Portenta via USB to the NX and launched the agent: ./MicroXRCEAgent serial --dev /dev/ttyACM0 -b 115200. However, when I run ros2 topic list, I'm not able to see the /arduino_chatter topic.

This is the message I get when I run the agent on the NX:
image

I also tried checking if there is some data being sent to the USB port, with the screen command, but there is nothing being sent to the port. Any idea what might be happening?

Update: I also tried doing the same with a DUE board, and I have the same issue.
Update2: I also tried running the UDP example via Ethernet... and I have the same issue. The NX does not even recognize the Portenta in the network.

Thanks in advance!

Arduino MEGA support.

I was compiling ros2arduino library for arduino MEGA . is this only work for ARM boards such as arduino due ?

Thank you

ESP-IDF issue Issue with ucdr/types/string.h

Hi,
i like to use your library inside a ESP-IDF project together with the arduino-esp32 component.
Any hint?

$ make
Toolchain path: esp-idf-stable/../xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a
Compiler version: 5.2.0
Python requirements from esp-idf-stable/requirements.txt are satisfied.

CC build/app_trace/host_file_io.o
In file included from esp-idf-stable/components/app_trace/host_file_io.c:25:0:
esp_uros_test01/components/arduino/libraries/ros2arduino/src/ucdr/types/string.h:1:91: fatal error: ros2/xrcedds/micro_xrce_dds/lib/thirdparty/microcdr/include/ucdr/types/string.h: No such file or directory
compilation terminated.
esp-idf-stable/make/component_wrapper.mk:289: recipe for target 'host_file_io.o' failed
make[1]: *** [host_file_io.o] Error 1
esp-idf-stable/make/project.mk:552: recipe for target 'component-app_trace-build' failed
make: *** [component-app_trace-build] Error 2

"string.h" doesn't exist at that path.
Same code is compile-able within an original arduino environment. I can't understand why?

ESP32 Serial Communication & Build Error

Hi
Firstly I am trying serial commication with esp32 however when I try to build it gives this error.

Building in release mode
Compiling .pio/build/esp32doit-devkit-v1/lib346/ros2arduino/uxr/client/profile/transport/transport_arduino_internal.cpp.o
lib/ros2arduino/src/uxr/client/profile/transport/transport_arduino_internal.cpp:68:20: fatal error: WiFi.h: No such file or directory

**************************************************************
* Looking for WiFi.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:WiFi.h"
* Web  > https://platformio.org/lib/search?query=header:WiFi.h
*
**************************************************************

compilation terminated.
Compiling .pio/build/esp32doit-devkit-v1/FrameworkArduino/IPv6Address.cpp.o
Compiling .pio/build/esp32doit-devkit-v1/FrameworkArduino/MD5Builder.cpp.o
Compiling .pio/build/esp32doit-devkit-v1/FrameworkArduino/Print.cpp.o
Compiling .pio/build/esp32doit-devkit-v1/FrameworkArduino/Stream.cpp.o
Compiling .pio/build/esp32doit-devkit-v1/FrameworkArduino/StreamString.cpp.o
Compiling .pio/build/esp32doit-devkit-v1/FrameworkArduino/WMath.cpp.o
Compiling .pio/build/esp32doit-devkit-v1/FrameworkArduino/WString.cpp.o
Compiling .pio/build/esp32doit-devkit-v1/FrameworkArduino/base64.cpp.o
Compiling .pio/build/esp32doit-devkit-v1/FrameworkArduino/cbuf.cpp.o
Compiling .pio/build/esp32doit-devkit-v1/FrameworkArduino/esp32-hal-adc.c.o
Compiling .pio/build/esp32doit-devkit-v1/FrameworkArduino/esp32-hal-bt.c.o
*** [.pio/build/esp32doit-devkit-v1/lib346/ros2arduino/uxr/client/profile/transport/transport_arduino_internal.cpp.o] Error 1

I tried to change transport_arduino_internal.cpp file
I deleted these lines in transport_arduino_internal.cpp file.
Note : I dont need UDP or TCP so that it is not important for me.

#if defined(ESP_PLATFORM)
  #include <WiFi.h>
  #include <WiFiUdp.h>
#endif

#if defined(ESP_PLATFORM)
  WiFiUDP *p_wifi_udp = (WiFiUDP*)udp_instance;
  p_wifi_udp->begin(WiFi.localIP(), local_port);
#else
  p_udp->begin(local_port);
#endif  

Aftert this process it worked and upload to esp32 but when I checked it from Serial Monitor I saw nothing was shared.
only after the first reset a few lines of characters appear to be shared

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5828
entry 0x400806ac
~␀␀␘␀�␀␀␀␀␁␐␀XRCE␁␀␁␏���݁␀�␇��~␀␀␘␀�␀␀␀␀␁␐␀XRCE␁␀␁␏���݁␀�␇��~␀␀␘␀�␀␀␀␀␁␐␀XRCE␁␀␁␏���݁␀�␇��~␀␀␘␀�␀␀␀␀␁␐␀XRCE␁␀␁␏���݁␀�␇��~␀␀␘␀�␀␀␀␀␁␐␀XRCE␁␀␁␏���݁␀�␇��~␀␀␘␀�␀␀␀␀␁␐␀XRCE␁␀␁␏���݁␀�␇��~␀␀␘␀�␀␀␀�X�␀␀XXa␀��~␀�␀␀␀␇��~␀␀␘␀�␀␀␀␀␁␐␀XRCE␁␀␁␏���݁␀�␇��~␀␀␘␀�␀␀␀␀␁␐␀XRCE␁␀␁␏���݁␀�␇��~␀␀␘␀�␀␀␀␀␁␐␀XRCE␁␀␁␏���݁␀�␇��da�␀␀ce></␀pk␀t␀v::x␇�␌���:_
␁␅␀␂␀␀

nav_msgs::Odometry can't use

I can use Pose or PoseWithCovariance to transfer the data.
But I dont't know why I can't use the nav_msgs::Odometry.
ros2arduino version:0.0.9
OpenCR version: 1.4.5
Many thanks.

ros2arduino for ROS2 Foxy

Since the latest version of ros2arduino 0.2.1 library is for ROS2 Dashing Diademata Patch6, is there any version or means to use ros2arduino for ROS2 Foxy?

strange issues with the minimal publisher and subscriber example

I followed the instructions to run a minimal example on ros2. can anyone point me to where i should look for the error. The console gives the following result , i put the baud rate to a low value because otherwise the Arduino chip already crashes much earlier.
The example is the basic publisher from the examples ads2ros on an ESP32-Wroom-32. I am on ros iron and downloaded the foxy branch. I know its not foxy, but it would be great if someone could point me to the communication error.


marvin@marvin-X1-8:~$ MicroXRCEAgent serial --dev /dev/ttyUSB0 -b 2400 -v 5 
[1692024469.376987] info     | TermiosAgentLinux.cpp | init                     | running...             | fd: 3
[1692024469.377207] info     | Root.cpp           | set_verbose_level        | logger setup           | verbose_level: 5
[1692024472.298871] info     | Root.cpp           | create_client            | create                 | client_key: 0xAABBCCDD, session_id: 0x81
[1692024472.299003] info     | SessionManager.hpp | establish_session        | session established    | client_key: 0xAABBCCDD, address: 0
[1692024472.299334] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 19
[1692024472.427926] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 24
[1692024472.428181] info     | SessionManager.hpp | establish_session        | session re-established | client_key: 0xAABBCCDD, address: 0
[1692024472.428545] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 19
[1692024472.908255] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 108
[1692024472.913858] info     | ProxyClient.cpp    | create_participant       | participant created    | client_key: 0xAABBCCDD, participant_id: 0x001(1)
[1692024472.913993] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 14
[1692024472.914022] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024472.980352] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024473.041190] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024473.041722] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024473.124790] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024473.254184] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 24
[1692024473.254702] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0xAABBCCDD, publisher_id: 0x001(3), participant_id: 0x001(1)
[1692024473.254917] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 14
[1692024473.255014] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024473.337494] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024473.338019] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024473.380736] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024473.421441] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024473.505050] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024473.505488] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024473.580801] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024473.588746] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024473.718259] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 24
[1692024473.718766] info     | ProxyClient.cpp    | create_subscriber        | subscriber created     | client_key: 0xAABBCCDD, subscriber_id: 0x001(4), participant_id: 0x001(1)
[1692024473.719036] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 14
[1692024473.719090] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024473.781066] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024473.801602] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024473.801972] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024473.885814] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024473.969183] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024473.969607] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024473.981254] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024474.053164] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024474.136521] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024474.136958] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024474.181528] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024474.220223] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024474.749501] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 120
[1692024474.750130] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0xAABBCCDD, topic_id: 0x005(2), participant_id: 0x001(1)
[1692024474.750453] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 14
[1692024474.750517] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024474.781955] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024474.832834] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024474.833125] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024474.916757] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024474.982143] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024475.000207] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024475.000597] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024475.084581] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024475.167901] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024475.168376] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024475.182207] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024475.251748] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024475.335130] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024475.335583] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024475.382366] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024475.418467] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024476.185401] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 176
[*** LOG ERROR #0001 ***] [2023-08-14 16:47:56] [] {argument not found}
[1692024476.185892] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 14
[1692024476.185918] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024476.268984] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024476.269359] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024476.352801] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024476.382946] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024476.436304] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024476.436790] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024476.520371] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024476.583073] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024476.603699] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024476.604142] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024476.688130] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024476.771490] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024476.771948] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024476.783301] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024476.855396] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024476.938798] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024476.939224] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024476.983377] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0xAABBCCDD, len: 13
[1692024477.022373] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 13
[1692024477.535029] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0xAABBCCDD, len: 116
[1692024477.535456] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0xAABBCCDD, topic_id: 0x003(2), participant_id: 0x001(1)


keeps going like this until it crahses.

How to find the Agent_IP_Adress

For the publisher_wifi_udp.ino sketch

How do i find the agent address ?
#define AGENT_IP "AGENT_IP_ADDRESS"

Is it the address of the Host computer running the agent ? (Note that ROS2 and the agent are in a docker)

Additionnal questions
I have used publisher_wifi_udp.ino sketch with a esp32, is it supposed to work.
After i have started the agent and received a feed back that look good
Press CTRL+C to exit
[1608501506.414674] info | UDPv4AgentLinux.cpp | init | running... | port: 2018

 ROS2 topic list     does not give /arduino_chatter_chatter as a topic
 ROS2 echo /arduino_chatter     gave Could not determine the type for the passed topic

 ROS2 node list is empty 

Other problems
I have resinstalled the hole thing localy on my machine in order to test the serial option with tty/USB0 used in my machine.
I have the same result bad results

 An other thing 
 After the agent installation setup, i can only run ./MicroXRCEAgent .....   with the console that i used to make the installation
 ( when a close the console and try to run in a new console i get the bash: ./MicroXRCEAgent: No such file or directory)
 I also had this problem with the docker 

not working on M5StickC & M5Stack ("uxr_run_session_until_one_status" fails?)

Hello.

I'm trying to execute publisher_wifi_udp example on my M5StickC & M5Stack, but it didn't work.

I use:

  • Ubuntu 18.04
  • MicroXRCE 1.3.0
  • ROS2 Dashing
  • ros2arduino 0.2.1

I only changed the definitions of SSID, SSID_PW, AGENT_IP, and topic name, but even that it didn't work on my environment.

When I type ros2 node list on Ubuntu PC, the node on M5StickC appears.
However, when I try ros2 topic list, the topic doesn't.

The log I got is as follows:

$ MicroXRCEAgent udp4 -p 8888 -v 6
Press CTRL+C to exit
[1595517735.034458] info     | UDPv4AgentLinux.cpp | init                     | running...             | port: 8888
[1595517735.034679] info     | Root.cpp           | set_verbose_level        | logger setup           | verbose_level: 6
[1595517744.003647] debug    | UDPv4AgentLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0x00000000, 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
[1595517744.003931] info     | Root.cpp           | create_client            | create                 | client_key: 0xAABBCCDD, session_id: 0x81
[1595517744.004044] info     | SessionManager.hpp | establish_session        | session established    | client_key: 0x2864434397, address: 192.168.179.5:47138
[1595517744.004240] debug    | UDPv4AgentLinux.cpp | send_message             | [** <<UDP>> **]        | 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
[1595517744.208223] debug    | UDPv4AgentLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 104, data: 
0000: 81 80 00 00 01 05 5E 00 00 0A 00 11 01 02 00 00 50 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 76 65 72 43 5F 70 75 62 5F 6E 6F 64
0040: 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 74 3E 3C 2F 64
0060: 64 73 3E 00 00 00 00 00
[1595517744.208293] debug    | UDPv4AgentLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 13, data: 
0000: 81 00 00 00 0B 01 05 00 00 00 00 00 80
[1595517744.212494] debug    | ProxyClient.cpp    | create_participant       | participant created    | client_key: 0xAABBCCDD, participant_id: 0x001(1)
[1595517744.213185] debug    | UDPv4AgentLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 14, data: 
0000: 81 80 00 00 05 01 06 00 00 0A 00 11 00 00
[1595517744.213313] debug    | UDPv4AgentLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 01 00 00 00 80
[1595517744.213432] debug    | UDPv4AgentLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 01 00 00 00 80
[1595517744.241236] debug    | UDPv4AgentLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13, data: 
0000: 81 00 00 00 0B 01 05 00 00 00 00 00 80
[1595517744.262316] debug    | UDPv4AgentLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 13, data: 
0000: 81 00 00 00 0B 01 05 00 00 00 00 00 80
[1595517744.262453] debug    | UDPv4AgentLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 01 00 00 00 80
[1595517744.265069] debug    | UDPv4AgentLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 01 00 00 00 80
[1595517744.265944] debug    | UDPv4AgentLinux.cpp | recv_message             | [==>> UDP <<==]        | 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
[1595517744.266141] debug    | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0xAABBCCDD, publisher_id: 0x001(3), participant_id: 0x001(1)
[1595517744.266236] debug    | UDPv4AgentLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 14, data: 
0000: 81 80 01 00 05 01 06 00 00 0B 00 13 00 00
[1595517744.266271] debug    | UDPv4AgentLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 02 00 00 00 80
[1595517744.267676] debug    | UDPv4AgentLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 01 00 00 00 80
[1595517744.269640] debug    | UDPv4AgentLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 02 00 00 00 80
[1595517744.271013] debug    | UDPv4AgentLinux.cpp | recv_message             | [==>> UDP <<==]        | 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
[1595517744.271181] debug    | ProxyClient.cpp    | create_subscriber        | subscriber created     | client_key: 0xAABBCCDD, subscriber_id: 0x001(4), participant_id: 0x001(1)
[1595517744.271288] debug    | UDPv4AgentLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 14, data: 
0000: 81 80 02 00 05 01 06 00 00 0C 00 14 00 00
[1595517744.271319] debug    | UDPv4AgentLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 03 00 00 00 80
[1595517744.275051] debug    | UDPv4AgentLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 03 00 00 00 80
[1595517744.276067] debug    | UDPv4AgentLinux.cpp | recv_message             | [==>> UDP <<==]        | 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
[1595517744.276281] debug    | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0xAABBCCDD, topic_id: 0x005(2), participant_id: 0x001(1)
[1595517744.276370] debug    | UDPv4AgentLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 14, data: 
0000: 81 80 03 00 05 01 06 00 00 0D 00 52 00 00
[1595517744.276400] debug    | UDPv4AgentLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 04 00 00 00 80
[1595517744.279536] debug    | UDPv4AgentLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 04 00 00 00 80
[1595517744.280467] debug    | UDPv4AgentLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 168, data: 
0000: 81 80 04 00 01 05 9F 00 00 0E 00 15 05 02 00 00 91 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 63 68 61 74 74 65 72 3C 2F 6E 61 6D 65 3E 3C 64 61 74 61 54 79 70 65
0060: 3E 73 74 64 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
0080: 61 74 61 54 79 70 65 3E 3C 2F 74 6F 70 69 63 3E 3C 2F 64 61 74 61 5F 77 72 69 74 65 72 3E 3C 2F
00A0: 64 64 73 3E 00 00 13 00
[*** LOG ERROR #0001 ***] [2020-07-24 00:22:24] [] {argument index out of range}
[1595517744.280792] debug    | UDPv4AgentLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 14, data: 
0000: 81 80 04 00 05 01 06 00 00 0E 00 15 80 00
[1595517744.280817] debug    | UDPv4AgentLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 05 00 00 00 80
[1595517744.283845] debug    | UDPv4AgentLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 13, data: 
0000: 81 00 00 00 0A 01 05 00 05 00 00 00 80
^C[1595517745.642334] info     | UDPv4AgentLinux.cpp | fini                     | server stopped         | port: 8888

And, I found that the uxr_run_sesson_until_one_status method (session.c L268) called from new ros2::Publisher...(ros2.hpp L68) doesn't seem to return true, and then p_pub is deleted and nullptr is returned.
I'm not sure what code is returned, but at least p_pub->is_registered returns false.

Could you tell me if there's any solution to that? Thank you.

Micro XRCE-DDS Agent not working

@OpusK
Thank you for updating the instruction to Dashing. I now can execute all procedures without a problem on my TB3. The only issue I'm still having is with (I suspect) the Micro XRCE agent.
In the instructions, I can't check out (what I think is) the right version of the agent to link the OpenCR. This:
git checkout 26d6ee42d9812a3465548590a66588d81c511ddc
give me error "git reference is not a tree". Could this be because eProsima hasn't yet updated their repos?
Despite the error, I can use the Agent but my /cmd_vel messages are not received on the OpenCR. I know th erest of my setup works because it runs with the gazebo sim.
What is curious to me is that the /odom messages arrive on the "ROS" side of the setup but all values are rounded zeros, so I suspect they are not really being pushed from the OpenCR.
I'd be happy to help out getting this fixed. If you can point me in the right direction.
Thanks!

Support for building with ESP IDF environment

Hi,
i made some changes for building this within the esp idf environment.
I am able to compile the code and flash it to my esp32 board.
UDP communication with MicroXRCEAgent is functional.

ros2idf.patch.zip

Do have have any interest to integrate that in this repository?

Maik

allow user defined settings

For adjusting the size of the program and dynamic memory, it would be nice if the UXR_ macros (e.g. UXR_PACKED_SAMPLES_SEQUENCE_MAX, ...) could be user-defined.

Arduino Nano 3.0

Hi,

Will this support with Arduino Nano 3.0 ?

Thanks
Shashika

Questions about supporting multiple topics.

I handle multiple topics (pub and sub) on a device with using rosserial-arduiono.
I want to handle like that on ROS2 but ros2arduino supports only one topic.
Please allow me to ask some questions about that.

I'm not familiar with Micro-XRCE-DDS but does the Micro-XRCE-DDS have limitation for one topic?
Do you plan to support multiple topics?
If I want to realize handling multiple topics (pub and sub) with using device info on ROS2, should I create a program of service that handle pub and sub with communicating with a device?

Thank you for sharing an useful project.

How to create new message type

Hi, I would like to know how to create a new mesage type (e.g. sensor_msgs/NavSatStatus & sensor_msgs/NavSatFix).

So far, I know that the messages library is located at /src/ros2/ and I found comments in several .hpp files that they are generated via tool gen.

/*! 
 * @file Imu.hpp
 * This header file contains the declaration of the described types in the IDL file.
 *
 * This file was generated by the tool gen.
 */

I wish someone can show me how.
Thanks

PS: Yes, I'm aware that Micro-ROS is available but since my machine is using Ubuntu 18 & ROS2 Dashing, I stick with this library for compatibility.

Subscriber issues on OpenCR

I am using the ros2arduino v. 0.2.1.
ROS2 version is Foxy

I have an OpenCR where I want to create a ROS2 node. I managed to make it work with the publisher, but as soon as I add a subscriber, it seems that the process hangs somewhere, because the publisher stops working. I isolated the subscriber and I cannot find a way to make it work. I tried with the following code:

`
#include <ros2arduino.h>

#ifndef BDPIN_LED_USER_1
#define BDPIN_LED_USER_1 22
#endif

#define XRCEDDS_PORT Serial

void subscribeLed(std_msgs::Bool* msg, void* arg)
{
(void)(arg);

digitalWrite(BDPIN_LED_USER_1, msg->data);
}

class LedSub : public ros2::Node
{
public:
LedSub()
: Node("ros2arduino_sub_node")
{
this->createSubscriber<std_msgs::Bool>("arduino_led", (ros2::CallbackFunc)subscribeLed, nullptr);
}
};

void setup()
{
XRCEDDS_PORT.begin(115200);
while (!XRCEDDS_PORT);

ros2::init(&XRCEDDS_PORT);
pinMode(BDPIN_LED_USER_1, OUTPUT);
}

void loop()
{
static LedSub LedNode;

ros2::spin(&LedNode);
}
`

Any idea of what I'm doing wrong?

ros2 node info error

Hi.

Thanks for creating ros2arduino.
I'm using the publisher sample code.
I have a problem getting node info.

Environment
Ubuntu 18.04.4 LTS
ROS2 Dashing
Micro-XRCE-DDS-Agent v1.1.4

Probrem

$ ros2 node info /ros2arduino_pub_node
/ros2arduino_pub_node
[ERROR] [rmw_fastrtps_shared_cpp]: Unable to find GUID for node: ros2arduino_pub_node
Failed to get_subscriber_names_and_types: Unable to find GUID for node , at /tmp/binarydeb/ros-dashing-rmw-fastrtps-shared-cpp-0.7.6/src/rmw_node_info_and_types.cpp:87

Do you have any idea on how to solve this problem?

Thank you.

is support foxy?

I can not find arduino_chatter topic by ros2 topic list command,my ros version is foxy.how could i do

Error verifying code in arduino

In file included from C:\Users\micha\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\cores\arduino/SafeRingBuffer.h:25:0,
from C:\Users\micha\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\cores\arduino/Uart.h:23,
from C:\Users\micha\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\variants\arduino_zero/variant.h:43,
from C:\Users\micha\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\cores\arduino/Arduino.h:48,
from sketch\publisher.ino.cpp:1:
C:\Users\micha\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\cores\arduino/sync.h:28:22: error: expected unqualified-id before 'for'
#define synchronized for (__Guard __guard; __guard.enter(); )
^
D:\Users\micha\OneDrive\Documents\Arduino\libraries\ros2arduino\src/ros2/xrcedds/micro_xrce_dds/lib/include/uxr/client/core/session/session.h:97:10: note: in expansion of macro 'synchronized'
bool synchronized;
^~~~~~~~~~~~
C:\Users\micha\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\cores\arduino/sync.h:28:44: error: '__guard' does not name a type; did you mean '__Guard'?
#define synchronized for (__Guard __guard; __guard.enter(); )
^
D:\Users\micha\OneDrive\Documents\Arduino\libraries\ros2arduino\src/ros2/xrcedds/micro_xrce_dds/lib/include/uxr/client/core/session/session.h:97:10: note: in expansion of macro 'synchronized'
bool synchronized;
^~~~~~~~~~~~
C:\Users\micha\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\cores\arduino/sync.h:28:61: error: expected unqualified-id before ')' token
#define synchronized for (__Guard __guard; __guard.enter(); )
^
D:\Users\micha\OneDrive\Documents\Arduino\libraries\ros2arduino\src/ros2/xrcedds/micro_xrce_dds/lib/include/uxr/client/core/session/session.h:97:10: note: in expansion of macro 'synchronized'
bool synchronized;
^~~~~~~~~~~~
exit status 1
Error compiling for board Arduino Zero (Native USB Port).

Problems creating second Publisher

Hi there,
thanks for this very useful project. I am using it for my masters thesis and unfortunately I have a problem.

I am having trouble creating more than one Publisher on the NodeMCU. I am working with a Raspberry Pi 3B Running Ubuntu 18.04 64-Bit, Crystal, v0.9 of the library from github and the 1.0.1 version of the DDS agent. I took the sample code for a serial publisher and added a second publisher.

#include <ros2arduino.h>


#define XRCEDDS_PORT  Serial
#define PUBLISH_FREQUENCY 2 //hz
void publishString(std_msgs::String* msg, void* arg)
{
  (void)(arg);

  sprintf(msg->data, "Hello World1" );
}


void publishString2(std_msgs::String* msg, void* arg)
{
  (void)(arg);

  sprintf(msg->data, "Hello World2" );
}

class StringPub : public ros2::Node
{
public:
  StringPub()
  : Node()
  {
    ros2::Publisher<std_msgs::String>* publisher1_ = this->createPublisher<std_msgs::String>("arduino_chatter1");
    ros2::Publisher<std_msgs::String>* publisher2_ = this->createPublisher<std_msgs::String>("arduino_chatter2");
    
    this->createWallFreq(PUBLISH_FREQUENCY, (ros2::CallbackFunc)publishString, NULL, publisher1_);
    this->createWallFreq(PUBLISH_FREQUENCY, (ros2::CallbackFunc)publishString2, NULL, publisher2_);
  }
};

void setup() 
{
  XRCEDDS_PORT.begin(115200);
  while (!XRCEDDS_PORT); 

  ros2::init(&XRCEDDS_PORT);
  
}

void loop() 
{
  static StringPub StringNode;

  ros2::spin(&StringNode);
}

In this example, the second call to createPublisher returns NULL.
Am I doing this correctly and should this code work under normal conditions?

Thanks very much in advance for the Help

[question] : Is this supported for ROS2 Humble ?

I am working on a project with ROS2 ( Humble ) and arduino, will this library work for Humble? The only other alternative I could find was microROS but this library has some better readable code( similarity in syntax with ROS2) than it.

UDP Error with ESP32

Hello.

Do you know how to solve Serialization Error?

[1585565543.693715] error    | InputMessage.cpp   | log_error                | deserialization error  | buffer: 
0000: 12 00 15 00 80

Log of MicroXRCEAgent udp -p 50000 -v 5

[1585565377.806545] info     | UDPServerLinux.cpp | init                     | running...             | port: 50000
[1585565377.806875] info     | Root.cpp           | set_verbose_level        | logger setup           | verbose_level: 5
[1585565386.816984] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0x00000000, len: 148
[1585565489.217035] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0x00000000, len: 161
[1585565526.388516] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0x00000000, len: 24
[1585565526.388740] info     | Root.cpp           | create_client            | create                 | client_key: 0xAABBCCDD, session_id: 0x81
[1585565526.388876] info     | UDPServerBase.cpp  | on_create_client         | session established    | client_key: 0xAABBCCDD, address: 192.168.0.5:47138
[1585565526.389089] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 19
[1585565526.389726] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 24
[1585565526.390014] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 19
[1585565526.390921] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 24
[1585565526.391164] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 19
[1585565526.397325] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 92
[1585565526.405395] debug    | ProxyClient.cpp    | create_participant       | participant created    | client_key: 0xAABBCCDD, participant_id: 0x001(1)
[1585565526.405659] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 14
[1585565526.406720] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565526.448114] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 13
[1585565526.448427] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565526.550214] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 13
[1585565526.550444] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565526.710746] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565526.751156] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 13
[1585565526.751537] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565526.754546] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 13
[1585565526.755890] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 24
[1585565526.756041] debug    | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0xAABBCCDD, publisher_id: 0x001(3), participant_id: 0x001(1)
[1585565526.756253] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 14
[1585565526.756311] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565526.757689] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 13
[1585565526.760046] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 13
[1585565526.761250] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 24
[1585565526.761392] debug    | ProxyClient.cpp    | create_subscriber        | subscriber created     | client_key: 0xAABBCCDD, subscriber_id: 0x001(4), participant_id: 0x001(1)
[1585565526.761571] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 14
[1585565526.761638] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565526.773095] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 13
[1585565526.774128] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 120
[1585565526.774466] debug    | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0xAABBCCDD, topic_id: 0x005(2), participant_id: 0x001(1)
[1585565526.774641] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 14
[1585565526.774697] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565526.778140] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 13
[1585565526.779304] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 168
[1585565526.780362] debug    | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0xAABBCCDD, datawriter_id: 0x001(5), publisher_id: 0x001(3)
[1585565526.780538] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 14
[1585565526.780665] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565526.786724] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 13
[1585565526.787970] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 120
[1585565526.788477] debug    | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0xAABBCCDD, topic_id: 0x014(2), participant_id: 0x001(1)
[1585565526.788682] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 14
[1585565526.788751] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565526.791973] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 13
[1585565526.793276] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 172
[1585565526.794063] debug    | ProxyClient.cpp    | create_datareader        | datareader created     | client_key: 0xAABBCCDD, datareader_id: 0x001(6), subscriber_id: 0x001(4)
[1585565526.794313] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 14
[1585565526.794411] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565526.797745] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 13
[1585565526.800867] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 40
[1585565526.801340] debug    | DataWriter.cpp     | write                    | [** <<DDS>> **]        | client_key: 0x00000001, len: 5
[1585565526.801519] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565526.823034] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 20
[1585565526.823262] debug    | DataWriter.cpp     | write                    | [** <<DDS>> **]        | client_key: 0x00000001, len: 5
[1585565526.823439] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565526.841715] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 20
[1585565526.841966] debug    | DataWriter.cpp     | write                    | [** <<DDS>> **]        | client_key: 0x00000001, len: 5
[1585565526.842125] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565526.862498] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 20
[1585565526.862635] debug    | DataWriter.cpp     | write                    | [** <<DDS>> **]        | client_key: 0x00000001, len: 5
[1585565526.862713] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565526.884190] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 20
[1585565526.884626] debug    | DataWriter.cpp     | write                    | [** <<DDS>> **]        | client_key: 0x00000001, len: 5
[1585565526.884889] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565526.903686] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 20
[1585565526.903806] debug    | DataWriter.cpp     | write                    | [** <<DDS>> **]        | client_key: 0x00000001, len: 5
[1585565526.903900] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565526.925575] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 20
[1585565526.925684] debug    | DataWriter.cpp     | write                    | [** <<DDS>> **]        | client_key: 0x00000001, len: 5
[1585565526.925781] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565526.944740] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 20
[1585565526.944959] debug    | DataWriter.cpp     | write                    | [** <<DDS>> **]        | client_key: 0x00000001, len: 5
[1585565526.945120] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565526.965496] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 20
[1585565526.965726] debug    | DataWriter.cpp     | write                    | [** <<DDS>> **]        | client_key: 0x00000001, len: 5
[1585565526.965942] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565526.994352] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 20
[1585565526.994461] debug    | DataWriter.cpp     | write                    | [** <<DDS>> **]        | client_key: 0x00000001, len: 5
[1585565526.994580] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565527.006737] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 20
[1585565527.006934] debug    | DataWriter.cpp     | write                    | [** <<DDS>> **]        | client_key: 0x00000001, len: 5
[1585565527.007044] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565527.043987] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 40
[1585565527.044123] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565527.060395] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 60
[1585565527.060533] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565527.081579] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 80
[1585565527.081713] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565527.101302] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 100
[1585565527.101390] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565527.166950] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 113
[1585565527.167056] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565527.615070] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 126
[1585565527.615144] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 139
[1585565527.615175] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 152
[1585565527.615329] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565527.615432] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565527.615508] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565528.218624] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 165
[1585565528.218879] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565528.231726] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 178
[1585565528.232087] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565528.340701] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 191
[1585565528.340982] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565528.409201] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 204
[1585565528.409410] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565528.639222] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 217
[1585565528.639305] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 230
[1585565528.639499] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565528.639569] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565528.849346] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 243
[1585565528.849752] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565528.851281] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 256
[1585565528.851600] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565528.915866] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 269
[1585565528.916053] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565529.349860] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 282
[1585565529.350034] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 295
[1585565529.350077] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 308
[1585565529.350217] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565529.350287] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565529.350322] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565529.417789] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 321
[1585565529.418263] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565529.663316] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 334
[1585565529.663389] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 347
[1585565529.663711] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565529.663783] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565529.873116] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 360
[1585565529.873197] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 373
[1585565529.873369] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565529.873442] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565529.942222] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 386
[1585565529.942494] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565530.009111] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 399
[1585565530.009364] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565530.079007] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 412
[1585565530.081310] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565530.172733] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 425
[1585565530.172981] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565530.273994] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 438
[1585565530.274211] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565530.482613] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 451
[1585565530.482919] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 464
[1585565530.483236] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565530.483312] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565530.580255] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 477
[1585565530.581036] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565530.681325] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 490
[1585565530.681733] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565530.892336] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 503
[1585565530.892454] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 516
[1585565530.892671] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565530.892761] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565530.986503] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 529
[1585565530.986922] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565531.199382] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 542
[1585565531.199480] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 555
[1585565531.199632] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565531.199751] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565531.293638] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 568
[1585565531.294058] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565531.361083] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 581
[1585565531.361335] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565531.609065] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 594
[1585565531.609245] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 607
[1585565531.609503] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565531.609616] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565531.701252] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 620
[1585565531.701520] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565531.802207] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 633
[1585565531.802416] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565531.916201] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 646
[1585565531.916581] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565532.008606] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 659
[1585565532.016531] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565532.109723] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 672
[1585565532.109866] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565532.208168] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 685
[1585565532.208343] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565532.325681] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 698
[1585565532.325848] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565532.411759] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 711
[1585565532.411897] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565532.477744] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 724
[1585565532.478001] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565533.656995] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 737
[1585565533.657100] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 750
[1585565533.657134] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 763
[1585565533.657273] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565533.657350] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565533.657402] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565534.578354] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 776
[1585565534.578634] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 789
[1585565534.578812] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565534.578996] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565534.596183] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 802
[1585565534.596574] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565535.602533] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 815
[1585565535.602651] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 828
[1585565535.602688] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 841
[1585565535.603100] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565535.603194] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565535.603249] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565535.675592] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 854
[1585565535.675828] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565535.769826] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 867
[1585565535.770157] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565535.870890] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 880
[1585565535.871242] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565535.973118] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 893
[1585565535.973386] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565536.216853] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 919
[1585565536.217121] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565536.296499] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 932
[1585565536.296730] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565536.380743] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 945
[1585565536.381081] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565536.482514] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 958
[1585565536.482769] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565536.626192] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 971
[1585565536.626593] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565537.650114] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 984
[1585565537.650447] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565537.703151] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 997
[1585565537.703478] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565537.855258] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1010
[1585565537.855543] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565538.161041] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1023
[1585565538.161392] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565538.349967] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1036
[1585565538.350053] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1049
[1585565538.350315] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565538.350359] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565538.418119] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1062
[1585565538.418446] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565538.674527] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1075
[1585565538.674651] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1088
[1585565538.674926] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565538.675028] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565539.593669] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1101
[1585565539.593975] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565539.597932] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1114
[1585565539.598241] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565539.806004] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1127
[1585565539.806133] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1140
[1585565539.806486] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565539.806620] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565539.877542] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1153
[1585565539.877656] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565540.614060] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1166
[1585565540.614249] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1179
[1585565540.614653] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565540.614780] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565540.616034] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1192
[1585565540.616471] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565540.684446] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1205
[1585565540.684854] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565540.759639] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1218
[1585565540.760021] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565541.031265] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1244
[1585565541.031988] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565541.235453] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1257
[1585565541.235624] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565541.288376] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1270
[1585565541.288730] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565541.368766] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1283
[1585565541.369149] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565541.645697] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1309
[1585565541.646848] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565541.741830] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1322
[1585565541.742521] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565542.669458] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1335
[1585565542.669642] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1348
[1585565542.669976] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1361
[1585565542.669847] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565542.670638] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565542.671099] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565542.976717] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1374
[1585565542.977103] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565542.999058] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1387
[1585565542.999461] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565543.168706] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1400
[1585565543.168983] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565543.200725] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1413
[1585565543.201051] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565543.301561] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1426
[1585565543.301858] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565543.489150] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1439
[1585565543.489425] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1452
[1585565543.489714] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565543.489817] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565543.693380] debug    | UDPServerLinux.cpp | recv_message             | [==>> UDP <<==]        | client_key: 0xAABBCCDD, len: 1460
[1585565543.693638] debug    | UDPServerLinux.cpp | send_message             | [** <<UDP>> **]        | client_key: 0xAABBCCDD, len: 13
[1585565543.693715] error    | InputMessage.cpp   | log_error                | deserialization error  | buffer: 
0000: 12 00 15 00 80

Source code of ESP32(M5StickC)

#include <M5StickC.h>
#include <WiFi.h>
#include <WiFiUdp.h>
#include <ros2arduino.h>
#include <ros2wr.hpp>
#include <ESPmDNS.h>

const char *ssid = "foo";
const char *password = "bar";

WiFiUDP udp;
const char *host = "cat";

ROS2WR<std_msgs::String, geometry_msgs::Twist> *node;

void MainThread(void*);

void setup(){
	M5.begin();
	M5.Lcd.setTextSize(3);
	M5.Lcd.setRotation(3);
	//Wire.begin(0,26,10000);
	pinMode(10, OUTPUT);
	
	WiFi.begin(ssid, password);
	while(WiFi.status() != WL_CONNECTED);
	MDNS.begin("esp32.local");
	IPAddress ipa = MDNS.queryHost(host);
	String ipaa = ipa.toString();
	if(ipaa == "0.0.0.0")esp_restart();
	Serial.println(ipaa);
	
	while(!ros2::init(&udp, ipaa.c_str(), (uint16_t) 50000)){
		delay(1);
	}
	Serial.println("ros start");
	//Serial.begin(1500000);
	//ros2::init(&Serial);

	node = new ROS2WR<std_msgs::String, geometry_msgs::Twist>(50, "m5/pub", "cmd_vel");
	
	xTaskCreatePinnedToCore(MainThread, "MainThread", 1024*32, NULL, 2, NULL, 1);
}

void loop(){
	Serial.println("Spin");
	delay(1);
	ros2::spin(node);
}

void BrinkLED();

void MainThread(void *pvParameters){
	geometry_msgs::Twist smsg;
	std_msgs::String pmsg;
	uint64_t n = 0;
	while(1){
		do{
			delay(1);
			Serial.printf("%lld\n", n);
			n++;
		}while(!node->getSubscribeMsg(&smsg));
		BrinkLED();
		Serial.println("ok");
		sprintf(pmsg.data, "%lld\n", n);
		node->setPublishMsg(&pmsg);
		delay(1);
	}
}

void BrinkLED(){
	static bool stat = true;
	digitalWrite(10, (int)stat);
	stat = stat ? false : true;
}

uint8_t I2CWrite1Byte( uint8_t Addr ,  uint8_t Data )
{
	Wire.beginTransmission(0x38);
	Wire.write(Addr);
	Wire.write(Data);
	return Wire.endTransmission();
}

uint8_t I2CWritebuff( uint8_t Addr,  uint8_t* Data, uint16_t Length )
{
	Wire.beginTransmission(0x38);
	Wire.write(Addr);
	for (int i = 0; i < Length; i++)
	{
		Wire.write(Data[i]);
	}
	return Wire.endTransmission();
}


int16_t speed_buff[4] = {0};
int8_t  speed_sendbuff[4] = {0};
uint32_t count = 0;
uint8_t IIC_ReState = I2C_ERROR_NO_BEGIN;

uint8_t Setspeed( int16_t Vtx, int16_t Vty, int16_t Wt)
{
	Wt = ( Wt > 100 )  ? 100 :  Wt;
	Wt = ( Wt < -100 ) ? -100 : Wt;

	Vtx = ( Vtx > 100 )  ? 100 :  Vtx;
	Vtx = ( Vtx < -100 ) ? -100 : Vtx;
	Vty = ( Vty > 100 )  ? 100 :  Vty;
	Vty = ( Vty < -100 ) ? -100 : Vty;

	Vtx = ( Wt != 0 ) ? Vtx *  (100- abs(Wt)) / 100 : Vtx;
	Vty = ( Wt != 0 ) ? Vty *  (100- abs(Wt)) / 100 : Vty;

	speed_buff[0] = Vty - Vtx - Wt ;
	speed_buff[1] = Vty + Vtx + Wt ;
	speed_buff[3] = Vty - Vtx + Wt ;
	speed_buff[2] = Vty + Vtx - Wt ;

	for (int i = 0; i < 4; i++)
	{
		speed_buff[i] = ( speed_buff[i] > 100 )  ? 100 :  speed_buff[i];
		speed_buff[i] = ( speed_buff[i] < -100 ) ? -100 : speed_buff[i];
		speed_sendbuff[i] = speed_buff[i];
	}
	return I2CWritebuff(0x00,(uint8_t*)speed_sendbuff,4);
}

ROS2WR

#ifndef _ROS2WR_
#define _ROS2WR_

#include <Arduino.h>
#include <ros2arduino.h>
#include <WiFi.h>
#include <WiFiUdp.h>
#include <string.h>

//if QUEUE_SIZE > 2, you can not use xQueueOverwrite()!!!
//also use xQueueSend()
#define QUEUE_SIZE 3

template<typename MsgTx, typename MsgRx>
class ROS2WR : public ros2::Node{
private:
  ros2::Publisher<MsgTx> *_publisher;
  QueueHandle_t command_q, status_q;
  
  static void subsclibed(MsgRx* msg, void *arg){
    (void)(arg);
    static ROS2WR<MsgTx, MsgRx> *_this = ROS2WR<MsgTx, MsgRx>::thisPtr;
    xQueueSend(_this->command_q, msg, 0);
  }

  static void publishing(MsgTx* msg, void *arg){
    (void)(arg);
    static ROS2WR<MsgTx, MsgRx> *_this = ROS2WR<MsgTx, MsgRx>::thisPtr;
    MsgTx qmsg;
    if(xQueueReceive(_this->status_q, &qmsg, 0) == pdTRUE){
      memcpy(msg, &qmsg, sizeof(qmsg));
    }
  }

public:
  static ROS2WR<MsgTx, MsgRx>* thisPtr;

  ROS2WR(uint32_t pubFreq, String pubTopicName, String subTopicName):Node("esp32"){
    this->thisPtr = this;
    command_q = xQueueCreate(QUEUE_SIZE, sizeof(MsgRx));
    status_q = xQueueCreate(QUEUE_SIZE, sizeof(MsgTx));
    this->_publisher = this->createPublisher<MsgTx>(pubTopicName.c_str());
    this->createWallFreq(pubFreq, (ros2::CallbackFunc)this->publishing, nullptr, _publisher);
    this->createSubscriber<MsgRx>(subTopicName.c_str(), (ros2::CallbackFunc)this->subsclibed, nullptr);
  }

  void setPublishMsg(MsgTx *msg){
      xQueueSend(this->status_q, msg, 0);
  }

  bool getSubscribeMsg(MsgRx *msg){
      if (xQueueReceive(this->command_q, msg, 0) == pdTRUE) return true;
      else return false;
  }
};

template <typename MsgTx, typename MsgRx>
ROS2WR<MsgTx, MsgRx>* ROS2WR<MsgTx, MsgRx>::thisPtr;

#endif

Support for Ardunino Uno

I saw that the Arduino DUE is supported, but not the UNO.

Will the support be added, or does already work?

Thanks!

Serial example on ESP32 does not start

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.

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:928
ho 0 tail 12 room 4
load:0x40078000,len:9280
load:0x40080400,len:5860
entry 0x40080698
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC      : 0x400d3928  PS      : 0x00060d30  A0      : 0x800d38a6  A1      : 0x3ffe39e0  
A2      : 0x3ffc006e  A3      : 0x00000029  A4      : 0x3ffc0d44  A5      : 0x00000000  
A6      : 0x00000000  A7      : 0x00000000  A8      : 0x3ffe3b2c  A9      : 0x3ffe39e0  
A10     : 0x00000000  A11     : 0x3ffc006e  A12     : 0x00000029  A13     : 0x3ffe3b26  
A14     : 0x000000dd  A15     : 0x0000000f  SAR     : 0x00000010  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000000  LBEG    : 0x4000c28c  LEND    : 0x4000c296  LCOUNT  : 0x00000000  

Backtrace: 0x400d3928:0x3ffe39e0 0x400d38a3:0x3ffe3a00 0x400d3d0b:0x3ffe3a20 0x400d3447:0x3ffe3a60 0x400fb103:0x3ffe3aa0 0x400d2489:0x3ffe3ac0 0x400d253a:0x3ffe3ae0 0x400d1c20:0x3ffe3b50 0x400d16a8:0x3ffe3b70 0x400d1727:0x3ffe3b90 0x400d159f:0x3ffe3bb0 0x400d8603:0x3ffe3bd0 0x400826ab:0x3ffe3bf0 0x400828a0:0x3ffe3c20 0x40078f93:0x3ffe3c40 0x40078ff9:0x3ffe3c70 0x40079004:0x3ffe3ca0 0x400791a3:0x3ffe3cc0 0x400806ca:0x3ffe3df0 0x40007c31:0x3ffe3eb0 0x4000073d:0x3ffe3f20

Rebooting...
ets Jun  8 2016 00:22:57

Thank you.

Generate ROS2 library to avoid version incompatibility

The original rosserial_arduino rebuilt the ROS library each time. This is helpful because it allows the project to be built with different (possibly incompatible) versions of ROS. It is also helpful to be able to build everything with catkin_make, which is why arduino-cmake was used. It seems arduino-cmake is inactive now, but my fork of arduino-cmake can be used and has been updated to work with the Teensy boards.

Node constructor failing?

Environment
Ubuntu 18.04.3 LTS
ROS2 Dashing
Micro-XRCE-DDS-Agent v1.1.0
Arduino Due

Problem
I'm not sure how to debug further, but something is preventing the ros2::Node class from being instantiated properly. When I was first playing around with this a couple of months ago, the code below (or something very closely resembling it) was working correctly (meaning an analog voltage was being written to the pin successfully, and the DDS agent could be brought up and down without a problem). I've also tried compiling and uploading the code with the subscription instantiation commented out, and it still fails the same way. The first block of DEBUG LED code in loop can be seen after uploading the sketch, but the second block cannot. When starting the Micro XRCE DDS Agent, the client is not created, it instead hangs after init, like so:

~$ MicroXRCEAgent serial --dev /dev/ttyACM0 -b 115200
Enter 'q' for exit
[1572982921.122000] info     | SerialServerLinux.cpp | init                     | running...             | fd: 3

After entering 'q', I get:

[1572983745.971604] info     | SerialServerLinux.cpp | close                    | server stopped         | fd: 3
Segmentation fault (core dumped)
#include <ros2arduino.h>

#define XRCEDDS_PORT Serial
#define PROGRAM_BAUD 115200

#define INTENSITY_LED 7

#define ANALOG_RESOLUTION_BITS 12

const static int ANALOG_NUM_VALUES = pow(2, ANALOG_RESOLUTION_BITS);

void intensity_change_callback(std_msgs::Float32* msg, void* arg)
{
  (void)(arg);
  
  int fixed_value = (int)(msg->data * ANALOG_NUM_VALUES);
  if (fixed_value >= ANALOG_NUM_VALUES)
  {
    fixed_value = ANALOG_NUM_VALUES - 1;
  }
  else if (fixed_value < 0)
  {
    fixed_value = 0;
  }
  
  analogWrite(INTENSITY_LED, fixed_value);
  digitalWrite(LED_BUILTIN, 1 - digitalRead(LED_BUILTIN));
}

class DueNode : public ros2::Node
{
//private:
//  ros2::Publisher<std_msgs::String>* due_debug_pub;

public:
  DueNode() : Node("due_node")
  {
    this->createSubscriber<std_msgs::Float32>(
      "smart_home/intensity_change_chatter",
      (ros2::CallbackFunc)intensity_change_callback,
      nullptr
    );
    
    //due_debug_pub =
    //  this->createPublisher<std_msgs::String>("smart_home/due_debug_chatter");
  }
};

void setup()
{
  XRCEDDS_PORT.begin(PROGRAM_BAUD);
  while (!XRCEDDS_PORT);
  
  pinMode(INTENSITY_LED, OUTPUT);
  pinMode(LED_BUILTIN, OUTPUT);
  analogWriteResolution(ANALOG_RESOLUTION_BITS);
  
  ros2::init(&XRCEDDS_PORT);
}

void loop()
{
  // DEBUG LED No. 1
  digitalWrite(LED_BUILTIN, HIGH);
  delay(1500);
  digitalWrite(LED_BUILTIN, LOW);
  delay(1500);
  
  static DueNode due_node;
  
  // DEBUG LED No. 2
  for (int i = 0; i < 5; i++)
  {
    digitalWrite(LED_BUILTIN, HIGH);
    delay(100);
    digitalWrite(LED_BUILTIN, LOW);
    delay(100);
  }
  
  ros2::spin(&due_node);
}

Any ideas on what's happening?

UDP-Subscriber is supported?

Is ros2arduino supported by UDP-Subscriber ?
Example Serial-Port subscriber is good working.
But when I tried it looks like UDP-Subscriber does not move.

〇enviroment
Ubuntu :16.04 x64
ROS2 :Crystal Clemmys
Micro-XRCE-DDS Agent: lastest
Hardware:M5Stack(ESP32)

Serial-Port subscriber in Example is good working.
https://github.com/ROBOTIS-GIT/ros2arduino/blob/master/examples/subscriber/subscriber.ino

UDP-Subscriber does not move on my code.
https://github.com/neko0112358/ros2arduino_trial/blob/master/test.ino

ESP32/ Arduino Uno: error: size of array 'data' is too large

Hi All,

Just a quick one. I am trying to compile the simple serial publisher in ros2arduino (version 0.2.1) with ROS2 dashing. I can successfully install and run the MicroXRCEAgent on my laptop however, am having trouble compiling the publisher example through Arduino IDE for an ESP32-based board with 32kb of flash memory.

The error is:

In file included from /home/tom/Arduino/libraries/ros2arduino/src/uxr/client/core/type/xrce_types.h:1:0,
                 from /home/tom/Arduino/libraries/ros2arduino/src/ros2/xrcedds/micro_xrce_dds/lib/include/uxr/client/core/session/session.h:25,
                 from /home/tom/Arduino/libraries/ros2arduino/src/uxr/client/core/session/session.h:1,
                 from /home/tom/Arduino/libraries/ros2arduino/src/ros2/xrcedds/micro_xrce_dds/lib/include/uxr/client/client.h:24,
                 from /home/tom/Arduino/libraries/ros2arduino/src/uxr/client/client.h:1,
                 from /home/tom/Arduino/libraries/ros2arduino/src/ros2/xrcedds/micro_xrce_dds/micro_xrce_dds.h:18,
                 from /home/tom/Arduino/libraries/ros2arduino/src/ros2/xrcedds/xrcedds.hpp:12,
                 from /home/tom/Arduino/libraries/ros2arduino/src/ros2/publisher.hpp:12,
                 from /home/tom/Arduino/libraries/ros2arduino/src/ros2/ros2.hpp:12,
                 from /home/tom/Arduino/libraries/ros2arduino/src/ros2arduino.h:15,
                 from /home/tom/Arduino/libraries/ros2arduino/examples/publisher/publisher.ino:2:
/home/tom/Arduino/libraries/ros2arduino/src/ros2/xrcedds/micro_xrce_dds/lib/include/uxr/client/core/type/xrce_types.h:819:55: error: size of array 'data' is too large
     PackedSamples data[UXR_PACKED_SAMPLES_SEQUENCE_MAX];
                                                       ^

The README says >=32kb RAM, but can someone confirm this works on an Uno? If not, I would be happy to change boards to a MKR Zero if that is more recommended.

Thanks, Tom.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.