Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dual Gimbal : identify gimbal in attitude_status topic #2004

Open
depauwjimmy opened this issue Oct 17, 2024 · 1 comment
Open

Dual Gimbal : identify gimbal in attitude_status topic #2004

depauwjimmy opened this issue Oct 17, 2024 · 1 comment

Comments

@depauwjimmy
Copy link

Issue details

I am using a dual gimbal setup on one drone with Gazebo and i need to get the attitude of each of them.
Using the topic /mavros/gimbal_control/device/attitude_status, i can see both of them but i have no way of knowing which gimbal send which message.

The q here is correct and reports the 2 different gimbals but there's no gimbal ID and the frame_id is both base_link_frd.
I actually don't understand why it's created and why gimbal attitude message reports it in it's header.
I can verify the gimbals are working properly using QGroundControl.

Also when i check the TF tree, i have a 'map' and 'map_ned' created not connected to anything that rviz2 complains about.
Again no idea what these are and why they are created.

header:
  stamp:
    sec: 1729177817
    nanosec: 384608253
  frame_id: base_link_frd
target_system: 0
target_component: 0
flags: 44
q:
  x: -0.0003480074228718877
  y: -0.3829192817211151
  z: -0.0001442534994566813
  w: 0.9237817525863647
...
---
header:
  stamp:
    sec: 1729177817
    nanosec: 692360408
  frame_id: base_link_frd
target_system: 0
target_component: 0
flags: 44
q:
  x: 0.5967311263084412
  y: -0.6707085967063904
  z: 0.11499343812465668
  w: 0.4252510070800781
...

MAVROS version and platform

Mavros: 2.9.0
ROS: humble
Ubuntu: 22

Autopilot type and version

[ X ] ArduPilot
[ ] PX4

Version: 4.6.0-dev

Node logs

I removed the lines with the plugins i ignored.

[mavros_node-1] [INFO] [1729178017.993037771] [qmavl.mavros_node]: Starting mavros_node container
[mavros_node-1] [INFO] [1729178017.993239361] [qmavl.mavros_node]: FCU URL: udp://:14550@
[mavros_node-1] [INFO] [1729178017.993268472] [qmavl.mavros_node]: GCS URL: 
[mavros_node-1] [INFO] [1729178017.993288724] [qmavl.mavros_node]: UAS Prefix: /uas1
[mavros_node-1] [INFO] [1729178017.993320660] [qmavl.mavros_node]: Starting mavros router node
[mavros_node-1] [INFO] [1729178018.013644074] [qmavl.mavros_router]: Built-in SIMD instructions: SSE, SSE2
[mavros_node-1] [INFO] [1729178018.013729815] [qmavl.mavros_router]: Built-in MAVLink package version: 2024.10.10
[mavros_node-1] [INFO] [1729178018.013782312] [qmavl.mavros_router]: Known MAVLink dialects: common ardupilotmega ASLUAV AVSSUAS all csAirLink cubepilot development icarous matrixpilot paparazzi standard storm32 uAvionix ualberta
[mavros_node-1] [INFO] [1729178018.013818463] [qmavl.mavros_router]: MAVROS Router started
[mavros_node-1] [INFO] [1729178018.013900191] [qmavl.mavros_router]: Requested to add endpoint: type: 0, url: udp://:14550@
[mavros_node-1] [INFO] [1729178018.013992491] [qmavl.mavros_router]: Endpoint link[1000] created
[mavros_node-1] [INFO] [1729178018.015027084] [qmavl.mavros_router]: link[1000] opened successfully
[mavros_node-1] [INFO] [1729178018.015294041] [qmavl.mavros_router]: Requested to add endpoint: type: 2, url: /uas1
[mavros_node-1] [INFO] [1729178018.015734139] [qmavl.mavros_router]: Endpoint link[1001] created
[mavros_node-1] [INFO] [1729178018.021012784] [qmavl.mavros_router]: link[1001] opened successfully
[mavros_node-1] [INFO] [1729178018.021215412] [qmavl.mavros_node]: Starting mavros uas node
[mavros_node-1] [INFO] [1729178018.078011235] [qmavl.mavros]: UAS Executor started, threads: 16
[mavros_node-1] [INFO] [1729178018.095302849] [qmavl.mavros]: Plugin camera created
[mavros_node-1] [INFO] [1729178018.095367607] [qmavl.mavros]: Plugin camera initialized
[mavros_node-1] [INFO] [1729178018.114695091] [qmavl.mavros]: Plugin command created
[mavros_node-1] [INFO] [1729178018.114764545] [qmavl.mavros]: Plugin command initialized
[mavros_node-1] [INFO] [1729178018.124283181] [qmavl.mavros_router]: link[1000] detected remote address 1.1
[mavros_node-1] [INFO] [1729178018.131917789] [qmavl.mavros]: Plugin gimbal_control created
[mavros_node-1] [INFO] [1729178018.132008059] [qmavl.mavros]: Plugin gimbal_control initialized
[mavros_node-1] [INFO] [1729178018.146289316] [qmavl.mavros]: Plugin global_position created
[mavros_node-1] [INFO] [1729178018.146351290] [qmavl.mavros]: Plugin global_position initialized
[mavros_node-1] [INFO] [1729178018.152989983] [qmavl.mavros]: Plugin home_position created
[mavros_node-1] [INFO] [1729178018.153043425] [qmavl.mavros]: Plugin home_position initialized
[mavros_node-1] [INFO] [1729178018.161133829] [qmavl.mavros]: Plugin imu created
[mavros_node-1] [INFO] [1729178018.161187743] [qmavl.mavros]: Plugin imu initialized
[mavros_node-1] [INFO] [1729178018.168558521] [qmavl.mavros]: Plugin local_position created
[mavros_node-1] [INFO] [1729178018.168602481] [qmavl.mavros]: Plugin local_position initialized
[mavros_node-1] [INFO] [1729178018.176400324] [qmavl.mavros]: Plugin mount_control created
[mavros_node-1] [INFO] [1729178018.176448774] [qmavl.mavros]: Plugin mount_control initialized
[mavros_node-1] [INFO] [1729178018.184147781] [qmavl.mavros]: Plugin odometry created
[mavros_node-1] [INFO] [1729178018.184199234] [qmavl.mavros]: Plugin odometry initialized
[mavros_node-1] [INFO] [1729178018.191924020] [qmavl.mavros]: Plugin rc_io created
[mavros_node-1] [INFO] [1729178018.191981429] [qmavl.mavros]: Plugin rc_io initialized
[mavros_node-1] [INFO] [1729178018.200880034] [qmavl.mavros]: Plugin setpoint_raw created
[mavros_node-1] [INFO] [1729178018.200934025] [qmavl.mavros]: Plugin setpoint_raw initialized
[mavros_node-1] [INFO] [1729178018.215863153] [qmavl.mavros]: Plugin sys_status created
[mavros_node-1] [INFO] [1729178018.215957460] [qmavl.mavros]: Plugin sys_status initialized
[mavros_node-1] [INFO] [1729178018.227510189] [qmavl.time]: TM: Timesync mode: MAVLINK
[mavros_node-1] [INFO] [1729178018.230134795] [qmavl.mavros]: Plugin sys_time created
[mavros_node-1] [INFO] [1729178018.230193414] [qmavl.mavros]: Plugin sys_time initialized
[mavros_node-1] [INFO] [1729178018.231819293] [qmavl.mavros]: Built-in SIMD instructions: SSE, SSE2
[mavros_node-1] [INFO] [1729178018.231871780] [qmavl.mavros]: Built-in MAVLink package version: 2024.10.10
[mavros_node-1] [INFO] [1729178018.231886094] [qmavl.mavros]: Known MAVLink dialects: common ardupilotmega ASLUAV AVSSUAS all csAirLink cubepilot development icarous matrixpilot paparazzi standard storm32 uAvionix ualberta
[mavros_node-1] [INFO] [1729178018.231898919] [qmavl.mavros]: MAVROS UAS via /uas1 started. MY ID 1.191, TARGET ID 1.1
[mavros_node-1] [INFO] [1729178018.416409696] [qmavl.rc]: RC_CHANNELS message detected!
[mavros_node-1] [INFO] [1729178018.417130448] [qmavl.imu]: IMU: Raw IMU message used.
[mavros_node-1] [WARN] [1729178018.417190742] [qmavl.imu]: IMU: linear acceleration on RAW_IMU known on APM only.
[mavros_node-1] [WARN] [1729178018.417199698] [qmavl.imu]: IMU: ~imu/data_raw stores unscaled raw acceleration report.
[mavros_node-1] [WARN] [1729178018.859070760] [qmavl.cmd]: CMD: Unexpected command 410, result 4
[mavros_node-1] [INFO] [1729178019.116589171] [qmavl.mavros]: CON: Got HEARTBEAT, connected. FCU: ArduPilot
[mavros_node-1] [INFO] [1729178019.207510167] [qmavl.mavros_router]: link[1001] detected remote address 1.191
[mavros_node-1] [INFO] [1729178019.358951383] [qmavl.rc]: RC_CHANNELS message detected!
[mavros_node-1] [INFO] [1729178019.360010540] [qmavl.imu]: IMU: Raw IMU message used.
[mavros_node-1] [INFO] [1729178020.124146883] [qmavl.sys]: VER: 1.1: Capabilities         0x000000000000fbef
[mavros_node-1] [INFO] [1729178020.124236522] [qmavl.sys]: VER: 1.1: Flight software:     04060000 (145cc4bb)
[mavros_node-1] [INFO] [1729178020.124267330] [qmavl.sys]: VER: 1.1: Middleware software: 00000000 (        )
[mavros_node-1] [INFO] [1729178020.124289511] [qmavl.sys]: VER: 1.1: OS software:         00000000 (        )
[mavros_node-1] [INFO] [1729178020.124316821] [qmavl.sys]: VER: 1.1: Board hardware:      00000000
[mavros_node-1] [INFO] [1729178020.124330877] [qmavl.sys]: VER: 1.1: VID/PID:             0000:0000
[mavros_node-1] [INFO] [1729178020.124343384] [qmavl.sys]: VER: 1.1: UID:                 0000000000000000
[mavros_node-1] [INFO] [1729178023.588023915] [qmavl.sys]: FCU: EKF3 IMU1 origin set
[mavros_node-1] [INFO] [1729178023.651962128] [qmavl.sys]: FCU: Field Elevation Set: 584m
[mavros_node-1] [INFO] [1729178023.815810162] [qmavl.sys]: FCU: EKF3 IMU0 origin set

Diagnostics

header:
  stamp:
    sec: 1729178444
    nanosec: 9798956
  frame_id: ''
status:
- level: "\0"
  name: 'mavros_router: MAVROS Router'
  message: ok
  hardware_id: none
  values:
  - key: Endpoints
    value: '2'
  - key: Messages routed
    value: '36933'
  - key: Messages sent
    value: '36933'
  - key: Messages dropped
    value: '0'
- level: "\0"
  name: 'mavros_router: endpoint 1000: udp://:14550@'
  message: ok
  hardware_id: none
  values:
  - key: Received packets
    value: '36049'
  - key: Dropped packets
    value: '0'
  - key: Buffer overruns
    value: '0'
  - key: Parse errors
    value: '0'
  - key: Rx sequence number
    value: '4'
  - key: Tx sequence number
    value: '0'
  - key: Rx total bytes
    value: '1289949'
  - key: Tx total bytes
    value: '17867'
  - key: Rx speed
    value: '2928.000000'
  - key: Tx speed
    value: '40.000000'
  - key: Remotes count
    value: '3'
  - key: Remote [0]
    value: '0.0'
  - key: Remote [1]
    value: '1.0'
  - key: Remote [2]
    value: '1.1'
- 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'
---
header:
  stamp:
    sec: 1729178444
    nanosec: 37763148
  frame_id: ''
status:
- level: "\0"
  name: 'mavros: MAVROS UAS'
  message: connected
  hardware_id: uas:///uas1
  values: []
- level: "\0"
  name: 'mavros: GPS'
  message: 3D fix
  hardware_id: uas:///uas1
  values:
  - key: Satellites visible
    value: '10'
  - key: Fix type
    value: '6'
  - key: EPH (m)
    value: '1.21'
  - key: EPV (m)
    value: '2.00'
- level: "\x01"
  name: 'mavros: Mount'
  message: Can not diagnose in this targeting mode
  hardware_id: uas:///uas1
  values:
  - key: Mode
    value: '255'
- level: "\0"
  name: 'mavros: System'
  message: Normal
  hardware_id: uas:///uas1
  values:
  - key: Sensor present
    value: '0x5371FC2F'
  - key: Sensor enabled
    value: '0x40619C2F'
  - key: Sensor health
    value: '0x47719C2F'
  - key: 3D gyro
    value: Ok
  - key: 3D accelerometer
    value: Ok
  - key: 3D magnetometer
    value: Ok
  - key: absolute pressure
    value: Ok
  - key: GPS
    value: Ok
  - key: 3D angular rate control
    value: Ok
  - key: attitude stabilization
    value: Ok
  - key: yaw position
    value: Ok
  - key: motor outputs / control
    value: Ok
  - key: rc receiver
    value: Ok
  - key: AHRS subsystem health
    value: Ok
  - key: Terrain subsystem health
    value: Ok
  - key: propulsion (actuator, esc, motor or propellor)
    value: Ok
  - key: CPU Load (%)
    value: '0.0'
  - key: Drop rate (%)
    value: '0.0'
  - key: Errors comm
    value: '0'
  - key: 'Errors count #1'
    value: '0'
  - key: 'Errors count #2'
    value: '0'
  - key: 'Errors count #3'
    value: '0'
  - key: 'Errors count #4'
    value: '0'
- level: "\x01"
  name: 'mavros: Battery'
  message: Low voltage
  hardware_id: uas:///uas1
  values:
  - key: Voltage
    value: '0.00'
  - key: Current
    value: '-0.0'
  - key: Remaining
    value: '-1.0'
- level: "\0"
  name: 'mavros: Heartbeat'
  message: Normal
  hardware_id: uas:///uas1
  values:
  - key: Heartbeats since startup
    value: '332'
  - key: Frequency (Hz)
    value: '0.800003'
  - key: Vehicle type
    value: Quadrotor
  - key: Autopilot type
    value: ArduPilot
  - key: Mode
    value: STABILIZE
  - key: System status
    value: STANDBY
---

Check ID

Not sure what to do using ros2 here
@depauwjimmy
Copy link
Author

Asked the same question on ardu forum : https://discuss.ardupilot.org/t/sitl-gz-ros2-dual-gimbal-camera/125264

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant