Hi,
The RoadId is calculated based on the co-ordinates of the node that are mapped on the underlying road network.
Each road will have a different ID, total 25 roads in the 5x5 example, but it is expected that two nodes travelling on the same road to communicate.
The output you posted only shows 3 nodes. They may be on the same road.
I do not see anything wrong with the output.
Regards
K