Follow the guide here to install segment anything and its Ros2 Wrapper into the src file https://github.com/ros-ai/ros2_sam