I found RTI DDS and OpenDDS are capable to define nested structures and complex structure in IDL file,
but couldn't find any example for CycloneDDS on defining nested structures/ complex structures in the IDL file, does Cyclone DDS support nested structures in IDL? in the cyclones developer guide they do not mention anything about it.
It does. It is a standard OMG IDL feature and is the same across all DDS implementations.