Skip to content

Commit af089e0

Browse files
committed
remove rpy description
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
1 parent 4770f94 commit af089e0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

localization/pose2twist/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
This `pose2twist` calculates the velocity from the input pose history. In addition to the computed twist, this node outputs the linear-x and angular-z components as a float message to simplify debugging.
66

77
The `twist.linear.x` is calculated as `sqrt(dx * dx + dy * dy + dz * dz) / dt`, and the values in the `y` and `z` fields are zero.
8-
The `twist.angular` is calculated as `d_roll / dt`, `d_pitch / dt` and `d_yaw / dt` for each field.
8+
The `twist.angular` is calculated as `relative_rotation_vector / dt` for each field.
99

1010
## Inputs / Outputs
1111

localization/pose2twist/src/pose2twist_core.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ geometry_msgs::msg::TwistStamped calc_twist(
6969
const auto pose_b_quaternion = get_quaternion(pose_b);
7070

7171
geometry_msgs::msg::Vector3 diff_xyz;
72-
const geometry_msgs::msg::Vector3 diff_rpy =
72+
const geometry_msgs::msg::Vector3 relative_rotation_vector =
7373
compute_relative_rotation_vector(pose_a_quaternion, pose_b_quaternion);
7474

7575
diff_xyz.x = pose_b->pose.position.x - pose_a->pose.position.x;
@@ -83,9 +83,9 @@ geometry_msgs::msg::TwistStamped calc_twist(
8383
dt;
8484
twist.twist.linear.y = 0;
8585
twist.twist.linear.z = 0;
86-
twist.twist.angular.x = diff_rpy.x / dt;
87-
twist.twist.angular.y = diff_rpy.y / dt;
88-
twist.twist.angular.z = diff_rpy.z / dt;
86+
twist.twist.angular.x = relative_rotation_vector.x / dt;
87+
twist.twist.angular.y = relative_rotation_vector.y / dt;
88+
twist.twist.angular.z = relative_rotation_vector.z / dt;
8989

9090
return twist;
9191
}

0 commit comments

Comments
 (0)