Skip to content

Commit

Permalink
Fix compatibility with YARP 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro committed Feb 20, 2025
1 parent 16afd46 commit c14624e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/utils/OpenXrFrameViz/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,15 @@ int main(int argc, char** argv)
{
if (frames.find(id) == frames.end())
{
if (tfReader->canTransform(id, rootFrame->name)) //The frame has never been added and it is linked to the openxr_origin
bool canTransform = false;
#if YARP_VERSION_MAJOR == 3 && YARP_VERSION_MINOR < 11
canTransform = tfReader->canTransform(id, rootFrame->name)
#else
bool canTranformOk = false;
bool canTransformRetValue = tfReader->canTransform(id, rootFrame->name, canTranformOk);
canTransform = canTranformOk && canTransformRetValue;
#endif
if (canTransform) //The frame has never been added and it is linked to the openxr_origin
{
std::shared_ptr<FrameViewer> newFrame = std::make_shared<FrameViewer>();
newFrame->name = id;
Expand Down

0 comments on commit c14624e

Please sign in to comment.