7 #include <boost/optional.hpp> 16 int nxLibMajor = NxLibItem()[itmVersion][itmMajor].asInt();
17 int nxLibMinor = NxLibItem()[itmVersion][itmMinor].asInt();
18 return (nxLibMajor > major) || (nxLibMajor == major && nxLibMinor >= minor);
38 virtual boost::optional<double>
scaling()
const 53 virtual boost::optional<double>
far()
const 58 virtual boost::optional<double>
near()
const 68 virtual boost::optional<tf2::Transform const&>
viewPose()
const 87 , mPixelScale(pixelScale)
89 , mSizeWidth(sizeWidth)
90 , mSizeHeight(sizeHeight)
91 , mViewPose(viewPose){};
98 boost::optional<double>
scaling()
const override 113 boost::optional<tf2::Transform const&>
viewPose()
const override 133 boost::optional<double>
far()
const override 138 boost::optional<double>
near()
const override 151 paramItem[itmUseOpenGL] = params->
useOpenGl();
154 paramItem[itmPixelSize] = *params->
pixelScale();
158 paramItem[itmScaling] = *params->
scaling();
166 paramItem[itmSize][0] = *params->
sizeWidth();
170 paramItem[itmSize][1] = *params->
sizeHeight();
180 ROS_WARN_ONCE(
"This EnsensoSDK Version does not support: %s. Version used: %i.%i.%i", notSupportedMsg.c_str(),
186 std::string
const& frame)
190 if (nxLibVersion.
majorV == 2 && nxLibVersion.
minorV <= 2)
193 auto const& globalResults = NxLibItem()[itmImages];
202 std::string
const& targetFrame)
204 if (nxLibVersion.
majorV == 2 && nxLibVersion.
minorV <= 2)
207 auto const& globalResults = NxLibItem()[itmImages];
213 cmdResult[itmImages][itmRenderPointMap], targetFrame);
218 if (nxLibVersion.
majorV == 2 && nxLibVersion.
minorV <= 2)
220 return NxLibItem()[itmImages][itmRenderPointMap];
223 return cmdResult[itmImages][itmRenderPointMap];
227 std::string
const& frame)
229 sensor_msgs::ImagePtr renderedImage;
230 if (nxLibVersion.
majorV == 2 && nxLibVersion.
minorV <= 2)
233 auto const& globalResults = NxLibItem()[itmImages];
244 if (nxLibVersion.
majorV == 2 && nxLibVersion.
minorV <= 2)
247 auto globalParams = NxLibItem()[itmParameters][itmRenderPointMap];
257 cmdParams[itmFar] = *params->
far();
261 cmdParams[itmNear] = *params->
near();
void rosWarnOnceAboutDeprSDKVersion(std::string const ¬SupportedMsg, VersionInfo const &version)
boost::optional< bool > withTexture() const override
boost::optional< double > scaling() const override
virtual boost::optional< int > sizeHeight() const
sensor_msgs::ImagePtr retrieveRenderedDepthMap(NxLibItem const &cmdResult, VersionInfo const &nxLibVersion, std::string const &frame)
boost::optional< double > near() const override
RenderPointMapParams(bool _useOpenGl)
pcl::PointCloud< pcl::PointXYZ >::Ptr pointCloudFromNxLib(NxLibItem const &node, std::string const &frame, PointCloudROI const *roi=nullptr)
pcl::PointCloud< pcl::PointXYZRGB >::Ptr pointCloudTexturedFromNxLib(NxLibItem const &imageNode, NxLibItem const &pointsNode, std::string const &frame, PointCloudROI const *roi=nullptr)
virtual boost::optional< tf2::Transform const & > viewPose() const
virtual boost::optional< bool > withTexture() const
boost::optional< double > far() const override
virtual bool useOpenGl() const
void writePoseToNxLib(tf2::Transform const &pose, NxLibItem const &node)
boost::optional< int > sizeHeight() const override
bool checkNxLibVersion(int major, int minor)
virtual boost::optional< int > sizeWidth() const
#define ROS_WARN_ONCE(...)
virtual boost::optional< int > pixelScale() const
bool isValid(tf2::Transform const &pose)
pcl::PointCloud< pcl::PointXYZ >::Ptr retrieveRenderedPointCloud(NxLibItem const &cmdResult, VersionInfo const &nxLibVersion, std::string const &frame)
virtual boost::optional< double > scaling() const
boost::optional< tf2::Transform const & > viewPose() const override
sensor_msgs::ImagePtr depthImageFromNxLibNode(NxLibItem const &node, std::string const &frame)
NxLibItem retrieveResultPath(NxLibItem const &cmdResult, VersionInfo const &nxLibVersion)
void setRenderParams(NxLibItem const ¶mItem, RenderPointMapParams const *params)
boost::optional< int > pixelScale() const override
virtual boost::optional< double > far() const
RenderPointMapParamsTelecentric(bool useOpenGl, int pixelScale, double scaling, int sizeWidth, int sizeHeight, tf2::Transform const &viewPose)
pcl::PointCloud< pcl::PointXYZRGB >::Ptr retrieveTexturedPointCloud(NxLibItem const &cmdResult, VersionInfo const &nxLibVersion, std::string const &targetFrame)
RenderPointMapParamsProjection(bool useOpenGL, double far, double near, bool withTexture)
virtual boost::optional< double > near() const
boost::optional< int > sizeWidth() const override