0
$\begingroup$

Rosanswers logo

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


Originally posted by finch1 on ROS Answers with karma: 9 on 2018-01-04

Post score: 0


Original comments

Comment by jayess on 2018-01-04:
So, you're listing three tutorials here. What tutorial are you currently following?

Comment by finch1 on 2018-01-04:
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.

Comment by finch1 on 2018-01-04:
Changed directory back to the workspace, typed catkin_make, got the error.

Comment by jayess on 2018-01-04:
Did you go through the Creating Msgs and Srvs tutorial?

Comment by finch1 on 2018-01-04:
Hi, yes, I am reading through it, after I got the error.

Comment by gvdhoorn on 2018-01-05:
@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.

Comment by finch1 on 2018-01-05:
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.

Comment by finch1 on 2018-01-05:
Just to confirm, it should be like this right:

rosrun beginner_tutorials talker rosrun beginner_tutorials listener

Comment by jayess on 2018-01-05:
Yes, you use rosrun like so

rosrun <package-name> <node-name>

Comment by jayess on 2018-01-05:
If you're having more issues unrelated to your original problem (compiling) could you please create a new question? It's not that I don't want to help, but things get messy when we keep changing the question.

Comment by finch1 on 2018-01-05:
Hi Jayess, its true, I'm going to cause its getting messy very quickly. Actually, I found other posts with the same issue so I'll go through them before I ask a new question, maybe I can find the answer.

Comment by jayess on 2018-01-05:
Sounds good. A good way to learn is to go through the wiki. If this issue (compiling) has been resolved, please click the checkmark to accept the answer.

Comment by jayess on 2018-01-05:
Next to the answer, click on the checkmark.

Comment by finch1 on 2018-01-05:
Thanks for confirming.

Comment by jayess on 2018-01-05:
No problem :)

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by jayess with karma: 6155 on 2018-01-04

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by finch1 on 2018-01-04:
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.

Comment by jayess on 2018-01-04:
By worked, do you mean that it compiled and ran?

Comment by finch1 on 2018-01-04:
yes exactly, compile + run. So I removed these to lines away and catkin_make gave no errors.

Comment by jayess on 2018-01-04:
Great. So, if this solved your problem then please click the checkmark to mark the answer as correct.

Comment by finch1 on 2018-01-04:
ok, for some reason only "talker" runs as a node, "rosrun beginner_tutorial listener" couldn't be found

Comment by jayess on 2018-01-04:
Please create a new question. We try to keep the questions focused on one issue.

Comment by gvdhoorn on 2018-01-05:
@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 ..

Comment by gvdhoorn on 2018-01-05:
.. 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).

Comment by finch1 on 2018-01-05:
True true gvdhoorn, I agree and am doing so at the moment. I hope I can help others too one day like you guys. Thanks for your encouragement.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.