When attempting to compile and run the code, I get the following error:
[registerPublisher] Failed to contact master at [localhost:11311]. Retrying…
The ROS Core might not be started yet. Have you tried to run "ROS: Start Core" (Ctrl + Shift + P, and then type ROS Core and ENTER)?