ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Hi,
Unfortunatly, since this feature is quite new, there is no existing node yet that can distort the depth image using the distortion model.
You may create one by subscribing to depth image and loading the *.bin generated by the standalone.
#include "rtabmap/core/clams/discrete_depth_distortion_model.h"
clams::DiscreteDepthDistortionModel model;
void init(const std::string & modelPath) {
model.load(modelPath);
if(!model.isValid())
{
ROS_ERROR("Loaded distortion model \"%s\" is not valid!", modelPath.c_str());
}
}
void callback(...) {
cv::Mat depth = //... (cv_bridge subscription to depth msg)
model.undistort(depth);
// ... republish the depth undistorted
}
cheers
2 | No.2 Revision |
EDIT: there is already a nodelet existing in rtabmap_ros source doing the work below, see this link.
Hi,
Unfortunatly, since this feature is quite new, there is no existing node yet that can distort the depth image using the distortion model.
You may create one by subscribing to depth image and loading the *.bin generated by the standalone.
#include "rtabmap/core/clams/discrete_depth_distortion_model.h"
clams::DiscreteDepthDistortionModel model;
void init(const std::string & modelPath) {
model.load(modelPath);
if(!model.isValid())
{
ROS_ERROR("Loaded distortion model \"%s\" is not valid!", modelPath.c_str());
}
}
void callback(...) {
cv::Mat depth = //... (cv_bridge subscription to depth msg)
model.undistort(depth);
// ... republish the depth undistorted
}
cheers