Combine Subscriber and Publisher in Python, ROS
This article will describe an example of Combining Subscriber and Publisher in Python in ROS programming.
This is very useful in ROS development.
We will also discuss briefly how to build and modify a catkin package which is written by Python.
- Create a catkin package with the command: catkin_create_pkg, under the path: ~/catkin_ws/src
- Build it with the command: catkin_make, under the path: ~/catkin_ws/
- Source the catkin setup file under devel folder:
$ source ~/catkin_ws/devel/setup.bash
- modify the Python scripts file under the path: ~/catkin_ws/src/<pkg_name>/scripts/nodexxx.py
- chmod +x nodexxx.py
- Run this package by Command: rosrun package_name nodexxx.py
- Modify the CMakefile.txt for Python: Writin