Hi everyone,
I’m new in this field.
With my laptop and using ROS 2, I want to communicate with an Arduino DUE (with micro ROS running on it) connected to the companion computer.
After setting up micro ROS on my Arduino DUE and testing the serial communication on my laptop (following this tutorial), I confirmed that everything is working ok:
$ ros2 run micro_ros_agent micro_ros_agent serial --dev /dev/ttyACM0 -b 115200 -v6
[1678973917.856675] info | TermiosAgentLinux.cpp | init | running... | fd: 3
[1678973917.857069] info | Root.cpp | set_verbose_level | logger setup | verbose_level: 6
[1678973935.542156] info | Root.cpp | create_client | create | client_key: 0x0793D525, session_id: 0x81
[1678973935.542255] info | SessionManager.hpp | establish_session | session established | client_key: 0x0793D525, address: 0
[1678973935.542397] debug | SerialAgentLinux.cpp | send_message | [** <<SER>> **] | client_key: 0x0793D525, len: 19, data:
0000: 81 00 00 00 04 01 0B 00 00 00 58 52 43 45 01 00 01 0F 00
The next steps were:
- connect the Arduino to the companion computer
- create the serial port (baud rate 115200) and the UDP port (192.168.2.2:8888) using routing
- communicate with the Arduino through the UDP using micro ROS on my topside laptop
But something is wrong:
$ ros2 run micro_ros_agent micro_ros_agent udp4 --ip 192.168.2.1 --port 8888
[1678974517.990334] info | UDPv4AgentLinux.cpp | init | running... | port: 8888
[1678974517.990704] info | Root.cpp | set_verbose_level | logger setup | verbose_level: 4
[1678974531.335043] error | InputMessage.cpp | log_error | deserialization error | buffer:
0000: 7E 00 00 18 00 80 00 00 00
[1678974532.326210] error | InputMessage.cpp | log_error | deserialization error | buffer:
0000: 7E 00
Any idea of what it might be?
Some extra info:
- script on Arduino DUE: example publisher
- ROS 2 version: galactic (inside a custom docker)
- final target: read Ping from my laptop in the ROS 2 ecosystem
Eventually, does anyone know also how to read the Ping from ROS 1?