I am working on exercise 2.2 and to complete the exercise I have done the following:
created a package using the command catkin_create_pkg print_odometery rospy within catkin_ws/src
made new directory called launch and created a file called odometery.launch with the appropriate elements and
within the src folder of the package created a file called print_odometery.py with the following code:
#! /usr/bin/env/ python
from nav_msgs.msg import Odometery
sub = rospy.Subscriber(’/odom’, Odometery, callback)
I next executed the command roscd and then cd …/ to get to the directory catkin_ws and ran the command catkin_make --only-pkg-with-deps print_odometery and the build was successful.
When I attempt to do a roslaunch print_odometery odometery.launch an error is thrown:
unable to launch [/home/user/catkin_ws/src/print_odometery/src/print_odometery.py __name:=print_odometery __log:=/home/user/.ros/log/2a35627e-62a3-11ea-8229-021d58f227a9/print_odometery-1.log]: Not a directory
I did make sure the file print_odometery was executable with the command chmod +x /path/to/python_file however, the same error continues. I was able to obtain a print out of the log that provided a more detailed description of the error and can provide it if needed. My question is How do I resolve the error and what is causing the error?