ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

package not found - ROS PCL Tutorial

asked 2016-09-22 14:14:19 -0600

anonymous user

Anonymous

Hey, I am new to ROS and want to work with pointclouds. I did exactly the ROS PCL tutorial as written in http://wiki.ros.org/pcl/Tutorials

CMakeLists in ~/catkin_ws/src/my_pcl_tutorial:

cmake_minimum_required(VERSION 2.8.3)
project(my_pcl_tutorial)
find_package(catkin REQUIRED COMPONENTS
  pcl_conversions
  pcl_ros
  roscpp
  sensor_msgs
)

include_directories(
  ${catkin_INCLUDE_DIRS}
)

add_executable(example src/example.cpp)
target_link_libraries(example ${catkin_LIBRARIES})

package.xml:

  <?xml version="1.0"?>
  <package>
  <name>my_pcl_tutorial</name>
  <version>0.0.0</version>
  <description>The my_pcl_tutorial package</description>

  <maintainer email="viki@todo.todo">viki</maintainer>

  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>pcl_conversions</build_depend>
  <build_depend>pcl_ros</build_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>sensor_msgs</build_depend>
  <build_depend>libpcl-all-dev</build_depend>
  <run_depend>libpcl-all</run_depend>
  <run_depend>pcl_conversions</run_depend>
  <run_depend>pcl_ros</run_depend>
  <run_depend>roscpp</run_depend>
  <run_depend>sensor_msgs</run_depend>
  <export>
  </export>
</package>

, but it does not seem to incorporate the package:

rosrun error:

rosrun my_pcl_tutorial example input:=/narrow_stereo_textured/points2
[rospack] Error: package 'my_pcl_tutorial' not found

Version: Indigo 1.11.8, but it does not work on jade either. I did all the previous standard ROS tutorials, but dumpster beginner mistakes likely happened. Any help is appreciated.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2016-09-23 01:41:25 -0600

anonymous user

Anonymous

updated 2016-10-11 01:04:58 -0600

Well, after a few minutes of doing nothing regarding ROS at all, it apparently finds the package now. Sorry, but I have no idea why it is working after the delay.

Command line history:

784  catkin_make
  785  cd ~/catkin_ws/
  786  roscore
  787  source devel/setup.bash 
  788  roscore
  789  rosrun my_pcl_tutorial example input:=/narrow_stereo_textured/points2  ##did not work here##
  790  cd ~/catkin_ws/
  791  source devel/setup.bash 
  792  printenv | grep ROS
  793  cd devel
  794  ls -a
  795  cd include/
  796  ls -a
  797  cd ..
  798  cd src
  799  ls -a
  800  cd ..
  801  printenv | grep ROS
  802  rospack find my_pcl_tutorial 
  803  roscore
  804  cd ~/catkin_ws/
  805  rosrun my_pcl_tutorial example input:=/narrow_stereo_textured/points2 ##works
edit flag offensive delete link more

Comments

This is the solution, I just can not accept it as I do not have enough points.

anonymous userAnonymous ( 2016-10-11 01:57:11 -0600 )edit
0

answered 2020-09-18 05:47:15 -0600

Dylan Hu gravatar image

You need to put the package under the source directory before building the source code.

Move my_pcl_tutorial directory into catkin worksapce/src directory.

edit flag offensive delete link more
0

answered 2016-09-23 00:43:01 -0600

alienmon gravatar image

Have you sourced the setup.bash? It is located in the devel folder of your workspace.

source setup.bash

You need to source it every time opening a new terminal (unless you put it in bashrc file), so that the system knows the path to the packages in your workspace.

Make sure also that you have built your packages using catkin_make command

edit flag offensive delete link more

Comments

That is not the solution here. I already have it in the .bashrc file and always invoke it after running catkin_make. I believe that the issue is within the package itself, which is why I put the CMakeLists.txt and package.xml code here. Maybe the tutorial is casually overgoing something important.

anonymous userAnonymous ( 2016-09-23 01:18:20 -0600 )edit

@CocoJambo Can I see the particular line in your bashrc file that you added?

alienmon gravatar image alienmon  ( 2016-09-23 02:52:14 -0600 )edit
1

All the lines i added for ROS:

source /opt/ros/jade/setup.bash
source /opt/pjfa/setup.bash
source ~/catkin_ws/devel/setup.bash

export ROS_PACKAGE_PATH=/home/mma7rng/catkin_ws/src:/opt/pjfa/share:/opt/pjfa/stacks:/opt/ros/jade/share:/opt/ros/jade/stacks
anonymous userAnonymous ( 2016-09-23 03:10:27 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-09-22 14:14:19 -0600

Seen: 3,354 times

Last updated: Oct 11 '16