how to execute python code in ROS
I created a python file contain the code for the robot patrol around, however, I am not sure how to run the file. I created a package name patrol inside Navigation folder using command:
catkin_create_pkg patrol rospy move_base_msgs.msg
chmod +x patrolling.py
rosrun patrol patrolling.py
The error said: cannot find the package. I am still new to ROS, so I would like to ask how do I compiled and run the code that I wrote and possibly to launch it with the rviz ? Thank you,