# A Vision-Based Approach for Autonomous Motion in Cluttered Environments
## 1 Introduction
Hard-constrained methods [49; 50; 51; 52] first represent the free space as a safe corridor consisting of cubes, spheres, or polyhedrons, and then a smooth trajectory limited to the corridor is obtained by solving convex optimization. However, these hard-constrained methods have two shortcomings: first, they have a difficult problem of time allocation, bad time allocation will lead to poor quality trajectory; second, although their solution can avoid collision with obstacles, they may be close to obstacles as the obstacle information is not in consideration. The soft-constrained method is another type of path-optimization algorithm. The soft-constrained method considers the path smoothness and safety as optimization objectives and obtains a path with the best comprehensive performance by solving the optimization problems. In References [53; 54], discrete-time trajectories are obtained by minimizing the smoothness and safety costs. In Reference [55], a continuous-time polynomial solution is obtained, which can better represent robots' motion. Reference [56] used B-spline to represent trajectory, which can reduce the number of constraints, due to B-spline being continuous by nature. The above approaches can generate safe and smooth trajectories but suffer from local minimal and low success rates. To improve the success rate, many algorithms have been proposed. In Reference [57], perception awareness is used to make the system more robust. Reference [58] used B-spline's convex hull property to improve the planning success rate. In Reference [59], a topology-guided kinodynamic planner was introduced to improve the robustness. These methods significantly improved the success rate; however, they all need a Euclidean Signed Distance Functions (ESDF) map to make the path far away from the obstacle, and the calculation of ESDF is still time-consuming. In this paper, we propose a method that can achieve real-time, safe, and smooth autonomous motion of robots and can run on platforms with limited computing power and a small load capacity. This method consists of two parts. The first is a map-building algorithm that can build an occupancy grid map of the environment in real time, using the binocular system as the sensor. The second is a motion-planning algorithm that can plan a smooth and safe path but does not need to calculate an ESDF map. A binocular system is used for the perception system due to its being lightweight and low in price. The binoculars system consists of two binocular cameras: the first is a fisheye binocular camera, which can provide the pose information of the robot, and the other is a depth binocular camera, which can represent the obstacle information of the environment as a depth image. Through the projection model and the occupancy-grid-mapping algorithm, a dense grid map of the environment can be established in real time. Then, a two-dimensional map used for robot navigation is converted from the 3D map; it can represent the collision of the robot in the three-dimensional world. Compared with perception methods that use a single binocular as sensors [58], our method is more robust and can run on platforms with weak computing power. Based on the acquired perception data, we propose a new motion-planning algorithm to generate a safe and smooth path in real time that theoretically guarantees the safety of the entire path and avoids the time-consuming building of ESDF maps. The proposed algorithm first uses the A* algorithm to find a feasible initial path and then takes the safety, smoothness, and path length of the path as optimization goals. Subsequently, a smooth, safe, and short path can be obtained by using the gradient descent method. Compared with the existing path optimization algorithms, our algorithm has two important improvements. First, we present an algorithm for the real-time calculation of ESDF value from the occupancy grid map, which avoids the time-consuming construction of the ESDF map of the environment.