June 2018
Beginner to intermediate
280 pages
6h 58m
English
In this section, we will look at how to create a sample package that contains two Python nodes. One of the nodes is used to publish a Hello World string message on a topic called /hello_pub and the other node will subscribe to this topic.
A catkin ROS package can be created using the catkin_create_pkg command in ROS.
The package is created inside the src folder that we created during the creation of the workspace. Before creating the packages, switch to the src folder using the following command:
$ cd ~/catkin_ws/src
The following command will create a hello_world package with std_msgs dependencies, which contain standard message definitions. The rospy is the Python client library for ROS:
$ catkin_create_pkg hello_world ...