Designed for planetary exploration,a spherical mobile robot BHQ-1 was briefly introduced.The mo-tion model of BHQ-1 was established and quasi-velocities were introduced to simplify some dynamic quan-tities.Based on the model,the time- and energy-based optimal trajectory of BHQ-1 was planned withHamiltonian function. The effects of three key coefficients on the shape and direction of the planned tra-jectory were discussed by simulations.Experimental result of the robot ability in avoiding an obstacle waspresented to validate the trajectory planning method.