Skip to content

Commit

Permalink
(tf2_pykdl_ros) fix convert of Twist & Wrench
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthijsBurgh committed Oct 3, 2023
1 parent 78278d4 commit 62889c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tf2_pykdl_ros/tf2_pykdl_ros/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def convert_twist(twist: TwistStamped) -> TwistStamped:
:param twist: The twist to convert.
:return: The timestamped converted PyKDL twist.
"""
return TwistStamped(kdl.Frame(twist.twist), twist.header.stamp, twist.header.frame_id)
return TwistStamped(kdl.Twist(twist.twist), twist.header.stamp, twist.header.frame_id)


tf2_ros.ConvertRegistration().add_convert((TwistStamped, TwistStamped), convert_twist)
Expand Down Expand Up @@ -297,7 +297,7 @@ def convert_wrench(wrench: WrenchStamped) -> WrenchStamped:
:param wrench: The wrench to convert.
:return: The timestamped converted PyKDL wrench.
"""
return WrenchStamped(kdl.Frame(wrench.wrench), wrench.header.stamp, wrench.header.frame_id)
return WrenchStamped(kdl.Wrench(wrench.wrench), wrench.header.stamp, wrench.header.frame_id)


tf2_ros.ConvertRegistration().add_convert((WrenchStamped, WrenchStamped), convert_wrench)
Expand Down

0 comments on commit 62889c1

Please sign in to comment.