15 #ifndef __NERIAN_STEREO_NODE_H__ 16 #define __NERIAN_STEREO_NODE_H__ 20 #include <boost/smart_ptr.hpp> 22 #include <visiontransfer/asynctransfer.h> 23 #include <visiontransfer/reconstruct3d.h> 24 #include <visiontransfer/deviceparameters.h> 25 #include <visiontransfer/exceptions.h> 26 #include <visiontransfer/datachannelservice.h> 29 #include <sensor_msgs/PointCloud2.h> 30 #include <sensor_msgs/Image.h> 31 #include <dynamic_reconfigure/server.h> 35 #include <geometry_msgs/TransformStamped.h> 38 #include <opencv2/opencv.hpp> 40 #include <colorcoder.h> 42 #include <nerian_stereo/NerianStereoConfig.h> 43 #include <nerian_stereo/StereoCameraInfo.h> 44 #include <visiontransfer/deviceparameters.h> 45 #include <visiontransfer/exceptions.h> 88 void initDynamicReconfigure();
93 void initDataChannelService();
98 void prepareAsyncTransfer();
103 void processOneImageSet();
108 void processDataChannels();
113 void publishTransform();
136 boost::scoped_ptr<dynamic_reconfigure::Server<nerian_stereo::NerianStereoConfig>>
dynReconfServer;
171 int lastLogFrames = 0;
181 void loadCameraCalibration();
187 void publishImageMsg(
const ImageSet& imageSet,
int imageIndex,
ros::Time stamp,
bool allowColorCode,
194 void qMatrixToRosCoords(
const float* src,
float* dst);
200 void publishPointCloudMsg(ImageSet& imageSet,
ros::Time stamp);
205 template <Po
intCloudColorMode colorMode>
void copyPointCloudIntensity(ImageSet& imageSet);
211 template <
int coord>
void copyPointCloudClamped(
float* src,
float* dst,
int size);
217 void initPointCloud();
222 void publishCameraInfo(
ros::Time stamp,
const ImageSet& imageSet);
227 template<
class T>
void readCalibrationArray(
const char* key, T& dest);
232 void dynamicReconfigureCallback(nerian_stereo::NerianStereoConfig &config, uint32_t level);
237 void updateParameterServerFromDevice(std::map<std::string, ParameterInfo>& cfg);
242 void updateDynamicReconfigureFromDevice(std::map<std::string, ParameterInfo>& cfg);
250 void autogen_dynamicReconfigureCallback(nerian_stereo::NerianStereoConfig &config, uint32_t level);
254 void autogen_updateParameterServerFromDevice(std::map<std::string, ParameterInfo>& cfg);
258 void autogen_updateDynamicReconfigureFromDevice(std::map<std::string, ParameterInfo>& cfg);
std::string internalFrame
sensor_msgs::PointCloud2Ptr pointCloudMsg
boost::scoped_ptr< dynamic_reconfigure::Server< nerian_stereo::NerianStereoConfig > > dynReconfServer
boost::scoped_ptr< ColorCoder > colCoder
boost::scoped_ptr< DataChannelService > dataChannelService
nerian_stereo::StereoCameraInfoPtr camInfoMsg
bool initialConfigReceived
boost::scoped_ptr< ros::Publisher > rightImagePublisher
cv::FileStorage calibStorage
geometry_msgs::TransformStamped currentTransform
cv::Mat_< cv::Vec3b > colDispMap
PointCloudColorMode pointCloudColorMode
boost::scoped_ptr< Reconstruct3D > recon3d
ros::Time lastCamInfoPublish
boost::scoped_ptr< ros::Publisher > cloudPublisher
boost::scoped_ptr< ros::Publisher > disparityPublisher
boost::scoped_ptr< tf2_ros::TransformBroadcaster > transformBroadcaster
A driver node that receives data from Nerian stereo devices and forwards it to ROS.
boost::scoped_ptr< ros::Publisher > leftImagePublisher
boost::scoped_ptr< DeviceParameters > deviceParameters
std::string colorCodeDispMap
boost::scoped_ptr< ros::Publisher > cameraInfoPublisher
nerian_stereo::NerianStereoConfig lastKnownConfig
boost::scoped_ptr< AsyncTransfer > asyncTransfer