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

rosmsg show beginner_tutorials/Num can‘t work

asked 2013-10-06 23:28:21 -0600

hangzhang gravatar image

updated 2013-10-06 23:33:12 -0600

In the tutorial Creating a ROS msg and srv ,in the 2.2 chapter, when I input the

rosmsg show beginner_tutorials/Num

I can't see:

int64 num

And when I input the

rosmsg show Num

I can't see

[beginner_tutorials/Num]:
int64 num

either.

What's the problem?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
7

answered 2013-10-07 16:18:21 -0600

hangzhang gravatar image

updated 2013-10-07 16:19:37 -0600

I don't know why your method doesn't work. But I finally figured out the problem. Before inputing: $ rosmsg show Num. I should input these codes: $ cd ~/catkin_ws/ $ catkin_make $ source devel/setup.bash Then the problem is solved. But I still don't know why.

edit flag offensive delete link more
0

answered 2013-10-07 10:54:16 -0600

Irene.M gravatar image

Maybe you haven't defined correctly your workspace. The issue is, you have to add your workspace path to the file .bashrc The command is: sudo gedit ~/.bashrc, and the end of the document you must write these lines:

  1. First of all, you should write your source, I mean, for example:

source ~/my_workspace

  1. Then, you add to the ROS_PACKAGE_PATH the path of your workspace, I mean, the path of the folder that you want to be your workspace, for example:

export ROS_PACKAGE_PATH=/home/user/my_workspace:$ROS_PACKAGE_PATH

  1. Finally you must export your new workspace too. The command is

export ROS_WORKSPACE=/home/user/my_workspace

I hope you solve your problem!

edit flag offensive delete link more

Comments

This worked for me! Thanks!

Bigshooter gravatar image Bigshooter  ( 2014-03-30 18:18:28 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2013-10-06 23:28:21 -0600

Seen: 2,696 times

Last updated: Oct 07 '13