The first step is to create the controller package with all its dependencies. The following command can create a package for the controller called my_controller_pkg:
$catkin_create_pkg my_controller_pkg roscpp pluginlib
pr2_controller_interface pr2_mechanism_model
We will get the existing package from the chapter_6_codes/my_controller_pkg folder.