Path planning is innately viewed as a multi-objective optimization problem (MOOP) of the shortest path and the smallest distance to collision-free obstacles. The position of the mobile robot is definitively identified based on data derived from constructing maps with SLAM or extracting data from camera frames. Due to the complexity of the surroundings, obstacle avoidance still requires a complex sensor system with a high processing efficiency demand. The study provides an improved RRT* algorithm for mobile robot path planning in a given environment. RRT* will optimize the number of grid nodes based on the optimal cost functions of nodes in the searching environment. The improved RRT* algorithm with a safety cost increases the efficacy of obstacle avoidance. Hence, an improved RRT* algorithm based on the traditional RRT algorithm will remove redundant path nodes. Furthermore, the third-degree B-spline curve will smooth the path while ensuring MOOPs. Last but not least, simulations and experiments are shown to demonstrate the effectiveness of the suggested strategy.