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

Tutorial question 'Using rosmsg' error

asked 2016-06-05 23:38:05 -0600

perigaacticon gravatar image

updated 2016-06-06 02:14:21 -0600

gvdhoorn gravatar image

Hello,

I have been going through the tutorials for the first time, but got stuck on the 'Using rosmsg' section. The command is : rosmsg show beginner_tutorials/Num, and the error is

Unable to load msg [beginner_tutorials/Num]: Cannot locate message [Num]: unknown package [beginner_tutorials] on search path [ ...

I tried re-making the package and carefully reviewed the instructions. I haven't had any other error until now. Some further information:

  • the command: rossrv show beginner_tutorials/AddTwoInts gives a similar error.
  • I am sightly confused over the code section that says:

    Also make sure you export the message runtime dependency.

    catkin_package(
    ...
    CATKIN_DEPENDS message_runtime ...
    ...)
    

Am I supposed to just uncomment this line only? I notice in the CMakeLists.txt there are a lot of other 'instructions', I have been ignoring them I assume this is correct?

-I am running Ubuntu 16.04 on VirtualBox, I haven't had any issues with it.

The forum won't let me upload files yet. Thanks for your help.

Perigalacticon

edit retag flag offensive close merge delete

Comments

Hey, were you able to resolve this? If not, can you please edit your question to add your full CMakeLists.txt?

janindu gravatar image janindu  ( 2016-06-09 21:02:44 -0600 )edit

Yes I was, thanks.

perigaacticon gravatar image perigaacticon  ( 2016-06-21 15:23:12 -0600 )edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2016-06-21 15:22:52 -0600

perigaacticon gravatar image

I had to resource source devel/setup.bash from the catkin workspace and remake.

edit flag offensive delete link more
0

answered 2017-01-11 18:03:35 -0600

MuratAhmetGenc gravatar image

http://wiki.ros.org/ROS/Tutorials/Cre...

problem: cannot read Num.msg

$ 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/kinetic/share/rosconsole/msg'], 'catkin': ['/opt/ros/kinetic/share/catkin/msg'], 'angles': ['/opt/ros/kinetic/share/angles/msg'], 'image_view': ['/opt/ros/kinetic/share/image_view/msg'], 'urdf': ['/opt/ros/kinetic/share/urdf/msg'], 'rosgraph': ['/opt/ros/kinetic/share/rosgraph/msg'], 'resource_retriever': ['/opt/ros/kinetic/share/resource_retriever/msg'], 'nodelet_topic_tools': ['/opt/ros/kinetic/share/nodelet_topic_tools/msg'], 'rqt_graph': ['/opt/ros/kinetic/shar

solution: $ source devel/setup.bash

result: now it can be found and printed

$ rosmsg show Num

edit flag offensive delete link more

Comments

notsotechnical@notsotechnical-VirtualBox:~/catkin_ws$ rosmsg show Num Could not find msg 'Num'

notSoTechnical gravatar image notSoTechnical  ( 2019-09-24 22:43:21 -0600 )edit
0

answered 2017-01-11 21:17:56 -0600

Probably just executing this command after compiling your package

rospack profile

instead of resourcing your devel/setup.bash would be enough.

When you compile a new package, that has never been compiled before in your workspace, ROS command line tools are still not aware of it. That is why you need to update the package list cache by calling rospack profile

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-06-05 23:38:05 -0600

Seen: 1,736 times

Last updated: Jan 11 '17