Closed gorghino closed 1 year ago
I chcked the logging module on the mro and apparently micro-ros-agent is complaining about a missing ping:
Checking PX4 code along with my Agent v6 debug, I think that
[1672235108.800513] debug | SerialAgentLinux.cpp | recv_message | [==>> SER <<==] | client_key: 0x00000001, len: 16, data:
0000: 80 00 00 00 02 01 08 00 00 0A FF FD 02 00 00 00
is the PING requested by dds_client.
After that I have a 4 DDS write and then two send_message
[1672235108.801955] debug | SerialAgentLinux.cpp | send_message | [** <<SER>> **] | client_key: 0x00000001, len: 32, data:
0000: 81 00 00 00 0F 01 18 00 64 48 AC 63 55 6A CA 2F 64 48 AC 63 95 69 CA 2F 02 00 00 00 88 E8 14 16
[1672235108.802859] debug | SerialAgentLinux.cpp | send_message | [** <<SER>> **] | client_key: 0x00000001, len: 36, data:
0000: 81 00 00 00 06 01 1C 00 00 0A FF FD 00 01 01 0D 58 52 43 45 01 00 01 0F 00 01 0D 00 01 00 00 00
0020: 00 00 00 00
I don't know how to decode them though. Aren't they ok as PONG?
I guess that this shall be moved to PX4 client.
Hi, I flashed the latest PX4 repo in my mRo Control Zero H7. I'm actually synced with this PR (https://github.com/PX4/PX4-Autopilot/pull/20812) that fixes a problem with nuttx, otherwise the latest working PX4 version is the commit before 21 Nov (https://github.com/PX4/PX4-Autopilot/issues/20793).
In my SD card I put
microdds_client start -t serial -d /dev/ttyS1 -b 115200
in extras.txt.On my Nvidia NX (Jetpack 5.0.2 - Ubuntu 20.04) I installed ROS2 humble by sources and I cloned micro-ROS-Agent in my workspace. No errors with compiling everything.
When I run
./build/micro_ros_agent/micro_ros_agent serial -D /dev/ttyTHS1 -b 115200
I can see it starting and subscribing the topics from PX4 but after 2/3sec the client is deleted and the session is closed. Then the session is either established or re-established.The flight controller is powered via an external bench power supply (5V 1A). I tried a Pixhawke 6C with latest PX4 (cloned by main repo), and the session is not closed and micro-ros-agent works.
I tried the same mRo FC with a second NVIDIA NX, same OS where we installed ROS2 Foxy by binaries. I have the same behavior with micro-ROS-Agent (latest commit with foxy branch).
To Reproduce Steps to reproduce the behaviour:
Get a mRo Control Zero H7
Clone latest PX4 and apply the PR:
Flash mro_ctrl-zero-h7-oem_default.px4 with QGroundControl or similar
Add
microdds_client start -t serial -d /dev/ttyS1 -b 115200
in SD's /etc/extras.txt.Wire the mRO to a UART (Ubuntu 20.04)
Compile micro-ros-agent (according to your ROS2)
git clone -b humble https://github.com/micro-ROS/micro-ROS-Agent && rosdep update && rosdep install --from-paths src --ignore-src -y && colcon build --packages-select micro_ros_agent
Run micro-ros-agent after sourcing ROS2 and your workspace
. ~/ros2_humble/install/setup.bash
. install/setup.bash
./build/micro_ros_agent/micro_ros_agent serial -D /dev/ttyTHS1 -b 115200
Expected behaviour micro-ros-agent shall start, subcribe the topics and never lose/delete the session
System information (please complete the following information):
LOG with v6 flag: micro-ros-agent-v6-mro.log