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

Talker Listener Tutorial. Listener no show

asked 2018-01-04 11:47:59 -0500

finch1 gravatar image

updated 2018-01-05 03:20:27 -0500

Hi, I feel more confident with CMake and linux after spending time practising. So I tried again, these steps:

So I have all set up as the tutotials. Cmake is giving me this error :

CMake Error at /opt/ros/indigo/share/genmsg/cmake/genmsg-extras.cmake:94 (message):           add_message_files() directory not found: /home/test/my_ws/src/beginner_tutorials/msg                     Call Stack (most recent call first): beginner_tutorials/CMakeLists.txt:8 (add_message_files)

Kinda stuck again, hope this time I'm more specific. Let me know if I can upload any images somewhere if it helps

edit retag flag offensive close merge delete

Comments

So, you're listing three tutorials here. What tutorial are you currently following?

jayess gravatar image jayess  ( 2018-01-04 11:51:46 -0500 )edit

Hi Jayess, I created the workspace following the instructions from the first link. Then created a package using the commands from the second link tutorial. After this, I added the source code and rearranged the CMakeLists as the tutorial describes in the third link.

finch1 gravatar image finch1  ( 2018-01-04 14:51:49 -0500 )edit

Changed directory back to the workspace, typed catkin_make, got the error.

finch1 gravatar image finch1  ( 2018-01-04 14:52:06 -0500 )edit

Did you go through the Creating Msgs and Srvs tutorial?

jayess gravatar image jayess  ( 2018-01-04 14:55:19 -0500 )edit

Hi, yes, I am reading through it, after I got the error.

finch1 gravatar image finch1  ( 2018-01-04 15:30:31 -0500 )edit
1

@finch1: may I suggest a title change? At the moment, the title of your post is "Following package tutorial". That doesn't give any information about what it is you're actually trying to solve. As your problem is specifically about a certain aspect of the tutorial, mention that in the title.

gvdhoorn gravatar image gvdhoorn  ( 2018-01-05 02:54:13 -0500 )edit

Hi gvdhoorn, I think I'm gonna call it "Going round in circles" cause that's how it feels like. I don't know what else to try. If the tutorials are correct, I'm not getting any errors and still can only run one node out of the two built, then I'm lost and have no clue where to start looking to fix.

finch1 gravatar image finch1  ( 2018-01-05 03:02:03 -0500 )edit

Just to confirm, it should be like this right:

rosrun beginner_tutorials talker rosrun beginner_tutorials listener

finch1 gravatar image finch1  ( 2018-01-05 03:10:43 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-01-04 14:58:24 -0500

jayess gravatar image

If you didn't go through the Creating Msgs and Srvs tutorial tutorial then you can remove the

add_message_files(DIRECTORY msg FILES Num.msg)
add_service_files(DIRECTORY srv FILES AddTwoInts.srv)

lines from your CMakeLists.txt file. You only need those lines if you have custom messages that you're compiling.

edit flag offensive delete link more

Comments

Removed these in a previous trial, and the node worked, eventhough I wasn't sure what I was doing so decided to ask this time.

finch1 gravatar image finch1  ( 2018-01-04 15:32:11 -0500 )edit

By worked, do you mean that it compiled and ran?

jayess gravatar image jayess  ( 2018-01-04 15:33:41 -0500 )edit

yes exactly, compile + run. So I removed these to lines away and catkin_make gave no errors.

finch1 gravatar image finch1  ( 2018-01-04 15:35:59 -0500 )edit

Great. So, if this solved your problem then please click the checkmark to mark the answer as correct.

jayess gravatar image jayess  ( 2018-01-04 15:38:29 -0500 )edit

ok, for some reason only "talker" runs as a node, "rosrun beginner_tutorial listener" couldn't be found

finch1 gravatar image finch1  ( 2018-01-04 15:50:12 -0500 )edit

Please create a new question. We try to keep the questions focused on one issue.

jayess gravatar image jayess  ( 2018-01-04 15:52:39 -0500 )edit
1

@finch1: you mentioned you have the book before, so I'd like to suggest the following: go back to "A Gentle Introduction to ROS". Read it again, try to replicate what the book does and see whether your understanding has increased. I have a feeling it will be, and it should let you avoid the kind ..

gvdhoorn gravatar image gvdhoorn  ( 2018-01-05 02:55:41 -0500 )edit
1

.. of issues you are running into now.

It's not that we don't want to help you, but you'll probably save yourself quite some frustration as well be more efficient with your time (ie: not having to wait on answers here).

gvdhoorn gravatar image gvdhoorn  ( 2018-01-05 02:56:25 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-01-04 11:47:59 -0500

Seen: 471 times

Last updated: Jan 05 '18