A simple node that receives data from the SP1 stereo vision system and forwards it to ROS. More...
Public Member Functions | |
void | init () |
Performs general initializations. More... | |
int | run () |
The main loop of this node. More... | |
Sp1Node () | |
~Sp1Node () | |
Private Member Functions | |
template<int coord> | |
void | copyPointCloudClamped (float *src, float *dst, int size) |
Copies all points in a point cloud that have a depth smaller than maxDepth. Other points are set to NaN. More... | |
void | initPointCloud () |
Performs all neccessary initializations for point cloud+ publishing. More... | |
void | loadCameraCalibration () |
Loads a camera calibration file if configured. More... | |
void | publishCameraInfo (ros::Time stamp, const ImagePair &imagePair) |
Publishes the camera info once per second. More... | |
void | publishDispMapMsg (const ImagePair &imagePair, ros::Time stamp) |
Publishes the disparity map as 16-bit grayscale image or color coded RGB image. More... | |
void | publishImageMsg (const ImagePair &imagePair, ros::Time stamp) |
Publishes a rectified left camera image. More... | |
void | publishPointCloudMsg (ImagePair &imagePair, ros::Time stamp) |
Reconstructs the 3D locations form the disparity map and publishes them as point cloud. More... | |
void | qMatrixToRosCoords (const float *src, float *dst) |
Transform Q matrix to match the ROS coordinate system: Swap y/z axis, then swap x/y axis, then invert y and z axis. More... | |
template<class T > | |
void | readCalibrationArray (const char *key, T &dest) |
Reads a vector from the calibration file to a boost:array. More... | |
Private Attributes | |
std::string | calibFile |
cv::FileStorage | calibStorage |
boost::scoped_ptr< ros::Publisher > | cameraInfoPublisher |
nerian_sp1::StereoCameraInfoPtr | camInfoMsg |
boost::scoped_ptr< ros::Publisher > | cloudPublisher |
boost::scoped_ptr< ColorCoder > | colCoder |
cv::Mat_< cv::Vec3b > | colDispMap |
bool | colorCodeDispMap |
bool | colorCodeLegend |
boost::scoped_ptr< ros::Publisher > | disparityPublisher |
double | execDelay |
std::string | frame |
int | frameNum |
bool | intensityChannel |
ros::Time | lastCamInfoPublish |
boost::scoped_ptr< ros::Publisher > | leftImagePublisher |
std::string | localHost |
std::string | localPort |
double | maxDepth |
ros::NodeHandle | nh |
sensor_msgs::PointCloud2Ptr | pointCloudMsg |
boost::scoped_ptr< Reconstruct3D > | recon3d |
std::string | remoteHost |
std::string | remotePort |
boost::scoped_ptr< ros::Publisher > | rightImagePublisher |
bool | rosCoordinateSystem |
bool | useTcp |
A simple node that receives data from the SP1 stereo vision system and forwards it to ROS.
The SP1 stereo vision system is a stand-alone device for real-time stereo matching. It transmits its processing results through gigagibt ethernet which are then received by this node. The node converts the received data into ROS messages, which contain the following data:
In addition, camera calibration information are also published. For configuration parameters, please see the provided example launch file. For more information about the SP1 stereo vision system, please visit http://nerian.com/products/sp1-stereo-vision/
Definition at line 49 of file nerian_sp1_node.cpp.
|
inline |
Definition at line 51 of file nerian_sp1_node.cpp.
|
inline |
Definition at line 54 of file nerian_sp1_node.cpp.
|
inlineprivate |
Copies all points in a point cloud that have a depth smaller than maxDepth. Other points are set to NaN.
Definition at line 425 of file nerian_sp1_node.cpp.
|
inline |
Performs general initializations.
Definition at line 60 of file nerian_sp1_node.cpp.
|
inlineprivate |
Performs all neccessary initializations for point cloud+ publishing.
Definition at line 445 of file nerian_sp1_node.cpp.
|
inlineprivate |
Loads a camera calibration file if configured.
Definition at line 231 of file nerian_sp1_node.cpp.
|
inlineprivate |
Publishes the camera info once per second.
Definition at line 489 of file nerian_sp1_node.cpp.
|
inlineprivate |
Publishes the disparity map as 16-bit grayscale image or color coded RGB image.
Definition at line 272 of file nerian_sp1_node.cpp.
|
inlineprivate |
Publishes a rectified left camera image.
Definition at line 253 of file nerian_sp1_node.cpp.
|
inlineprivate |
Reconstructs the 3D locations form the disparity map and publishes them as point cloud.
Definition at line 338 of file nerian_sp1_node.cpp.
|
inlineprivate |
Transform Q matrix to match the ROS coordinate system: Swap y/z axis, then swap x/y axis, then invert y and z axis.
Definition at line 320 of file nerian_sp1_node.cpp.
|
inlineprivate |
Reads a vector from the calibration file to a boost:array.
Definition at line 566 of file nerian_sp1_node.cpp.
|
inline |
The main loop of this node.
Definition at line 138 of file nerian_sp1_node.cpp.
|
private |
Definition at line 214 of file nerian_sp1_node.cpp.
|
private |
Definition at line 224 of file nerian_sp1_node.cpp.
|
private |
Definition at line 201 of file nerian_sp1_node.cpp.
|
private |
Definition at line 225 of file nerian_sp1_node.cpp.
|
private |
Definition at line 197 of file nerian_sp1_node.cpp.
|
private |
Definition at line 221 of file nerian_sp1_node.cpp.
|
private |
Definition at line 222 of file nerian_sp1_node.cpp.
|
private |
Definition at line 206 of file nerian_sp1_node.cpp.
|
private |
Definition at line 207 of file nerian_sp1_node.cpp.
|
private |
Definition at line 198 of file nerian_sp1_node.cpp.
|
private |
Definition at line 215 of file nerian_sp1_node.cpp.
|
private |
Definition at line 211 of file nerian_sp1_node.cpp.
|
private |
Definition at line 219 of file nerian_sp1_node.cpp.
|
private |
Definition at line 204 of file nerian_sp1_node.cpp.
|
private |
Definition at line 226 of file nerian_sp1_node.cpp.
|
private |
Definition at line 199 of file nerian_sp1_node.cpp.
|
private |
Definition at line 213 of file nerian_sp1_node.cpp.
|
private |
Definition at line 210 of file nerian_sp1_node.cpp.
|
private |
Definition at line 216 of file nerian_sp1_node.cpp.
|
private |
Definition at line 196 of file nerian_sp1_node.cpp.
|
private |
Definition at line 223 of file nerian_sp1_node.cpp.
|
private |
Definition at line 220 of file nerian_sp1_node.cpp.
|
private |
Definition at line 212 of file nerian_sp1_node.cpp.
|
private |
Definition at line 209 of file nerian_sp1_node.cpp.
|
private |
Definition at line 200 of file nerian_sp1_node.cpp.
|
private |
Definition at line 208 of file nerian_sp1_node.cpp.
|
private |
Definition at line 205 of file nerian_sp1_node.cpp.