The code files for this chapter can be found at https://github.com/PacktPublishing/Hands-On-ROS-for-Robotics-Programming/tree/master/Chapter5_Gazebo_basics.
By completing the previous chapter, you should have cloned this book's code repository into the home folder of your laptop. In case you didn't, we'll go over this now. From a Terminal on your laptop, clone the repository into your home folder, like so:
$ cd ~
$ git clone https://github.com/PacktPublishing/Hands-On-ROS-for-Robotics-Programming
Next, we copy the code for this chapter to the ROS workspace. This way, you will have a cleaner ROS environment:
$ cp -R ~/Hands-On-ROS-for-Robotics-Programming/Chapter5_Gazebo_basics ~/catkin_ws/src
This chapter contains a new ROS package called gazebo_basics, so rebuild the workspace so that it is known to your ROS environment:
$ cd ~/catkin_ws
...