-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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: Goal topic publisher #28372
base: master
Are you sure you want to change the base?
AP_DDS: Goal topic publisher #28372
Conversation
@Ryanf55 I set the topic to be published only when changed. |
Tools/ros2/ardupilot_dds_tests/test/ardupilot_dds_tests/test_goal_lla_msg_received.py
Outdated
Show resolved
Hide resolved
Tools/ros2/ardupilot_dds_tests/test/ardupilot_dds_tests/test_goal_lla_msg_received.py
Show resolved
Hide resolved
libraries/AP_DDS/AP_DDS_Client.cpp
Outdated
msg.position.altitude = target_loc.alt * alt_scale_factor; | ||
|
||
// Check whether the goal has changed or if the topic has never been published. | ||
const double distance_lat_lon = 1e-8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did you pick this value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all goals are usually sent at 1e-7 resolution, so this is one order of magnitude better that AP can resolve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's resolution on the lat-lon value, but this is in meters, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, it's degrees. Lat Lon are sent in any mavlink message to 1e-7 resolution. I don't think it's necessary to convert to meters here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rename the variable then? Distance is measured in meters
, or add some more comment.
Perhaps goal_tol_lat_lon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed to tolerance_lat_lon
, good call.
4a30ee6
to
41fdc63
Compare
41fdc63
to
9cf28dc
Compare
Issue
#28299
What Changed
/ap/goal_lla
to provide current goal asGeopointStamped
.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
and then run the test as:
SITL
Tested in SITL: sending copter to a waypoint:
ros2 topic echo /ap/goal_lla