fix(discut): fix discut boost & add ros disparity_type_
This commit is contained in:
parent
7dabf5cc9d
commit
8b5c886b78
|
@ -15,7 +15,7 @@
|
|||
#define SRC_MYNTEYE_API_CAMODOCAL_INCLUDE_CAMODOCAL_CAMERA_MODELS_CAMERA_H_
|
||||
|
||||
#include <vector>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <memory>
|
||||
#include "eigen3/Eigen/Dense"
|
||||
#include <opencv2/core/core.hpp>
|
||||
|
||||
|
@ -130,8 +130,8 @@ class Camera {
|
|||
cv::Mat m_mask;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<Camera> CameraPtr;
|
||||
typedef boost::shared_ptr<const Camera> CameraConstPtr;
|
||||
typedef std::shared_ptr<Camera> CameraPtr;
|
||||
typedef std::shared_ptr<const Camera> CameraConstPtr;
|
||||
}
|
||||
|
||||
#endif // SRC_MYNTEYE_API_CAMODOCAL_INCLUDE_CAMODOCAL_CAMERA_MODELS_CAMERA_H_
|
||||
|
|
|
@ -166,8 +166,8 @@ class EquidistantCamera : public Camera {
|
|||
double m_inv_K11, m_inv_K13, m_inv_K22, m_inv_K23;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<EquidistantCamera> EquidistantCameraPtr;
|
||||
typedef boost::shared_ptr<const EquidistantCamera> EquidistantCameraConstPtr;
|
||||
typedef std::shared_ptr<EquidistantCamera> EquidistantCameraPtr;
|
||||
typedef std::shared_ptr<const EquidistantCamera> EquidistantCameraConstPtr;
|
||||
|
||||
template <typename T>
|
||||
T EquidistantCamera::r(T k2, T k3, T k4, T k5, T theta) {
|
||||
|
|
|
@ -56,6 +56,11 @@
|
|||
|
||||
<arg name="request_index" default="$(arg index_s2_2)" />
|
||||
|
||||
<!-- disparity computing method type -->
|
||||
<arg name="sgbm" default="0" />
|
||||
<arg name="bm" default="1" />
|
||||
<arg name="disparity_computing_method" default="$(arg sgbm)" />
|
||||
|
||||
<arg name="enable_left_rect" default="false" />
|
||||
<arg name="enable_right_rect" default="false" />
|
||||
<arg name="enable_disparity" default="false" />
|
||||
|
@ -242,6 +247,8 @@
|
|||
|
||||
<param name="gravity" value="$(arg gravity)" />
|
||||
|
||||
<param name="disparity_computing_method" value="$(arg disparity_computing_method)" />
|
||||
|
||||
<!-- stream toggles -->
|
||||
|
||||
<param name="enable_left_rect" value="$(arg enable_left_rect)" />
|
||||
|
|
|
@ -226,6 +226,12 @@ class ROSWrapperNodelet : public nodelet::Nodelet {
|
|||
gravity_ = 9.8;
|
||||
private_nh_.getParam("gravity", gravity_);
|
||||
|
||||
int tmp_disparity_type_ = 0;
|
||||
disparity_type_ = DisparityComputingMethod::BM;
|
||||
private_nh_.getParam("disparity_computing_method", tmp_disparity_type_);
|
||||
disparity_type_ = (DisparityComputingMethod)tmp_disparity_type_;
|
||||
api_->SetDisparityComputingMethodType(disparity_type_);
|
||||
|
||||
// device options of standard210a
|
||||
if (model_ == Model::STANDARD210A) {
|
||||
option_names_ = {
|
||||
|
@ -1317,6 +1323,8 @@ class ROSWrapperNodelet : public nodelet::Nodelet {
|
|||
|
||||
double gravity_;
|
||||
|
||||
// disparity type
|
||||
DisparityComputingMethod disparity_type_;
|
||||
// api
|
||||
|
||||
std::shared_ptr<API> api_;
|
||||
|
|
Loading…
Reference in New Issue
Block a user