Ask Your Question
0

Error using rosmsg in "Creating msg and srv" Tutorial

asked 2014-11-15 10:01:57 -0500

SeaTail gravatar image

Hi, I'm trying to follow the beginner tutorials, using ROS Indigo on ubuntu 14.04 LTS in VirtualBox. I'm currently on the tutorial for Creating a ROS msg and srv, http://wiki.ros.org/ROS/Tutorials/Cre... .

I've gone through the first part of the tutorial, made the edits described (checked thrice). Then I get to section 2.2, Using rosmsg, where I test it by entering:

$ rosmsg show beginner_tutorials/Num

And instead of getting

int64 num

...as expected, I get

Unable to load msg [beginner_tutorials/Num]: Cannot locate message [Num]: unknown package [beginner_tutorials] on search path [{'rosconsole': ['/opt/ros/indigo/share/rosconsole/msg'], 'catkin': ['/opt/ros/indigo/share/catkin/msg'], 'qt_dotgraph': ['/opt/ros/indigo/share/qt_dotgraph/msg'], 'image_view': ['/opt/ros/indigo/share/image_view/msg'], 'urdf': ['/opt/ros/indigo/share/urdf/msg'], 'rosgraph': ['/opt/ros/indigo/share/rosgraph/msg'], 'resource_retriever': ['/opt/ros/indigo/share/resource_retriever/msg'], 'nodelet_topic_tools': ['/opt/ros/indigo/share/nodelet_topic_tools/msg'], 'rqt_graph': ['/opt/ros/indigo/share/rqt_graph/msg'], 'nodelet_tutorial_math': ['/opt/ros/indigo/share/nodelet_tutorial_math/msg'], 'qt_gui': ['/opt/ros/indigo/share/qt_gui/msg'], 'filters': ['/opt/ros/indigo/share/filters/msg'], 'smclib': ['/opt/ros/indigo/share/smclib/msg'], 'roslib': ['/opt/ros/indigo/share/roslib/msg'], 'roscpp_serialization': ['/opt/ros/indigo/share/roscpp_serialization/msg'], 'rqt_rviz': ['/opt/ros/indigo/share/rqt_rviz/msg'], 'rosbuild': ['/opt/ros/indigo/share/rosbuild/msg'], 'rosclean': ['/opt/ros/indigo/share/rosclean/msg'], 'tf': ['/opt/ros/indigo/share/tf/msg'], 'rqt_publisher': ['/opt/ros/indigo/share/rqt_publisher/msg'], 'roswtf': ['/opt/ros/indigo/share/roswtf/msg'], 'geometric_shapes': ['/opt/ros/indigo/share/geometric_shapes/msg'], 'smach_ros': ['/opt/ros/indigo/share/smach_ros/msg'], 'rqt_web': ['/opt/ros/indigo/share/rqt_web/msg'], 'shape_msgs': ['/opt/ros/indigo/share/shape_msgs/msg'], 'interactive_markers': ['/opt/ros/indigo/share/interactive_markers/msg'], 'diagnostic_aggregator': ['/opt/ros/indigo/share/diagnostic_aggregator/msg'], 'robot_state_publisher': ['/opt/ros/indigo/share/robot_state_publisher/msg'], 'visualization_msgs': ['/opt/ros/indigo/share/visualization_msgs/msg'], 'rqt_py_console': ['/opt/ros/indigo/share/rqt_py_console/msg'], 'rqt_topic': ['/opt/ros/indigo/share/rqt_topic/msg'], 'smach': ['/opt/ros/indigo/share/smach/msg'], 'rqt_action': ['/opt/ros/indigo/share/rqt_action/msg'], 'rqt_top': ['/opt/ros/indigo/share/rqt_top/msg'], 'diagnostic_msgs': ['/opt/ros/indigo/share/diagnostic_msgs/msg'], 'rosgraph_msgs': ['/opt/ros/indigo/share/rosgraph_msgs/msg'], 'rosboost_cfg': ['/opt/ros/indigo/share/rosboost_cfg/msg'], 'genmsg': ['/opt/ros/indigo/share/genmsg/msg'], 'xacro': ['/opt/ros/indigo/share/xacro/msg'], 'rqt_robot_dashboard': ['/opt/ros/indigo/share/rqt_robot_dashboard/msg'], 'rqt_service_caller': ['/opt/ros/indigo/share/rqt_service_caller/msg'], 'rqt_msg': ['/opt/ros/indigo/share/rqt_msg/msg'], 'pluginlib': ['/opt/ros/indigo/share/pluginlib/msg'], 'xmlrpcpp': ['/opt/ros/indigo/share/xmlrpcpp/msg'], 'rosmaster': ['/opt/ros/indigo/share/rosmaster/msg'], 'rosnode': ['/opt/ros/indigo/share/rosnode/msg'], 'rqt_pose_view': ['/opt/ros/indigo/share/rqt_pose_view/msg'], 'bond': ['/opt/ros/indigo/share/bond/msg'], 'self_test': ['/opt/ros/indigo/share/self_test/msg'], 'shape_tools': ['/opt/ros/indigo/share/shape_tools/msg'], 'rospack': ['/opt/ros/indigo/share/rospack/msg'], 'actionlib_msgs': ['/opt/ros/indigo/share/actionlib_msgs/msg'], 'image_rotate': ['/opt/ros/indigo/share/image_rotate/msg'], 'rqt_image_view': ['/opt/ros/indigo/share/rqt_image_view/msg'], 'rqt_console': ['/opt/ros/indigo/share/rqt_console/msg'], 'joint_state_publisher': ['/opt/ros/indigo/share/joint_state_publisher/msg'], 'rviz_plugin_tutorials': ['/opt/ros/indigo/share/rviz_plugin_tutorials/msg'], 'tf2_msgs ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-11-15 10:48:41 -0500

SeaTail gravatar image

Hmm... it looks like the answer is here: http://answers.ros.org/question/88086...

You simply run:

$ cd ~/catkin_ws/

then

$ catkin_make

then

$ source devel/setup.bash

I have no idea why this works or what was wrong in the first place and what I missed in the tutorial. Neither does the poster in that link. But now I can run $ rosmsg show and get the expected output.

edit flag offensive delete link more

Comments

Each of those tutorials assumes you have completed all previous tutorials (as stated at the top of each page). Check out the first one in the list: http://wiki.ros.org/ROS/Tutorials/Ins...

jarvisschultz gravatar image jarvisschultz  ( 2014-11-15 12:50:35 -0500 )edit

Agreed, thank you. And I've been completing all dutifully in order from the first one. And with all due respect to the folks who created the tutorials, I came away not entirely clear about what it means to "source" some files or why. And when/why it has to be re-done. Noob issues, I know.

SeaTail gravatar image SeaTail  ( 2014-11-15 16:11:31 -0500 )edit

The setup.bash files are how you control which workspaces and versions of ROS are active in your current terminal. This is controlled through environment variables that are set when you source

jarvisschultz gravatar image jarvisschultz  ( 2014-11-15 20:51:54 -0500 )edit

the setup.bash files. Stick with it, you'll get it!

jarvisschultz gravatar image jarvisschultz  ( 2014-11-15 20:52:22 -0500 )edit

Your Answer

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

Add Answer

Question Tools

2 followers

Stats

Asked: 2014-11-15 10:01:57 -0500

Seen: 1,686 times

Last updated: Nov 15 '14