Attention: Answers.ros.org is deprecated as of August the 11th, 2023. Please visit robotics.stackexchange.com to ask a new question. This site will remain online in read-only mode during the transition and into the foreseeable future. Selected questions and answers have been migrated, and redirects have been put in place to direct users to the corresponding questions on Robotics Stack Exchange. Additional details are available here.
These two components do different things, and part of the confusion comes from the poor naming:
The global_planner really is a planner. Inputs are a start pose and an end pose. The output is a path.
The local_planner is really a controller (ROS2 actually properly renamed this!).The inputs are a path and the current robot pose. The output is base velocities (the controls for the base).