Skip to content

twist cov msg translation#43

Merged
jorgenfj merged 3 commits intomainfrom
feat/twist-ros-conversion
Mar 19, 2026
Merged

twist cov msg translation#43
jorgenfj merged 3 commits intomainfrom
feat/twist-ros-conversion

Conversation

@jorgenfj
Copy link
Contributor

No description provided.

@jorgenfj jorgenfj requested a review from Andeshog March 19, 2026 19:28
@jorgenfj jorgenfj force-pushed the feat/twist-ros-conversion branch from ea3348d to e26b117 Compare March 19, 2026 19:30
@codecov
Copy link

codecov bot commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.08%. Comparing base (e37bdc8) to head (e34202e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #43   +/-   ##
=======================================
  Coverage   83.08%   83.08%           
=======================================
  Files          11       11           
  Lines        1147     1147           
  Branches      541      541           
=======================================
  Hits          953      953           
  Misses          7        7           
  Partials      187      187           
Flag Coverage Δ
unittests 83.08% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...s_ros/include/vortex/utils/ros/ros_conversions.hpp 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines +213 to +220
vortex::utils::types::Twist twist;
twist.u = twist_msg.twist.twist.linear.x;
twist.v = twist_msg.twist.twist.linear.y;
twist.w = twist_msg.twist.twist.linear.z;
twist.p = twist_msg.twist.twist.angular.x;
twist.q = twist_msg.twist.twist.angular.y;
twist.r = twist_msg.twist.twist.angular.z;
return twist;
Copy link
Contributor

Choose a reason for hiding this comment

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

Could utilize designated initializer here

inline vortex::utils::types::Twist ros_twist_cov_msg_to_twist(
    const geometry_msgs::msg::TwistWithCovarianceStamped& twist_msg) {
    const auto& t = twist_msg.twist.twist;
    return vortex::utils::types::Twist{
        .u = t.linear.x,
        .v = t.linear.y,
        .w = t.linear.z,
        .p = t.angular.x,
        .q = t.angular.y,
        .r = t.angular.z,
    };

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes boss

Comment on lines +213 to +221
const auto& t = twist_msg.twist.twist;
return vortex::utils::types::Twist{
.u = t.linear.x,
.v = t.linear.y,
.w = t.linear.z,
.p = t.angular.x,
.q = t.angular.y,
.r = t.angular.z,
};
Copy link
Contributor

Choose a reason for hiding this comment

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

copy paster spotted

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤡

@jorgenfj jorgenfj merged commit 1d860b3 into main Mar 19, 2026
4 checks passed
@jorgenfj jorgenfj deleted the feat/twist-ros-conversion branch March 19, 2026 20:30
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