At present, China’s coal mine permanent tunneling support commonly uses mechanized drilling and anchoring equipment; there are low support efficiency, labor intensity, and other issues. In order to further improve the support efficiency and liberate productivity, this paper further researches the trajectory planning of the drilling and anchoring materials of the robotic arm for the drilling machine “grasping–carrying–loading–unloading” on the basis of the drilling and anchoring robotic system designed by the team in the previous stage. Firstly, the kinematic model of the robotic arm with material was established by improving the D-H parameter method. Then, the working space of the robotic arm with the material was analyzed using the Monte Carlo method. The singular bit-shaped region of the robotic arm was restricted, and obstacles were removed from the working space. The inverse kinematics was utilized to solve the feasible domain of the robotic arm with material. Secondly, in order to avoid blind searching, the guidance of the Bi-RRT algorithm was improved by adding the target guidance factor, and the two-way tree connection strategy for determining the feasible domain was combined with the Bi-RRT algorithm’s feasible domain judgment bi-directional tree connection strategy to improve the convergence speed of the Bi-RRT algorithm. Then, in order to adapt to the dynamic environment and avoid the global planning algorithm from falling into the local minima, on the basis of the above planning methods, an improved Bi-RRT trajectory planning algorithm incorporating the artificial potential field was proposed, which takes the planned paths as the guiding potential field of the artificial potential field to make full use of the global information and avoid falling into the local minimization. Finally, a simulation environment was built in a ROS environment to compare and analyze the planning effect of different algorithms. The simulation results showed that the improved Bi-RRT trajectory planning algorithm incorporating the artificial potential field improved the optimization speed by 69.8% and shortened the trajectory length by 46.6% compared with the traditional RRT algorithm.