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: /ap/cmd_vel accepts body-frame messages #24734

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

pedro-fuoco
Copy link
Contributor

@pedro-fuoco pedro-fuoco commented Aug 23, 2023

The aim of this PR is for /ap/cmd_vel to be able to receive body frame messages with the base_link frame_id.
This check is performed first as this should be the most common use case for aerial vehicles per ROS REP 147

@pedro-fuoco pedro-fuoco requested a review from Ryanf55 August 23, 2023 01:03
@pedro-fuoco pedro-fuoco changed the title AP_DDS: /ap/cmd_vel accepts Twist and Body frame AP_DDS: /ap/cmd_vel accepts Body frame messages Sep 4, 2023
@pedro-fuoco
Copy link
Contributor Author

Should body-frame be "default" ?
Since it is backed up by ROS REP 147 I think we could assume that a message that doesn't have a frame_id is body frame.
@Ryanf55

@pedro-fuoco
Copy link
Contributor Author

Should body-frame be "default" ? Since it is backed up by ROS REP 147 I think we could assume that a message that doesn't have a frame_id is body frame. @Ryanf55

We discussed over discord and it is probably best not to do so. ROS packages performing control should provide the frame_id to be ROS compliant. This also forces users to be conscious about the frame they are using beforehand

@Ryanf55
Copy link
Collaborator

Ryanf55 commented Sep 4, 2023

Should body-frame be "default" ? Since it is backed up by ROS REP 147 I think we could assume that a message that doesn't have a frame_id is body frame. @Ryanf55

I'm hesitant to make assumptions unless we actually need to ( if we had to use Twist without the stamp). Since nav2 sets the frame ID, let's enforce it.

@pedro-fuoco pedro-fuoco force-pushed the body-frame-temporary branch 2 times, most recently from e374f68 to 0dd6c7c Compare September 4, 2023 02:02
@pedro-fuoco
Copy link
Contributor Author

Tested both with both of the possible frame_ids.
For map, I used the following ROS 2 CLI command:

ros2 topic pub /ap/cmd_vel geometry_msgs/msg/TwistStamped '{header: {frame_id: "map"}, twist: {linear: {y: 1}}}

For base_link, I used this:

ros2 topic pub /ap/cmd_vel geometry_msgs/msg/TwistStamped '{header: {frame_id: "base_link"}, twist: {linear: {x: 1}}}'

Both worked as expected.

@pedro-fuoco pedro-fuoco changed the title AP_DDS: /ap/cmd_vel accepts Body frame messages AP_DDS: /ap/cmd_vel accepts body-frame messages Sep 4, 2023
@Ryanf55 Ryanf55 added ROS For-4.5 Planned for 4.5 release MergeOnCIPass labels Sep 4, 2023
@peterbarker peterbarker merged commit 62b15a8 into ArduPilot:master Sep 6, 2023
85 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For-4.5 Planned for 4.5 release ROS
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants