15 #ifndef __NERIAN_STEREO_NODE_H__ 16 #define __NERIAN_STEREO_NODE_H__ 19 #include <visiontransfer/asynctransfer.h> 20 #include <visiontransfer/reconstruct3d.h> 21 #include <sensor_msgs/PointCloud2.h> 22 #include <sensor_msgs/Image.h> 23 #include <opencv2/opencv.hpp> 27 #include <nerian_stereo/StereoCameraInfo.h> 28 #include <boost/smart_ptr.hpp> 29 #include <colorcoder.h> 31 #include <dynamic_reconfigure/server.h> 32 #include <nerian_stereo/NerianStereoConfig.h> 33 #include <visiontransfer/scenescanparameters.h> 34 #include <visiontransfer/exceptions.h> 77 void initDynamicReconfigure();
82 void prepareAsyncTransfer();
87 void processOneImagePair();
108 boost::scoped_ptr<dynamic_reconfigure::Server<nerian_stereo::NerianStereoConfig>>
dynReconfServer;
142 int lastLogFrames = 0;
147 void loadCameraCalibration();
153 void publishImageMsg(
const ImagePair& imagePair,
int imageIndex,
ros::Time stamp,
bool allowColorCode,
160 void qMatrixToRosCoords(
const float* src,
float* dst);
166 void publishPointCloudMsg(ImagePair& imagePair,
ros::Time stamp);
171 template <Po
intCloudColorMode colorMode>
void copyPointCloudIntensity(ImagePair& imagePair);
177 template <
int coord>
void copyPointCloudClamped(
float* src,
float* dst,
int size);
183 void initPointCloud();
188 void publishCameraInfo(
ros::Time stamp,
const ImagePair& imagePair);
193 template<
class T>
void readCalibrationArray(
const char* key, T& dest);
198 void dynamicReconfigureCallback(nerian_stereo::NerianStereoConfig &config, uint32_t level);
203 void updateParameterServerFromDevice(std::map<std::string, ParameterInfo>& cfg);
208 void updateDynamicReconfigureFromDevice(std::map<std::string, ParameterInfo>& cfg);
216 void autogen_dynamicReconfigureCallback(nerian_stereo::NerianStereoConfig &config, uint32_t level);
220 void autogen_updateParameterServerFromDevice(std::map<std::string, ParameterInfo>& cfg);
224 void autogen_updateDynamicReconfigureFromDevice(std::map<std::string, ParameterInfo>& cfg);
sensor_msgs::PointCloud2Ptr pointCloudMsg
boost::scoped_ptr< dynamic_reconfigure::Server< nerian_stereo::NerianStereoConfig > > dynReconfServer
boost::scoped_ptr< ColorCoder > colCoder
nerian_stereo::StereoCameraInfoPtr camInfoMsg
bool initialConfigReceived
boost::scoped_ptr< ros::Publisher > rightImagePublisher
cv::FileStorage calibStorage
cv::Mat_< cv::Vec3b > colDispMap
PointCloudColorMode pointCloudColorMode
boost::scoped_ptr< SceneScanParameters > sceneScanParameters
boost::scoped_ptr< Reconstruct3D > recon3d
ros::Time lastCamInfoPublish
boost::scoped_ptr< ros::Publisher > cloudPublisher
boost::scoped_ptr< ros::Publisher > disparityPublisher
A driver node that receives data from SceneScan/SP1 and forwards it to ROS.
boost::scoped_ptr< ros::Publisher > leftImagePublisher
std::string colorCodeDispMap
boost::scoped_ptr< ros::Publisher > cameraInfoPublisher
nerian_stereo::NerianStereoConfig lastKnownConfig
boost::scoped_ptr< AsyncTransfer > asyncTransfer