Skip to content

Added compilation of bindings for iFrameTransform #3162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions bindings/yarp.i
Original file line number Diff line number Diff line change
@@ -430,6 +430,7 @@ MAKE_COMMS(Bottle)
%include <yarp/dev/ISpeechTranscription.h>
%include <yarp/dev/ILLM.h>
%include <yarp/dev/MultipleAnalogSensorsInterfaces.h>
#include <yarp/dev/IFrameTransform.h>

#ifndef YARP_NO_DEPRECATED // Since YARP 3.5.0
%include <yarp/dev/IFrameGrabber.h>
@@ -825,6 +826,7 @@ typedef yarp::os::BufferedPort<ImageRgbFloat> BufferedPortImageRgbFloat;
CAST_POLYDRIVER_TO_INTERFACE(ISpeechSynthesizer)
CAST_POLYDRIVER_TO_INTERFACE(ISpeechTranscription)
CAST_POLYDRIVER_TO_INTERFACE(ILLM)
CAST_POLYDRIVER_TO_INTERFACE(IFrameTransform)

// These views are currently disabled in SWIG + java generator since they are
// useless without the EXTENDED_ANALOG_SENSOR_INTERFACE part.
@@ -1588,6 +1590,29 @@ typedef yarp::os::BufferedPort<ImageRgbFloat> BufferedPortImageRgbFloat;
}
}

%extend yarp::dev::IFrameTransform {
std::string allFramesAsString() {
std::string outputString;
bool ok = self->allFramesAsString(outputString);
if (!ok) return "";
return outputString;
}

std::vector<std::string> getAllFrameIds() {
std::vector<std::string> frameIds;
bool ok = self->getAllFrameIds(frameIds);
if (!ok) return std::vector<std::string>();
return frameIds;
}

std::string getParent(const std::string& frameId) {
std::string parent;
bool ok = self->getParent(frameId, parent);
if (!ok) return "unknown";
return parent;
}
}

// This is part is currently broken in SWIG + java generator since SWIG 3.0.3
// (last swig version tested: 3.0.12)
// See also https://github.com/robotology/yarp/issues/1770
4 changes: 4 additions & 0 deletions cmake/YarpFindDependencies.cmake
Original file line number Diff line number Diff line change
@@ -497,6 +497,10 @@ yarp_dependent_option(
)
yarp_renamed_option(CREATE_LIB_MATH YARP_COMPILE_libYARP_math) # Deprecated since YARP 3.2

if(NOT YARP_COMPILE_libYARP_math)
add_definitions(-DYARP_NO_MATH)
endif()

yarp_dependent_option(
YARP_COMPILE_libYARP_robotinterface "Do you want to compile the library YARP_robotinterface?" ON
"YARP_HAS_TinyXML" OFF
5 changes: 5 additions & 0 deletions src/libYARP_dev/src/yarp/dev/all.h
Original file line number Diff line number Diff line change
@@ -42,6 +42,11 @@
#include <yarp/dev/ILLM.h>
#include <yarp/dev/IChatBot.h>

#ifndef YARP_NO_MATH
#include <yarp/dev/IFrameTransform.h>
#endif // YARP_NO_MATH


#ifndef YARP_NO_DEPRECATED // since YARP 3.5
#define YARP_INCLUDING_DEPRECATED_HEADER_YARP_DEV_FRAMEGRABBER_H_ON_PURPOSE
#include <yarp/dev/IFrameGrabber.h>