Hi,
I have the same problem. I don't know how to use the commenting tool, so this is not an answer. I installed ros on debian. That is what I get when typing "export | grep ros":
declare -x PATH="/home/user/ros/ros/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
declare -x PYTHONPATH="/home/user/ros/ros/core/roslib/src:"
declare -x ROS_PACKAGE_PATH="/home/user/ros_workspace:/home/user/ros/robot_model_tutorials:/home/user/ros/visualization_tutorials:/home/user/ros/geometry_tutorials:/home/user/ros/common_tutorials:/home/user/ros/ros_tutorials:/home/user/ros/geometry_experimental:/home/user/ros/robot_model_visualization:/home/user/ros/geometry_visualization:/home/user/ros/diagnostics_monitors:/home/user/ros/executive_smach_visualization:/home/user/ros/visualization:/home/user/ros/slam_gmapping:/home/user/ros/navigation:/home/user/ros/vision_opencv:/home/user/ros/laser_pipeline:/home/user/ros/image_pipeline:/home/user/ros/image_transport_plugins:/home/user/ros/perception_pcl:/home/user/ros/image_common:/home/user/ros/visualization_common:/home/user/ros/physics_ode:/home/user/ros/stage:/home/user/ros/simulator_gazebo:/home/user/ros/simulator_stage:/home/user/ros/xacro:/home/user/ros/executive_smach:/home/user/ros/robot_model:/home/user/ros/assimp:/home/user/ros/pluginlib:/home/user/ros/orocos_kinematics_dynamics:/home/user/ros/nodelet_core:/home/user/ros/geometry:/home/user/ros/bullet:/home/user/ros/filters:/home/user/ros/eigen:/home/user/ros/driver_common:/home/user/ros/diagnostics:/home/user/ros/common:/home/user/ros/common_msgs:/home/user/ros/bond_core:/home/user/ros/documentation:/home/user/ros/rx:/home/user/ros/common_rosdeps:/home/user/ros/ros_comm:/home/user/ros/ros"
declare -x ROS_ROOT="/home/user/ros/ros"
declare -x ROS_WORKSPACE="/home/user/ros"
I went through the tutorial, but at "Creating a ROS package by hand" I can't find the foobar package with "rospack find foobar". I have created /home/user/ros_workspace/foobar/manifest.xml and /home/user/ros_workspace is listed in ROS_PACKAGE_PATH. I can find turtlesim with "rospack find turtlesim". At /home/user/ros/ros/tools/rospack/rospack.cpp I found the method "Package *ROSPack::get_pkg(string pkgname)" which seems responsible, but I'm not willing to go any further.
EDIT:
Ok, I went through the code especially the crawl_for_packages() method. I actually had a manifest.xml in /home/user/ros_workspace for custom made packages. So ros_workspace actually got recognized as a package. I suspect that "continue" in line 1816 of rospack.cpp will then prevent decending into subdirectories. So it's all my fault :(
How does your setup.sh look like, or how did you modify ~/.bashrc ? This could help identify the problem.
How did you install ROS, did you build it from source ?
@SHPOWER I agree with @Hansg91 , it seems to be a path issue.
Please update your question to include your $ROS_PACKAGE_PATH environment variable.