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

AP_DDS: RC channels message #28907

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tizianofiorenzani
Copy link
Contributor

@tizianofiorenzani tizianofiorenzani commented Dec 19, 2024

Issue

#28888

What Changed

New /ap/rc DDS topic reporting the current status and values of the RC receiver.

  • is_connected: true if the radio is connected.
  • receiver_rssi: 0 to 100 if the RSSI is available.
  • channels: vector of maximum 32 pwm channels (usually 1000 to 2000).
  • active_overrides: vector reporting whether the corresponding channel is overridden by GCS or DDS.

Topic is published at 10Hz when RC is connected, 1Hz when disconnected.

Test

  • I used a MatekH743 autopilot and a FrSky X8R receiver.
  • The RSSI receiver pin is connected to the RSSI pin ADC of the Matek autopilot.
  • RSSI_ANA_PIN = 8, RSSI_PIN_HIGH = 3, RSSI_TYPE = 1.

Topic Output

With the autopilot connected through micro-ros, echo the topic with ros2 topic echo /ap/rc.

Boot with RC disconnected

header:
  stamp:
    sec: 25
    nanosec: 732212000
  frame_id: ''
is_connected: false
receiver_rssi: 0
channels: []
active_overrides: []

RC Connected

---
header:
  stamp:
    sec: 477
    nanosec: 419094000
  frame_id: ''
is_connected: true
receiver_rssi: 100
channels:
- 1495
- 1495
- 1466
- 1509
- 982
- 1495
- 1495
- 982
- 1495
- 1495
- 1495
- 1495
- 1495
- 1495
- 1495
- 1495
active_overrides:
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false

RC Disconnected

header:
  stamp:
    sec: 525
    nanosec: 182030000
  frame_id: ''
is_connected: false
receiver_rssi: 0
channels:
- 1495
- 1495
- 1466
- 1509
- 982
- 1495
- 1495
- 982
- 1495
- 1495
- 1495
- 1495
- 1495
- 1495
- 1495
- 1495
active_overrides:
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false

RC Connected and Overridden

Use Mavproxy to override RC channel 3.

header:
  stamp:
    sec: 593
    nanosec: 228105000
  frame_id: ''
is_connected: true
receiver_rssi: 95
channels:
- 1495
- 1495
- 1800
- 1509
- 982
- 1495
- 1495
- 982
- 1495
- 1495
- 1495
- 1495
- 1495
- 1495
- 1495
- 1495
active_overrides:
- false
- false
- true
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false

@Ryanf55
Copy link
Collaborator

Ryanf55 commented Dec 19, 2024

Why only 8 channels?

@tizianofiorenzani
Copy link
Contributor Author

@Ryanf55 updated and tested to a max of 32 channels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants