Create Custom ROS Package - Example_01
Create/Initialize Workspace
$ mkdir messi_ws
$ cd messi_ws
$ mkdir src
$ cd src/
$ catkin_init_workspace
$ cd ..
$ catkin_make
$ source ./devel/setup.bash
$ cd src/
$ catkin_create_pkg messi_turtle_pkg rospy geometry_msgs
Create scripts and the python file
$ cd messi_turtle_pkg/
$ mkdir scripts
$ cd scripts
$ touch move_turtelsim.py; chmod +x *
$ rosrun turtlesim turtlesim_node
Run our node messi_turtle_pkg
$ rosrun messi_turtle_pkg move_turtelsim.py
$ rosrun rqt_graph rqt_graph
Create Custom ROS Package - Example_02
$ rosrun turtlesim publisher.py
$ rosrun messi_turtle_pkg subscriber.py
$ rosrun rqt_graph rqt_graph
Create Custom ROS Package - User Input - Example_03
$ rosrun turtlesim turtlesim_node
Run our node messi_turtle_pkg
$ rosrun messi_turtle_pkg input_user.py
$ rosrun rqt_graph rqt_graph
Create publisher and subscriber to count from 0 until the user uses CTRL C - Example_04
Run our node messi_turtle_pkg publisher_counter
$ rosrun messi_turtle_pkg publisher_counter.py
Run our node messi_turtle_pkg subscriber
$ rosrun messi_turtle_pkg subscriber.py
$ rosrun rqt_graph rqt_graph
Create publisher and subscriber to generate a random complex number - Example_05
Run our node messi_turtle_pkg publisher_complex_number
$ rosrun messi_turtle_pkg publisher_complex_number.py
Run our node messi_turtle_pkg subscriber
$ rosrun messi_turtle_pkg subscriber.py
$ rosrun rqt_graph rqt_graph
Create Custom Message - Example_06
Run our node test_pkg mypublisher.py --> which exists in workspace other_ws
$ rosrun test_pkg mypublisher.py
Run our node test_pkg mysubscriber.py --> which exists in workspace other_ws
$ rosrun test_pkg mysubscriber.py
$ rosrun rqt_graph rqt_graph
Create Custom Service - Words Counter - Example_07
Run our node test_pkg count_words_server.py --> which exists in workspace other_ws
$ rosrun test_pkg count_words_server.py
Run our node test_pkg count_words_client.py --> which exists in workspace other_ws
$ rosrun test_pkg count_words_client.py <text>
$ rosrun rqt_graph rqt_graph
Create Custom Service - Adding Two Numbers - Example_08
Run our node test_pkg add_two_numbers_server.py --> which exists in workspace other_ws
$ rosrun test_pkg count_words_server.py
Run our node test_pkg add_two_numbers_server.py --> which exists in workspace other_ws
$ rosrun test_pkg add_two_numbers_client.py <num1> <num2>
$ rosrun rqt_graph rqt_graph
Create ROSLaunch File - Example_09
Run our ROSLaunch_file in test_pkg --> which exists in workspace other_ws
$ roslaunch test_pkg world.launch
$ rosrun rqt_graph rqt_graph