Kinematic simulation of modular robot based on particle swarm optimization