Error: package 'my_examples_pkg' not found
I have a launch file that looks like this:
<launch>
<node pkg="my_examples_pkg" type="cmd_vel_publisher.py" name="cmd_vel_publisher" output="screen" />
</launch>
...and a publisher that looks like this:
#! /usr/bin/env python
import rospy
from geometry_msgs.msg import Twist
rospy.init_node('cmd_vel_publisher')
pub = rospy.Publisher('/cmd_vel', Twist, queue_size=10)
cmd = Twist()
cmd.angular.x = 0
cmd.linear.z = 0
while not rospy.is_shutdown():
pub.publish(cmd)
rospy.spin()
However, when I try to run the launch file with the following command:
roslaunch my_examples_pkg my_examples_pkg.launch
I receive the following error: [my_examples_pkg.launch] is neither a launch file in package [my_examples_pkg] nor is [my_examples_pkg] a launch file name
and when I try to run the individual python publisher file with the following:
rosrun my_examples_pkg cmd_vel_publisher.py
I receive the following error: [rospack] Error: package 'my_examples_pkg' not found
I'm new to ROS so I apologize if this is a really basic question, but its been plaguing me for a while now. Most of the resolved questions I see online direct me to do:
source devel/setup.bash
However, this doesn't resolve my issue as I still receive the errors mentioned above afterwards. Any help/insights/guidance is greatly appreciated. Thanks in advance.
Oh my gosh, I'm so embarrassed. Yes I had run catkin_make but the issue was caused by a copy paste error package.xml. Specifically, the name field was set to the incorrect value. If you would like to get credit for the answer I will mark your answer as correct! I so appreciate the help, like I said, I'm very new to ROS!