0
$\begingroup$

Rosanswers logo

Hi guys I been fallowing beginner tutorial, I'm a newbie ok.

So when i wrote in my terminal :

$ rosmsg show beginner_tutorials/Num

I got this error :

$ rosmsg show beginner_tutorials/Num
Unable to load msg [beginner_tutorials/Num]: Cannot locate message [Num]: unknown package [beginner_tutorials] on search path [{'rosconsole': ['/opt/ros/hydro/share/rosconsole/msg'], 'catkin': ['/opt/ros/hydro/share/catkin/msg'], 'qt_dotgraph': ['/opt/ros/hydro/share/qt_dotgraph/msg'], 'image_view': ['/opt/ros/hydro/share/image_view/msg'], 'carrot_planner': ['/opt/ros/hydro/share/carrot_planner/msg'], 'urdf': ['/opt/ros/hydro/share/urdf/msg'], 'rosgraph': ['/opt/ros/hydro/share/rosgraph/msg'], 'rqt_py_console': ['/opt/ros/hydro/share/rqt_py_console/msg'], 'nodelet_topic_tools': ['/opt/ros/hydro/share/nodelet_topic_tools/msg'], 'rqt_graph': ['/opt/ros/hydro/share/rqt_graph/msg'], 'rotate_recovery': ['/opt/ros/hydro/share/rotate_recovery/msg'], 'fake_localization': ['/opt/ros/hydro/share/fake_localization/msg'], 'qt_gui': ['/opt/ros/hydro/share/qt_gui/msg'], 'filters': ['/opt/ros/hydro/share/filters/msg'], 'eigen_conversions': ['/opt/ros/hydro/share/eigen_conversions/msg'], 'navfn': ['/opt/ros/hydro/share/navfn/msg'], 'dwa_local_planner': ['/opt/ros/hydro/share/dwa_local_planner/msg'], 'rosgraph_msgs': ['/opt/ros/hydro/share/rosgraph_msgs/msg'], 'smclib': ['/opt/ros/hydro/share/smclib/msg'], 'rosparam': ['/opt/ros/hydro/share/rosparam/msg'], 'roscpp_serialization': ['/opt/ros/hydro/share/roscpp_serialization/msg'], 'diagnostic_msgs': ['/opt/ros/hydro/share/diagnostic_msgs/msg'], 'rosbuild': ['/opt/ros/hydro/share/rosbuild/msg'], 'rosclean': ['/opt/ros/hydro/share/rosclean/msg'], 'tf': ['/opt/ros/hydro/share/tf/msg'], 'rqt_publisher': ['/opt/ros/hydro/share/rqt_publisher/msg'], 'roswtf': ['/opt/ros/hydro/share/roswtf/msg'], 'geometric_shapes': ['/opt/ros/hydro/share/geometric_shapes/msg'], 'smach_ros': ['/opt/ros/hydro/share/smach_ros/msg'], 'rqt_web': ['/opt/ros/hydro/share/rqt_web/msg'], 'shape_msgs': ['/opt/ros/hydro/share/shape_msgs/msg'], 'trajectory_msgs': ['/opt/ros/hydro/share/trajectory_msgs/msg'], 'costmap_2d': ['/opt/ros/hydro/share/costmap_2d/msg'], 'robot_state_publisher': ['/opt/ros/hydro/share/robot_state_publisher/msg'], 'visualization_msgs': ['/opt/ros/hydro/share/visualization_msgs/msg'], 'resource_retriever': ['/opt/ros/hydro/share/resource_retriever/msg'], 'rqt_topic': ['/opt/ros/hydro/share/rqt_topic/msg'], 'smach': ['/opt/ros/hydro/share/smach/msg'], 'rqt_action': ['/opt/ros/hydro/share/rqt_action/msg'], 'rqt_top': ['/opt/ros/hydro/share/rqt_top/msg'], 'rqt_rviz': ['/opt/ros/hydro/share/rqt_rviz/msg'], 'move_base': ['/opt/ros/hydro/share/move_base/msg'], 'rosboost_cfg': ['/opt/ros/hydro/share/rosboost_cfg/msg'], 'genmsg': ['/opt/ros/hydro/share/genmsg/msg'], 'xacro': ['/opt/ros/hydro/share/xacro/msg'], 'rqt_robot_dashboard': ['/opt/ros/hydro/share/rqt_robot_dashboard/msg'], 'rqt_service_caller': ['/opt/ros/hydro/share/rqt_service_caller/msg'], 'rqt_msg': ['/opt/ros/hydro/share/rqt_msg/msg'], 'pluginlib': ['/opt/ros/hydro/share/pluginlib/msg'], 'rosdoc_lite': ['/opt/ros/hydro/share/rosdoc_lite/msg'], 'rosserial_python': ['/opt/ros/hydro/share/rosserial_python/msg'], 'rosmaster': ['/opt/ros/hydro/share/rosmaster/msg'], 'nodelet_tutorial_math': ['/opt/ros/hydro/share/nodelet_tutorial_math/msg'], 'rosnode': ['/opt/ros/hydro/share/rosnode/msg'], 'rqt_pose_view': ['/opt/ros/hydro/share/rqt_pose_view/msg'], 'bond': ['/opt/ros/hydro/share/bond/msg'], 'self_test': ['/opt/ros/hydro/share/self_test/msg'], 'image_geometry': ['/opt/ros/hydro/share/image_geometry/msg'], 'pcl_conversions': ['/opt/ros/hydro/share/pcl_conversions/msg'], 'actionlib_msgs': ['/opt/ros/hydro/share/actionlib_msgs/msg'], 'image_rotate': ['/opt/ros/hydro/share/image_rotate/msg'], 'rqt_image_view': ['/opt/ros/hydro/share/rqt_image_view/msg'], 'rqt_console': ['/opt/ros/hydro/share/rqt_console/msg'], 'joint_state_publisher': ['/opt/ros/hydro/share/joint_state_publisher/msg'], 'rosserial_client': ['/opt/ros/hydro/share/rosserial_client/msg'], 'xmlrpcpp': ['/opt/ros/hydro/share/xmlrpcpp/msg'], 'rviz_plugin_tutorials': ['/opt/ros/hydro/share/rviz_plugin_tutorials/msg'], 'tf2_msgs': ['/opt/ros/hydro/share/tf2_msgs/msg'], 'python_qt_binding': ['/opt/ros/hydro/share/python_qt_binding/msg'], 'laser_geometry': ['/opt/ros/hydro/share/laser_geometry/msg'], 'clear_costmap_recovery': ['/opt/ros/hydro/share/clear_costmap_recovery/msg'], 'rviz': ['/opt/ros/hydro/share/rviz/msg'], 'gencpp': ['/opt/ros/hydro/share/gencpp/msg'], 'rqt_gui_cpp': ['/opt/ros/hydro/share/rqt_gui_cpp/msg'], 'rqt_bag': ['/opt/ros/hydro/share/rqt_bag/msg'], 'rqt_gui': ['/opt/ros/hydro/share/rqt_gui/msg'], 'qt_gui_py_common': ['/opt/ros/hydro/share/qt_gui_py_common/msg'], 'console_bridge': ['/opt/ros/hydro/share/console_bridge/msg'], 'roscpp_traits': ['/opt/ros/hydro/share/roscpp_traits/msg'], 'driver_base': ['/opt/ros/hydro/share/driver_base/msg'], 'rosout': ['/opt/ros/hydro/share/rosout/msg'], 'diagnostic_common_diagnostics': ['/opt/ros/hydro/share/diagnostic_common_diagnostics/msg'], 'rostopic': ['/opt/ros/hydro/share/rostopic/msg'], 'smach_msgs': ['/opt/ros/hydro/share/smach_msgs/msg'], 'message_generation': ['/opt/ros/hydro/share/message_generation/msg'], 'camera_calibration': ['/opt/ros/hydro/share/camera_calibration/msg'], 'polled_camera': ['/opt/ros/hydro/share/polled_camera/msg'], 'rostime': ['/opt/ros/hydro/share/rostime/msg'], 'urdf_tutorial': ['/opt/ros/hydro/share/urdf_tutorial/msg'], 'kdl_conversions': ['/opt/ros/hydro/share/kdl_conversions/msg'], 'rqt_nav_view': ['/opt/ros/hydro/share/rqt_nav_view/msg'], 'rosservice': ['/opt/ros/hydro/share/rosservice/msg'], 'actionlib_tutorials': ['/opt/ros/hydro/share/actionlib_tutorials/msg'], 'rosunit': ['/opt/ros/hydro/share/rosunit/msg'], 'turtle_tf': ['/opt/ros/hydro/share/turtle_tf/msg'], 'roscpp_tutorials': ['/opt/ros/hydro/share/roscpp_tutorials/msg'], 'move_base_msgs': ['/opt/ros/hydro/share/move_base_msgs/msg'], 'turtle_actionlib': ['/opt/ros/hydro/share/turtle_actionlib/msg'], 'python_orocos_kdl': ['/opt/ros/hydro/share/python_orocos_kdl/msg'], 'stage': ['/opt/ros/hydro/share/stage/msg'], 'tf2_geometry_msgs': ['/opt/ros/hydro/share/tf2_geometry_msgs/msg'], 'visualization_marker_tutorials': ['/opt/ros/hydro/share/visualization_marker_tutorials/msg'], 'rqt_shell': ['/opt/ros/hydro/share/rqt_shell/msg'], 'bondcpp': ['/opt/ros/hydro/share/bondcpp/msg'], 'rosconsole_bridge': ['/opt/ros/hydro/share/rosconsole_bridge/msg'], 'pluginlib_tutorials': ['/opt/ros/hydro/share/pluginlib_tutorials/msg'], 'camera_info_manager': ['/opt/ros/hydro/share/camera_info_manager/msg'], 'camera_calibration_parsers': ['/opt/ros/hydro/share/camera_calibration_parsers/msg'], 'rqt_bag_plugins': ['/opt/ros/hydro/share/rqt_bag_plugins/msg'], 'rosmsg': ['/opt/ros/hydro/share/rosmsg/msg'], 'rospy': ['/opt/ros/hydro/share/rospy/msg'], 'turtlesim': ['/opt/ros/hydro/share/turtlesim/msg'], 'rqt_robot_monitor': ['/opt/ros/hydro/share/rqt_robot_monitor/msg'], 'roslib': ['/opt/ros/hydro/share/roslib/msg'], 'diagnostic_analysis': ['/opt/ros/hydro/share/diagnostic_analysis/msg'], 'stereo_msgs': ['/opt/ros/hydro/share/stereo_msgs/msg'], 'pcl_msgs': ['/opt/ros/hydro/share/pcl_msgs/msg'], 'interactive_markers': ['/opt/ros/hydro/share/interactive_markers/msg'], 'diagnostic_updater': ['/opt/ros/hydro/share/diagnostic_updater/msg'], 'laser_assembler': ['/opt/ros/hydro/share/laser_assembler/msg'], 'rospack': ['/opt/ros/hydro/share/rospack/msg'], 'diagnostic_aggregator': ['/opt/ros/hydro/share/diagnostic_aggregator/msg'], 'rviz_python_tutorial': ['/opt/ros/hydro/share/rviz_python_tutorial/msg'], 'tf2': ['/opt/ros/hydro/share/tf2/msg'], 'rqt_runtime_monitor': ['/opt/ros/hydro/share/rqt_runtime_monitor/msg'], 'rosbash': ['/opt/ros/hydro/share/rosbash/msg'], 'rqt_reconfigure': ['/opt/ros/hydro/share/rqt_reconfigure/msg'], 'rqt_dep': ['/opt/ros/hydro/share/rqt_dep/msg'], 'bfl': ['/opt/ros/hydro/share/bfl/msg'], 'urdfdom_headers': ['/opt/ros/hydro/share/urdfdom_headers/msg'], 'rqt_plot': ['/opt/ros/hydro/share/rqt_plot/msg'], 'topic_tools': ['/opt/ros/hydro/share/topic_tools/msg'], 'rostest': ['/opt/ros/hydro/share/rostest/msg'], 'control_msgs': ['/opt/ros/hydro/share/control_msgs/msg'], 'tf_conversions': ['/opt/ros/hydro/share/tf_conversions/msg'], 'interactive_marker_tutorials': ['/opt/ros/hydro/share/interactive_marker_tutorials/msg'], 'cpp_common': ['/opt/ros/hydro/share/cpp_common/msg'], 'nodelet': ['/opt/ros/hydro/share/nodelet/msg'], 'stage_ros': ['/opt/ros/hydro/share/stage_ros/msg'], 'rqt_robot_steering': ['/opt/ros/hydro/share/rqt_robot_steering/msg'], 'roslaunch': ['/opt/ros/hydro/share/roslaunch/msg'], 'genpy': ['/opt/ros/hydro/share/genpy/msg'], 'compressed_depth_image_transport': ['/opt/ros/hydro/share/compressed_depth_image_transport/msg'], 'compressed_image_transport': ['/opt/ros/hydro/share/compressed_image_transport/msg'], 'message_runtime': ['/opt/ros/hydro/share/message_runtime/msg'], 'gazebo_msgs': ['/opt/ros/hydro/share/gazebo_msgs/msg'], 'roscreate': ['/opt/ros/hydro/share/roscreate/msg'], 'image_transport': ['/opt/ros/hydro/share/image_transport/msg'], 'rqt_launch': ['/opt/ros/hydro/share/rqt_launch/msg'], 'angles': ['/opt/ros/hydro/share/angles/msg'], 'cv_bridge': ['/opt/ros/hydro/share/cv_bridge/msg'], 'gazebo_ros': ['/opt/ros/hydro/share/gazebo_ros/msg'], 'rosbag_storage': ['/opt/ros/hydro/share/rosbag_storage/msg'], 'tf2_bullet': ['/opt/ros/hydro/share/tf2_bullet/msg'], 'roslang': ['/opt/ros/hydro/share/roslang/msg'], 'std_srvs': ['/opt/ros/hydro/share/std_srvs/msg'], 'mk': ['/opt/ros/hydro/share/mk/msg'], 'octomap': ['/opt/ros/hydro/share/octomap/msg'], 'amcl': ['/opt/ros/hydro/share/amcl/msg'], 'urdfdom': ['/opt/ros/hydro/share/urdfdom/msg'], 'stereo_image_proc': ['/opt/ros/hydro/share/stereo_image_proc/msg'], 'tf2_kdl': ['/opt/ros/hydro/share/tf2_kdl/msg'], 'genlisp': ['/opt/ros/hydro/share/genlisp/msg'], 'class_loader': ['/opt/ros/hydro/share/class_loader/msg'], 'tf2_py': ['/opt/ros/hydro/share/tf2_py/msg'], 'map_server': ['/opt/ros/hydro/share/map_server/msg'], 'collada_urdf': ['/opt/ros/hydro/share/collada_urdf/msg'], 'timestamp_tools': ['/opt/ros/hydro/share/timestamp_tools/msg'], 'move_slow_and_clear': ['/opt/ros/hydro/share/move_slow_and_clear/msg'], 'robot_pose_ekf': ['/opt/ros/hydro/share/robot_pose_ekf/msg'], 'pcl_ros': ['/opt/ros/hydro/share/pcl_ros/msg'], 'nav_msgs': ['/opt/ros/hydro/share/nav_msgs/msg'], 'rosmake': ['/opt/ros/hydro/share/rosmake/msg'], 'image_proc': ['/opt/ros/hydro/share/image_proc/msg'], 'roscpp': ['/opt/ros/hydro/share/roscpp/msg'], 'rqt_moveit': ['/opt/ros/hydro/share/rqt_moveit/msg'], 'media_export': ['/opt/ros/hydro/share/media_export/msg'], 'depth_image_proc': ['/opt/ros/hydro/share/depth_image_proc/msg'], 'actionlib': ['/opt/ros/hydro/share/actionlib/msg'], 'laser_filters': ['/opt/ros/hydro/share/laser_filters/msg'], 'qt_gui_cpp': ['/opt/ros/hydro/share/qt_gui_cpp/msg'], 'eigen_stl_containers': ['/opt/ros/hydro/share/eigen_stl_containers/msg'], 'tf2_ros': ['/opt/ros/hydro/share/tf2_ros/msg'], 'librviz_tutorial': ['/opt/ros/hydro/share/librviz_tutorial/msg'], 'base_local_planner': ['/opt/ros/hydro/share/base_local_planner/msg'], 'shape_tools': ['/opt/ros/hydro/share/shape_tools/msg'], 'roslisp': ['/opt/ros/hydro/share/roslisp/msg'], 'message_filters': ['/opt/ros/hydro/share/message_filters/msg'], 'qt_gui_app': ['/opt/ros/hydro/share/qt_gui_app/msg'], 'std_msgs': ['/opt/ros/hydro/share/std_msgs/msg'], 'rosserial_arduino': ['/opt/ros/hydro/share/rosserial_arduino/msg'], 'gmapping': ['/opt/ros/hydro/share/gmapping/msg'], 'map_msgs': ['/opt/ros/hydro/share/map_msgs/msg'], 'rospy_tutorials': ['/opt/ros/hydro/share/rospy_tutorials/msg'], 'random_numbers': ['/opt/ros/hydro/share/random_numbers/msg'], 'gazebo_plugins': ['/opt/ros/hydro/share/gazebo_plugins/msg'], 'rqt_srv': ['/opt/ros/hydro/share/rqt_srv/msg'], 'rqt_gui_py': ['/opt/ros/hydro/share/rqt_gui_py/msg'], 'voxel_grid': ['/opt/ros/hydro/share/voxel_grid/msg'], 'rqt_py_common': ['/opt/ros/hydro/share/rqt_py_common/msg'], 'dynamic_reconfigure': ['/opt/ros/hydro/share/dynamic_reconfigure/msg'], 'opencv2': ['/opt/ros/hydro/share/opencv2/msg'], 'rqt_tf_tree': ['/opt/ros/hydro/share/rqt_tf_tree/msg'], 'collada_parser': ['/opt/ros/hydro/share/collada_parser/msg'], 'rqt_logger_level': ['/opt/ros/hydro/share/rqt_logger_level/msg'], 'nav_core': ['/opt/ros/hydro/share/nav_core/msg'], 'openslam_gmapping': ['/opt/ros/hydro/share/openslam_gmapping/msg'], 'kdl_parser': ['/opt/ros/hydro/share/kdl_parser/msg'], 'theora_image_transport': ['/opt/ros/hydro/share/theora_image_transport/msg'], 'rosserial_msgs': ['/opt/ros/hydro/share/rosserial_msgs/msg'], 'geometry_msgs': ['/opt/ros/hydro/share/geometry_msgs/msg'], 'urdf_parser_plugin': ['/opt/ros/hydro/share/urdf_parser_plugin/msg'], 'tf2_tools': ['/opt/ros/hydro/share/tf2_tools/msg'], 'sensor_msgs' ['/opt/ros/hydro/share/sensor_msgs/msg'], 'orocos_kdl': ['/opt/ros/hydro/share/orocos_kdl/msg'], 'rosbag': ['/opt/ros/hydro/share/rosbag/msg'], 'rosbag_migration_rule': ['/opt/ros/hydro/share/rosbag_migration_rule/msg']}]

========================================================== roscore is running

ROS HYDRO UBUNTU 12.04 64BIT

Any help it will be appreciated sorry about my english

JC


Originally posted by juanquy on ROS Answers with karma: 55 on 2014-04-02

Post score: 5

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You will need to first source the setup files for the workspace where beginner_tutorials is located. I.e. something like source /path/to/your/workspace/devel/setup.bash. Only then will ros be able to find your package.


Originally posted by demmeln with karma: 4306 on 2014-04-03

This answer was ACCEPTED on the original site

Post score: 7


Original comments

Comment by JoSo on 2014-06-17:
I am also a newbie and this worked for me but I don't quite understand. I have sourced 'source /opt/ros/hydro/setup.bash to my ~/.bashrc file so the ROS commands should work each time and they do, but why do I need to source if I'm already working in that directory?

Comment by demmeln on 2014-06-17:
ROS uses the environment to search for packages, not the current directory. Check out this tutorial, in paritcular "4. Create a ROS workspace": http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment

Comment by luc on 2014-06-23:
Sourcing the setup files in the workspace worked for me. Inside ~/catkin_ws , the command "source devel/setup.bash" should do the trick.

Comment by 张京林 on 2014-07-25:
Is that means I should run the command "source ~/catkin_ws/devel/setup.bash" every time I use ROS?

Comment by ahendrix on 2014-07-25:
You can run it every time you use ROS, or you can add it to your shell startup script: ~/.bashrc

Comment by 张京林 on 2014-07-25:
Should I use the command below, if I want to add it to the shell startup script? echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc

Comment by ahendrix on 2014-07-25:
That will work, but I generally think it's better to open your bashrc in an editor and actually try to understand what's going on, rather than just appending random commands to it.

Comment by 张京林 on 2014-07-25:
OK, thank you very much!

Comment by traemand on 2020-11-29:
running source ~/catkin_ws/devel/setup.bash worked for me on noetic, Ubuntu 20.04

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.