Ask Your Question

Error: package 'my_examples_pkg' not found

asked 2020-10-14 14:35:15 -0500

wynnblevins gravatar image

I have a launch file that looks like this:

    <node pkg="my_examples_pkg" type="" name="cmd_vel_publisher" output="screen" />

...and a publisher that looks like this:

#! /usr/bin/env python
import rospy
from geometry_msgs.msg import Twist

pub = rospy.Publisher('/cmd_vel', Twist, queue_size=10)
cmd = Twist()
cmd.angular.x = 0
cmd.linear.z = 0

while not rospy.is_shutdown():

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

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.

edit retag flag offensive close merge delete


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!

wynnblevins gravatar image wynnblevins  ( 2020-10-14 14:55:56 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-10-14 14:43:37 -0500

Do you have a package named my_examples_pkg? Is it in your workspace? Has it been built with catkin_make or catkin build? What is the name of the package in the package.xml and CMakeLists.txt (<name> tag and project() method respectively)?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-10-14 14:35:15 -0500

Seen: 92 times

Last updated: Oct 14 '20