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

rosmsg show beginner_tutorials/Num (error???)

asked 2014-04-02 17:07:53 -0600

juanquy gravatar image

updated 2016-10-24 09:02:38 -0600

ngrennan gravatar image

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 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
7

answered 2014-04-03 05:03:09 -0600

demmeln gravatar image

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.

edit flag offensive delete link more

Comments

1

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?

JoSo gravatar image JoSo  ( 2014-06-17 13:23:32 -0600 )edit
1

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

demmeln gravatar image demmeln  ( 2014-06-17 13:44:46 -0600 )edit
1

Sourcing the setup files in the workspace worked for me. Inside ~/catkin_ws , the command "source devel/setup.bash" should do the trick.

luc gravatar image luc  ( 2014-06-23 11:52:48 -0600 )edit

Is that means I should run the command "source ~/catkin_ws/devel/setup.bash" every time I use ROS?

张京林 gravatar image 张京林  ( 2014-07-25 04:07:48 -0600 )edit
2

You can run it every time you use ROS, or you can add it to your shell startup script: ~/.bashrc

ahendrix gravatar image ahendrix  ( 2014-07-25 04:15:30 -0600 )edit

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

张京林 gravatar image 张京林  ( 2014-07-25 04:36:07 -0600 )edit
1

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.

ahendrix gravatar image ahendrix  ( 2014-07-25 04:46:32 -0600 )edit

OK, thank you very much!

张京林 gravatar image 张京林  ( 2014-07-25 04:59:10 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-04-02 17:07:53 -0600

Seen: 8,107 times

Last updated: Apr 03 '14