Enable MAVLINK on a port other than /dev/ttyACM0 in px4 support package

9 visualizaciones (últimos 30 días)
Hi, I am trying to run a HITL simulation on a pixhawk 4 mini using the px4 support package. I need to enable MAVLINK on /dev/ttyS1 (TELEM1) port on the pixhawk as this is where I have an onboard computer processing sesnor data and sending it via MAVROS (MAVLINK) to the pixhawk.
The connection works when booting the pixhawk without rc.txt. I know in the old version you could add some lines to rc.txt and start mavlink on a spercific port, however now (in 2021a) there is a GUI option to activate mavlink in the hardware settings for the model. Here you can only activate mavlink over /dev/ttyACM0. This is an issue as i need the USB to monitor and tune and i need to run mavros over the TELEM port.
Is there a way to enable mavlink on a spercific port ive treid using the lines in rc.txt from the old version which did'nt work, anyone have any insight i cant find much documentation on this.
Cheers :)
  1 comentario
Dave Mansfield
Dave Mansfield el 7 de Feb. de 2022
i have noticed that putting these lines in the rc.txt file does establish connection between my onboard computer and the pixhawk:
mavlink start -d /dev/ttyS1 -m onboard -b 921600 –x
mavlink boot_complete
however there is still no mavlink hearbeat detected and the mavros terminal stops after saying the pixhawks IMU has been detected.

Iniciar sesión para comentar.

Respuestas (1)

Arun Mathamkode
Arun Mathamkode el 6 de Abr. de 2022
PX4 HITL support is available from R2021b (Example Link), and I would highly recommend using R2021b for trying HITL. If you are trying HITL you must use the rCS as the startup script instead of custom rc.txt. You have an option to choose this in the Hardware setup screens from R2021b.
You can consider to use MAV_X_CONFIG parameter to enable MAVLink Telemetry on a specific serial port. As per PX4 documentation, MAVlink is defaulty enabled over TELEM1 (MAV_0_CONFIG) if you use rCS as startup script.

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by