Skip to content

Commit

Permalink
Update Gems/ROS2PoseControl/Code/Source/Clients/ROS2PoseControl.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
michalpelka authored Nov 28, 2024
1 parent 31e6502 commit 2ea2162
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Gems/ROS2PoseControl/Code/Source/Clients/ROS2PoseControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,11 @@ namespace ROS2PoseControl

// Get the transform from the PoseStamped message
AZ::Transform transform = ROS2::ROS2Conversions::FromROS2Pose(msg->pose);

if (msg->header.frame_id.empty())
{
return AZ::Success(transform);
}

// Get the transform from the global frame to the frame in the PoseStamped message
const auto globalFrameTransform = GetTF2Transform(m_odomFrameId, msg->header.frame_id.c_str());
if (!globalFrameTransform.IsSuccess())
Expand Down

0 comments on commit 2ea2162

Please sign in to comment.