I recommend autoware's node link
It does what you want. Make sure you have connected tree of frames. You should configure both of your velodyne driver nodes to provide separate unique frame id (e.g. frame_id velodyne1, velodyne2). You should also provide transformation between frames of velodyne1 sensor and velodyne2 sensor. Usually it can be base_link frame (some point on your robot which you can use to measure relative distance in 3d to your sensors) and two static transforms from velodyne1 frame to base_link and velodyne2 frame to base_link. Then target output frame for your merged cloud should be base_link.
So merging points properly can be done only when you know relative distance between lidars. Because point coordinates in point cloud are provided relative to lidar physical center (velodyne frame_id). You have to transform coordinates in point clouds before merging them.
Here an example of two lidars separated on distance 4 meters by x axis with base_link point between them.
<node pkg="tf2_ros" type="static_transform_publisher" name="velodyne1TF" args="2.0 0.0 0.0 0.0 0.0 0.0 base_link velodyne" />
<node pkg="tf2_ros" type="static_transform_publisher" name="velodyne2TF" args="-2.0 0.0 0.0 0.0 0.0 0.0 base_link velodyne" />