Closed iwishiwasaneagle closed 4 months ago
After adding the -p
flag to px4-rc.mavlink
and re-running, it now seems that mavros is connecting to PX4 via mavlink On the mavros docker image I can echo the topics
Attaching to mavros-1
mavros-1 | [INFO] [launch]: All log files can be found below /root/.ros/log/2024-07-08-10-15-12-673480-jhlaptop-1
mavros-1 | [INFO] [launch]: Default logging verbosity is set to INFO
mavros-1 | [INFO] [mavros_node-1]: process started with pid [48]
mavros-1 | [mavros_node-1] [INFO] [1720433712.881072527] [mavros.mavros_node]: Starting mavros_node container
mavros-1 | [mavros_node-1] [INFO] [1720433712.881178725] [mavros.mavros_node]: FCU URL: udp://0.0.0.0:14540@
mavros-1 | [mavros_node-1] [INFO] [1720433712.881188740] [mavros.mavros_node]: GCS URL:
mavros-1 | [mavros_node-1] [INFO] [1720433712.881194554] [mavros.mavros_node]: UAS Prefix: /uas1
mavros-1 | [mavros_node-1] [INFO] [1720433712.881199696] [mavros.mavros_node]: Starting mavros router node
mavros-1 | [mavros_node-1] [INFO] [1720433712.889699385] [mavros.mavros_router]: Built-in SIMD instructions: SSE, SSE2
mavros-1 | [mavros_node-1] [INFO] [1720433712.889724952] [mavros.mavros_router]: Built-in MAVLink package version: 2024.6.6
mavros-1 | [mavros_node-1] [INFO] [1720433712.889733772] [mavros.mavros_router]: Known MAVLink dialects: common ardupilotmega ASLUAV AVSSUAS all csAirLink cubepilot development icarous matrixpilot paparazzi standard storm32 uAvionix ualberta
mavros-1 | [mavros_node-1] [INFO] [1720433712.889738183] [mavros.mavros_router]: MAVROS Router started
mavros-1 | [mavros_node-1] [INFO] [1720433712.889795596] [mavros.mavros_router]: Requested to add endpoint: type: 0, url: udp://0.0.0.0:14540@
mavros-1 | [mavros_node-1] [INFO] [1720433712.889810876] [mavros.mavros_router]: Endpoint link[1000] created
mavros-1 | [mavros_node-1] [INFO] [1720433712.890129058] [mavros.mavros_router]: link[1000] opened successfully
mavros-1 | [mavros_node-1] [INFO] [1720433712.890170654] [mavros.mavros_router]: Requested to add endpoint: type: 2, url: /uas1
mavros-1 | [mavros_node-1] [INFO] [1720433712.890180974] [mavros.mavros_router]: Endpoint link[1001] created
mavros-1 | [mavros_node-1] [INFO] [1720433712.891843787] [mavros.mavros_router]: link[1000] detected remote address 1.1
mavros-1 | [mavros_node-1] [INFO] [1720433712.893629592] [mavros.mavros_router]: link[1001] opened successfully
mavros-1 | [mavros_node-1] [INFO] [1720433712.893675159] [mavros.mavros_node]: Starting mavros uas node
mavros-1 | [mavros_node-1] [INFO] [1720433712.938457335] [mavros.mavros]: UAS Executor started, threads: 16
mavros-1 | [mavros_node-1] [INFO] [1720433712.956220131] [mavros.mavros]: Plugin actuator_control created
mavros-1 | [mavros_node-1] [INFO] [1720433712.956267995] [mavros.mavros]: Plugin actuator_control initialized
mavros-1 | [mavros_node-1] [INFO] [1720433712.961764809] [mavros.mavros]: Plugin altitude created
mavros-1 | [mavros_node-1] [INFO] [1720433712.961795788] [mavros.mavros]: Plugin altitude initialized
mavros-1 | [mavros_node-1] [INFO] [1720433712.973381695] [mavros.mavros]: Plugin command created
mavros-1 | [mavros_node-1] [INFO] [1720433712.973789053] [mavros.mavros]: Plugin command initialized
mavros-1 | [mavros_node-1] [INFO] [1720433712.985626881] [mavros.mavros]: Plugin ftp created
mavros-1 | [mavros_node-1] [INFO] [1720433712.985668425] [mavros.mavros]: Plugin ftp initialized
mavros-1 | [mavros_node-1] [INFO] [1720433712.992140907] [mavros.mavros]: Plugin geofence created
mavros-1 | [mavros_node-1] [INFO] [1720433712.992178618] [mavros.mavros]: Plugin geofence initialized
mavros-1 | [mavros_node-1] [INFO] [1720433713.001973467] [mavros.mavros]: Plugin global_position created
mavros-1 | [mavros_node-1] [INFO] [1720433713.002016889] [mavros.mavros]: Plugin global_position initialized
mavros-1 | [mavros_node-1] [INFO] [1720433713.007642496] [mavros.mavros]: Plugin home_position created
mavros-1 | [mavros_node-1] [INFO] [1720433713.007671678] [mavros.mavros]: Plugin home_position initialized
mavros-1 | [mavros_node-1] [INFO] [1720433713.014196017] [mavros.mavros]: Plugin imu created
mavros-1 | [mavros_node-1] [INFO] [1720433713.014231583] [mavros.mavros]: Plugin imu initialized
mavros-1 | [mavros_node-1] [INFO] [1720433713.025140295] [mavros.mavros]: Plugin local_position created
mavros-1 | [mavros_node-1] [INFO] [1720433713.025248583] [mavros.mavros]: Plugin local_position initialized
mavros-1 | [mavros_node-1] [INFO] [1720433713.033112738] [mavros.mavros]: Plugin manual_control created
mavros-1 | [mavros_node-1] [INFO] [1720433713.033145043] [mavros.mavros]: Plugin manual_control initialized
mavros-1 | [mavros_node-1] [INFO] [1720433713.040632839] [mavros.mavros]: Plugin nav_controller_output created
mavros-1 | [mavros_node-1] [INFO] [1720433713.040667398] [mavros.mavros]: Plugin nav_controller_output initialized
mavros-1 | [mavros_node-1] [INFO] [1720433713.050207302] [mavros.mavros]: Plugin param created
mavros-1 | [mavros_node-1] [INFO] [1720433713.050280184] [mavros.mavros]: Plugin param initialized
mavros-1 | [mavros_node-1] [INFO] [1720433713.064272491] [mavros.mavros]: Plugin rallypoint created
mavros-1 | [mavros_node-1] [INFO] [1720433713.064326027] [mavros.mavros]: Plugin rallypoint initialized
mavros-1 | [mavros_node-1] [INFO] [1720433713.075185597] [mavros.mavros]: Plugin rc_io created
mavros-1 | [mavros_node-1] [INFO] [1720433713.075237014] [mavros.mavros]: Plugin rc_io initialized
mavros-1 | [mavros_node-1] [INFO] [1720433713.084635979] [mavros.mavros]: Plugin setpoint_accel created
mavros-1 | [mavros_node-1] [INFO] [1720433713.084668065] [mavros.mavros]: Plugin setpoint_accel initialized
mavros-1 | [mavros_node-1] [INFO] [1720433713.095794907] [mavros.mavros]: Plugin setpoint_attitude created
mavros-1 | [mavros_node-1] [INFO] [1720433713.095827968] [mavros.mavros]: Plugin setpoint_attitude initialized
mavros-1 | [mavros_node-1] [INFO] [1720433713.105398039] [mavros.mavros]: Plugin setpoint_position created
mavros-1 | [mavros_node-1] [INFO] [1720433713.105484089] [mavros.mavros]: Plugin setpoint_position initialized
mavros-1 | [mavros_node-1] [INFO] [1720433713.120138527] [mavros.mavros]: Plugin setpoint_raw created
mavros-1 | [mavros_node-1] [INFO] [1720433713.120185409] [mavros.mavros]: Plugin setpoint_raw initialized
mavros-1 | [mavros_node-1] [INFO] [1720433713.132314671] [mavros.mavros]: Plugin setpoint_trajectory created
mavros-1 | [mavros_node-1] [INFO] [1720433713.132344143] [mavros.mavros]: Plugin setpoint_trajectory initialized
mavros-1 | [mavros_node-1] [INFO] [1720433713.146032651] [mavros.mavros]: Plugin setpoint_velocity created
mavros-1 | [mavros_node-1] [INFO] [1720433713.146085585] [mavros.mavros]: Plugin setpoint_velocity initialized
mavros-1 | [mavros_node-1] [INFO] [1720433713.159339820] [mavros.mavros]: Plugin sys_status created
mavros-1 | [mavros_node-1] [INFO] [1720433713.159388275] [mavros.mavros]: Plugin sys_status initialized
mavros-1 | [mavros_node-1] [INFO] [1720433713.166980548] [mavros.time]: TM: Timesync mode: MAVLINK
mavros-1 | [mavros_node-1] [INFO] [1720433713.168752737] [mavros.mavros]: Plugin sys_time created
mavros-1 | [mavros_node-1] [INFO] [1720433713.168781427] [mavros.mavros]: Plugin sys_time initialized
mavros-1 | [mavros_node-1] [INFO] [1720433713.179996954] [mavros.mavros]: Plugin waypoint created
mavros-1 | [mavros_node-1] [INFO] [1720433713.180042956] [mavros.mavros]: Plugin waypoint initialized
mavros-1 | [mavros_node-1] [INFO] [1720433713.188641283] [mavros.mavros]: Plugin wind_estimation created
mavros-1 | [mavros_node-1] [INFO] [1720433713.188676404] [mavros.mavros]: Plugin wind_estimation initialized
mavros-1 | [mavros_node-1] [INFO] [1720433713.189424663] [mavros.mavros]: Built-in SIMD instructions: SSE, SSE2
mavros-1 | [mavros_node-1] [INFO] [1720433713.189437629] [mavros.mavros]: Built-in MAVLink package version: 2024.6.6
mavros-1 | [mavros_node-1] [INFO] [1720433713.189441202] [mavros.mavros]: Known MAVLink dialects: common ardupilotmega ASLUAV AVSSUAS all csAirLink cubepilot development icarous matrixpilot paparazzi standard storm32 uAvionix ualberta
mavros-1 | [mavros_node-1] [INFO] [1720433713.189450042] [mavros.mavros]: MAVROS UAS via /uas1 started. MY ID 1.191, TARGET ID 1.1
mavros-1 | [mavros_node-1] [INFO] [1720433713.199281443] [mavros.imu]: IMU: Attitude quaternion IMU detected!
mavros-1 | [mavros_node-1] [INFO] [1720433713.203242983] [mavros.imu]: IMU: High resolution IMU detected!
mavros-1 | [mavros_node-1] [INFO] [1720433713.242647454] [mavros.mavros]: CON: Got HEARTBEAT, connected. FCU: PX4 Autopilot
mavros-1 | [mavros_node-1] [INFO] [1720433713.242733867] [mavros.mission]: WP: detected enable_partial_push: 0
mavros-1 | [mavros_node-1] [INFO] [1720433713.242846134] [mavros.mavros_router]: link[1001] detected remote address 1.191
mavros-1 | [mavros_node-1] [INFO] [1720433713.242890310] [mavros.imu]: IMU: High resolution IMU detected!
mavros-1 | [mavros_node-1] [INFO] [1720433713.258227516] [mavros.imu]: IMU: Attitude quaternion IMU detected!
mavros-1 | [mavros_node-1] [INFO] [1720433713.329696138] [mavros.mavros_router]: link[1000] detected remote address 255.190
mavros-1 | [mavros_node-1] [INFO] [1720433714.247140609] [mavros.geofence]: GF: Using MISSION_ITEM_INT
mavros-1 | [mavros_node-1] [INFO] [1720433714.247194919] [mavros.rallypoint]: RP: Using MISSION_ITEM_INT
mavros-1 | [mavros_node-1] [INFO] [1720433714.247215000] [mavros.mission]: WP: Using MISSION_ITEM_INT
mavros-1 | [mavros_node-1] [INFO] [1720433714.247230568] [mavros.sys]: VER: 1.1: Capabilities 0x000000000000e8ff
mavros-1 | [mavros_node-1] [INFO] [1720433714.247251010] [mavros.sys]: VER: 1.1: Flight software: 010f0080 (e04c53241a000000)
mavros-1 | [mavros_node-1] [INFO] [1720433714.247265326] [mavros.sys]: VER: 1.1: Middleware software: 010f0080 (e04c53241a000000)
mavros-1 | [mavros_node-1] [INFO] [1720433714.247277602] [mavros.sys]: VER: 1.1: OS software: 060800ff (d72688cba1396c88)
mavros-1 | [mavros_node-1] [INFO] [1720433714.247289068] [mavros.sys]: VER: 1.1: Board hardware: 00000001
mavros-1 | [mavros_node-1] [INFO] [1720433714.247300436] [mavros.sys]: VER: 1.1: VID/PID: 0000:0000
mavros-1 | [mavros_node-1] [INFO] [1720433714.247312877] [mavros.sys]: VER: 1.1: UID: 4954414c44494e4f
mavros-1 | [mavros_node-1] [WARN] [1720433714.251114484] [mavros.cmd]: CMD: Unexpected command 520, result 0
However, I still can't subscribe to the nodes from other docker containers.
From the mavros container I can run
$ ros2 topic echo --once /mavros/battery
header:
stamp:
sec: 1720433951
nanosec: 382872205
frame_id: ''
voltage: 15.30000114440918
temperature: 0.0
current: 1.0
charge: .nan
capacity: .nan
design_capacity: .nan
percentage: 0.5
power_supply_status: 2
power_supply_health: 0
power_supply_technology: 3
present: true
cell_voltage:
- 15.30000114440918
cell_temperature: []
location: id0
serial_number: ''
---
but this just hangs from another container. Likewise, RQT node viewer (run from another container with --net=host
) does not show anything even under `Nodes/Topics (all) mode.
$ ros2 topic echo --once /diagnostics
header:
stamp:
sec: 1720434275
nanosec: 887429415
frame_id: ''
status:
- level: "\0"
name: 'mavros_router: MAVROS Router'
message: ok
hardware_id: none
values:
- key: Endpoints
value: '2'
- key: Messages routed
value: '257960'
- key: Messages sent
value: '257960'
- key: Messages dropped
value: '0'
- level: "\0"
name: 'mavros_router: endpoint 1000: udp://0.0.0.0:14540@'
message: ok
hardware_id: none
values:
- key: Received packets
value: '48969'
- key: Dropped packets
value: '0'
- key: Buffer overruns
value: '0'
- key: Parse errors
value: '0'
- key: Rx sequence number
value: '42'
- key: Tx sequence number
value: '0'
- key: Rx total bytes
value: '14678559'
- key: Tx total bytes
value: '320782'
- key: Rx speed
value: inf
- key: Tx speed
value: inf
- key: Remotes count
value: '5'
- key: Remote [0]
value: '0.0'
- key: Remote [1]
value: '1.0'
- key: Remote [2]
value: '1.1'
- key: Remote [3]
value: '255.0'
- key: Remote [4]
value: '255.190'
- level: "\0"
name: 'mavros_router: endpoint 1001: /uas1'
message: ok
hardware_id: none
values:
- key: Remotes count
value: '3'
- key: Remote [0]
value: '0.0'
- key: Remote [1]
value: '1.0'
- key: Remote [2]
value: '1.191'
---
This issue was related to FastDDS when using localhost (see https://github.com/eProsima/Fast-DDS/issues/2956 and https://github.com/eProsima/Fast-DDS/issues/3475). Adding
ipc "host"
pid: "host"
solved this.
This is only bug and feature tracker, please use it to report bugs or request features.
Issue details
MAVROS connecting to PX4, and the correct topics are showing up when running
ros2 topic list
. However, when subscribing viaros2 topic echo
with varying QoS settings no data is printed.ros2 topic hz
similarly does not show any information either.Additional Information
ros2 topic echo --qos-reliability best_effort /mavros/battery
, nothing is displayed. However,ros2 topic info /mavros/battery
shows 1 publisher and 1 subscriberMAVROS version and platform
Mavros: 2.8.0-1noble.20240703.180528 (installed via apt) ROS: jazzy Ubuntu: 24.04
Run using docker compose.
Dockerfile.mavros
docker-compose.yml
.env
Autopilot type and version
[ ] ArduPilot [x ] PX4
Version: v1.15.0-beta1
Node logs
Diagnostics
Check ID
Mavlink status