Distributed, dynamic, and autonomous reconfiguration planning for chain-type self-reconfigurable robots