Hi,
You can use the existing nodelets like
depth_image_proc/point_cloud_xyzrgb or
rtabmap_ros/point_cloud_xyzrgb (the difference is that the later has pre-image decimation option for faster point cloud generation if you don't need all points and voxel filtering option).
If you do a nodelet to merge the point clouds, you could put both nodelets in the same nodelet manager, so that there is just a memory copy (even just pointer copy) between the nodelets.
Otherwise, look at their code to reconstruct a point cloud from depth and rgb images.
cheers