ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

AP_DDS: Goal topic publisher

Open tizianofiorenzani opened this issue 1 year ago • 1 comments

Issue

https://github.com/ArduPilot/ardupilot/issues/28299

What Changed

  • New topic /ap/goal_lla to provide current goal as GeopointStamped.
  • The topic is published only when changed, reliability set to UXR_RELIABILITY_RELIABLE

Test

Automatic test

test_goal_lla_msg_received.py is a basic script that verify whether the topic has been published at least once.

Semi automatic test

Run the plane SITL

ros2 launch ardupilot_sitl sitl_dds_udp.launch.py model:=plane command:=arduplane defaults:=$(ros2 pkg prefix ardupilot_sitl)/share/ardupilot_sitl/config/models/plane.parm

and then run the test as:

ros2 run ardupilot_dds_tests plane_waypoint_follower

image

SITL

Tested in SITL: sending copter to a waypoint:

image

ros2 topic echo /ap/goal_lla image

tizianofiorenzani avatar Oct 10 '24 17:10 tizianofiorenzani

@Ryanf55 I set the topic to be published only when changed.

tizianofiorenzani avatar Oct 10 '24 20:10 tizianofiorenzani

After applying suggestions, rally point is in Absolute altitude.

image

image

tizianofiorenzani avatar Nov 15 '24 20:11 tizianofiorenzani

@peterbarker fixed, rebased and pushed

tizianofiorenzani avatar Nov 18 '24 22:11 tizianofiorenzani

Looks good. This doesn't have any of the GCS logging or sprintf problems of other PR's, so it should be safe to go in.

Ryanf55 avatar Nov 19 '24 00:11 Ryanf55