No, toddlers are not usually diagnosed with OCD (obsessive compulsive disorder). Toddlers may have developmentally-appropriate, repetitive, and ritualistic behaviors such as lining up toys and rocking back and forth, but these are not the compulsions seen in OCD. OCD usually starts in the adolescent and early adult years.
However, if you see stereotypic, repetitive behaviors that interferes with their functioning, and this is combined with developmental delays, then you may need to have your toddler assessed by their pediatrician to rule out a developmental disorder, such as autism.