In this paper, we proposed a spherical robot with two motors in the horizontal and vertical directions which derive the robot to do omni-directionally roll. Based on the structure of the robot, we derived the kinematic model using inertial and moving coordinate system. In order to minimize the energy of the system, an optimization problem with two optimization variables which are the parameters to control the angular velocity of the motors is given. After that, a particle swarm optimization (PSO) algorithm is used to solve the optimization problem. The simulation shows that the motion planning with the algorithm has high precision.