Autopilot Setup
According to official document
- Set
MAV_1_CONFIG
to0
. - Set
UXRCE_DDS_CFG
to102(TELEM2)
. - Set
SER_TEL2_BAUD
to921600
. - In MAVLink Console run
uxrce_dds_client stop
thenuxrce_dds_client start -t serial -d /dev/ttyS1 -b 921600
. - Reboot Vehicle in QGroundControl.
Environment Setup on Companion Computer
- Install ROS2 Foxy
- Install uXRCE_DDS agent by Step 3 of here.
- Build ROS2 workspace with px4_msgs and px4_ros_com.
Problem
On companion computer run sudo MicroXRCEAgent serial --dev /dev/ttyTHS0 -b 921600
and I only got this:
amov@amov-desktop:~$ sudo MicroXRCEAgent serial --dev /dev/ttyTHS0 -b 921600
[1741267380.825678] info | TermiosAgentLinux.cpp | init | running... | fd: 3
[1741267380.826487] info | Root.cpp | set_verbose_level | logger setup | verbose_level: 4
and running ros2 topic list
I got nothing more than /rosout
and /parameter_events
.
Some Other Things
Check with serial connection
I ran cutecom
to see the incoming data of /dev/ttyTHS0
, then I got:
It seems like there are incoming data frames (starts with 7e 01
and ends cf 12
) coming in with ~1hz. So I guess the wire connection was right.
Trials with Other Baud Rates
I read this and tried to set Baud rates with TELEM2
to either 57600, 115200 and 1000000. All of them cause same result. The change of baud rate including these steps(115200 for example):
- Change
SER_TEL2_BAUD
to 115200. - In MAVLink Console run
uxrce_dds_client stop
thenuxrce_dds_client start -t serial -d /dev/ttyS1 -b 115200
. - Reboot vehicle in QGroundControl.
- On companion computer run
sudo MicroXRCEAgent serial --dev /dev/ttyTHS0 -b 115200
. - Try with
cutecom
to see the data coming to/dev/ttyTHS0
.
Basic Configuration
Parameters
In case other parameters need to be examined, I saved a .params
file here.
The Most Weird Thing
I have used the SAME companion computer to receive the ROS2 topic data with another vehicle. Here is the brief information about it:
- Model: AmovLab P450 Quadrotor.
- Controller: Pixhawk6C
- Firmware Version: 1.15.4
- Link: here
- PX4 Params: here
- Wire Connections:
TELEM2
on Pixhawk6C <—>UART1
on Amov NX
So I guess my companion computer was set right.
Summary
Basically, I’ve encounter problems with receiving uXRCE messages from a VTOL with CubePilot Cube Orange+ using a companion computer that has already succeeded with another quadrotor with Pixhawk6C. I have ruled out (in my mind) problems with wire connections and companion computer. I guess it has something to do with settings with CubePilot Cube Orange+.
I hope someone can help. I am pretty desperate about this. If someone is reading documents with AmovLab devices, they are in Mandarin and I recommend to translate it by web browser.
Wish all the best