Skip to content

DDS: Add new publisher for SITL state #32160

Open
neo-0007 wants to merge 2 commits intoArduPilot:masterfrom
neo-0007:feat/dds/sitl-state
Open

DDS: Add new publisher for SITL state #32160
neo-0007 wants to merge 2 commits intoArduPilot:masterfrom
neo-0007:feat/dds/sitl-state

Conversation

@neo-0007
Copy link
Copy Markdown
Contributor

@neo-0007 neo-0007 commented Feb 9, 2026

estimated state may not be the best for ros visualization and integration
publishing the actual state of a vehicle in SITL
data source : sitl_fdm
publishes to a ros topic : ap/sim/groundtruth
uses a custom msg defined in ardupilot_msgs/msg/GroundTruth

addresses #31995

published data example:

header:
  stamp:
    sec: 1770662102
    nanosec: 107569000
  frame_id: base_link
latitude: -35.3632625
longitude: 149.1652378
altitude: 640.57
position:
  x: 0.03631216660141945
  y: -0.04452753812074661
  z: 56.56999969482422
orientation:
  x: 5.720143008147716e-07
  y: -0.0005015750066377223
  z: -0.08593031018972397
  w: 0.9963010549545288
linear_velocity:
  x: -0.0002664405037648976
  y: -0.0038611870259046555
  z: -1.4962866306304932
angular_velocity:
  x: -0.002559196618829168
  y: -0.0018246009584869244
  z: 0.0006470874775403243
---
header:
  stamp:
    sec: 1770662102
    nanosec: 130893000
  frame_id: base_link
latitude: -35.3632625
longitude: 149.1652378
altitude: 640.54
position:
  x: 0.03631216660141945
  y: -0.04452753812074661
  z: 56.53999710083008
orientation:
  x: 1.0811620086315088e-05
  y: -0.0005204897606745362
  z: -0.08592288941144943
  w: 0.9963016510009766
linear_velocity:
  x: -0.0002848515287041664
  y: -0.003613394685089588
  z: -1.4960895776748657
angular_velocity:
  x: 0.0025319195036645203
  y: 0.0014568570358329536
  z: 0.0006169906365636676

Tested on SITL

image

Since i am exploring the ardupilot DDS interface this is my first contribution in this area , took a lot of reference from other code . So may require changes , feedback are very much appreciated. Thanks !

Comment thread libraries/AP_DDS/AP_DDS_Client.cpp Outdated
Comment thread libraries/AP_DDS/AP_DDS_Client.cpp Outdated
Comment thread libraries/AP_DDS/AP_DDS_config.h Outdated
Copy link
Copy Markdown
Contributor

@tizianofiorenzani tizianofiorenzani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comments

Signed-off-by: Hrishikesh Gohain <hrishikeshgohain123@gmail.com>
estimated state may not be the best for ros visualization and integration
publishing the actual state of a vehicle in SITL
data source : sitl_fdm
publishes to a ros topic : ap/sim/groundtruth
uses a custom msg defined in ardupilot_msgs/msg/GroundTruth

Signed-off-by: Hrishikesh Gohain <hrishikeshgohain123@gmail.com>
@neo-0007 neo-0007 force-pushed the feat/dds/sitl-state branch from 551bdc6 to 1a5d69d Compare February 10, 2026 10:27
@neo-0007
Copy link
Copy Markdown
Contributor Author

@tizianofiorenzani Thanks for the review.
I did the conversions accordingly and added comments like others for clarity .

Copy link
Copy Markdown
Contributor

@tizianofiorenzani tizianofiorenzani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Successfully merging this pull request may close these issues.

2 participants