The code for the first section, Getting started with Python and Jupyterlab, is included within the image of DexterOS, the custom operating system supplied by the manufacturer of GoPiGo3. In Chapter 1, Assembling the Robot, we explained how to get this image and burn it to an SD card. This was explained in the Quick hardware testing section in the Getting started with DexterOS sub-section.
The code for this chapter is in the GitHub repository of the book, located at https://github.com/PacktPublishing/Hands-On-ROS-for-Robotics-Programming/tree/master/Chapter2_Unit_Tests. At the beginning of the Unit testing of sensors and drives section, we explain how to clone the code locally in the Raspberry Pi.