0
$\begingroup$

Rosanswers logo

Hi people, I’ve been trying to run my own packages for two weeks now yet still not even close. I have: Followed ROS tutorials 10 times Tried book examples, YouTube video examples… Tried tutorials for Eclipse(not straight forward to set up), of course got stuck with CMake and commands Note: information is scattered and most of them don’t match, as in, different methods for the same thing, this is making it super confusing. And still don’t have a clue. Would some one kindly point to a complete tutorial explaining how to create package, write node, build package and run on terminal and with Eclipse too? I can’t figure how you make this system look easy, but would appreciate if you can share your knowledge please. Thanks. Happy Holidays

Hi Jayess ROS install: OK, turtlesim: OK, newcatkin pkg: OK, modify CMake + manifest: copy & paste but not sure what's going on, wrote talker.cpp + listner.cpp: OK, build with errors. Moved on to eclipse, loaded from catkin workspace, Eclipse doesn't recognise it as project and can't find #includes.

The official tutorial jumpes from catkin_ws to ROS and not sure which steps go where.

Tried all beginner youtube tutorials with no luck. Tried various books like Mastering ROS and Gentle Intro to ROS.

ROS tutorials on Eclipse IDE: stuck on commands too.

Basically I'm a train reck with Linux commands, compilers and CMake. I'm not going to give up though, and do need some one to kindly explain at least steps to build a custom package. How to build workspace with new cpp files?

Links:

Books:

  • Mastering ROS for Robotics Programming
  • A gentle introduction to ROS

Originally posted by finch1 on ROS Answers with karma: 9 on 2017-12-31

Post score: 0


Original comments

Comment by jayess on 2017-12-31:
What exactly have you tried? You say that you've used videos, books, and other sources but don't mention specifically any sources nor do you mention what problems you've had. What's wrong with the official tutorials? Many people use them to get started.

Comment by finch1 on 2017-12-31:
Hi Jayess, sorry about my mistake, wasn't sure how to reply to a comment. Can't see the reply button anywhere...

Comment by jayess on 2017-12-31:
You can click the "edit" button to add more information to a question. What you can do is take your "answer" and update your question with that information and delete your "answer"

Comment by jayess on 2017-12-31:
Also, please include links to any tutorials that you are referring to.

Comment by jayess on 2017-12-31:\

commands are confusing

is vague. What specifically is confusing?

Comment by finch1 on 2017-12-31:
Well, confusing as in I'm not sure what some mean and what they're for. I will try again from the beginning and document the whole process.

Comment by jayess on 2017-12-31:
Again, please be specific. What commands and what's confusing about them?

Comment by finch1 on 2018-01-01:
Hi Jayess, yes I shall do that. I'll try again and note which bit I'm getting stuck with.

Comment by gvdhoorn on 2018-01-01:
@finch1: I would really, really recommend to decouple your learning experiences here. According to your own comments, you don't have too much experience with development under Linux (ie: "Linux commands, compilers and CMake"). Nothing here is too complex for anyone to learn, but trying to ..

Comment by gvdhoorn on 2018-01-01:
.. understand all of this at once, and adding a whole new middleware and associated development practices to that will not make things any easier.

If you have the time, I would personally try to first get some decent intro into Linux - especially the command line. Then take a look at ..

Comment by gvdhoorn on 2018-01-01:
.. development under Linux (and I would even skip the IDE for now, as that is yet another layer of difficulty). Once you're a bit more comfortable with all that (and it isn't even that much), start looking into ROS again. Many of the magic incantations in all of the docs/videos you link to ..

Comment by gvdhoorn on 2018-01-01:
.. will probably start to make a lot more sense then. And at the same time it will allow you to deviate from tutorials a bit without becoming lost immediately (as you have an understanding of what you are doing, instead of copy-pasting commands / code verbatim).

Last comment: not all tutorials ..

Comment by gvdhoorn on 2018-01-01:
.. will start at (absolute) beginner level, as that would be completely infeasible: they have to assume some level of knowledge and experience on the part of the reader. That is probably why you find things to be less polished than you'd like: tutorials might hand-wave things to avoid ..

Comment by gvdhoorn on 2018-01-01:
.. duplicating all sorts of things (this is not an excuse for having badly written tutorials, just a possible explanation for why you experience things as you do).

Comment by gvdhoorn on 2018-01-01:
Final comment:

Basically I'm a train reck with Linux commands, compilers and CMake. I'm not going to give up though [..]

I'd like to commend you here, as getting into this properly is not simple, but (I feel) definitely worth it.

Comment by finch1 on 2018-01-01:
Hiya gvdhoorn, thanks for your inspiring thoughts. Some times i believe I'm not cut out for this, when its actually not easy to grasp itself to begin with. Now that you explain how tutorials are structured, it makes more sense. I'll divide the problem in smaller sections and solve for each one. Than

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I would recommend writing a simple package and building it first. Use this tutorial for creating a simple package. If you think that this is confusing then do the following.

  1. Go to your ROS workspace and src folder in it and type (You can exclude either roscpp or rospy depending upon the language you are using):

catkin_create_pkg my_package roscpp rospy 2. If you are using catkin build the type: catkin build my_package

else go to catkin workspace and type:

catkin_make

You would have created the package here and built it.

What commands in writing a publisher are confusing? Once you are throrugh with this, then go for setting up the environment for eclipse.


Originally posted by pk with karma: 76 on 2018-01-02

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by finch1 on 2018-01-02:
Hi pk, actually I went through that tutorial multiple times. yesterday I managed to build an example package and run it too, gladly seeing the expected output. As gvdhoorn noted I must get familiar with the system first. Now I'm trying to figure out CMake commands. Ex. 'find_package', have no idea

Comment by finch1 on 2018-01-02:
packages its talking about. So I'm kinda discovering new things bit by bit, it gets hard though when an enigma machine is required to decipher descriptions.... you know, most time description is complicated in itself. Its not the case to surrender though!

Comment by finch1 on 2018-01-02:
Thanks for the instructions pk. I'm only familiar with catkin_make for now and never came across catkin build my_package

Comment by finch1 on 2018-01-02:
what makes me wonder is that it looks like the ROS documentaion expects a certain level of experience and I'm struggling to find beginner tutorials that can take me up to this level. So I wonder how you guys make it happen.?

Comment by jayess on 2018-01-04:
@finch1: same way you eat an elephant: one bite at a time. Just take your time and learn as you go. Be persistent and don't give up. If you feel that the language (C++) is holding you back maybe you can give Python a try instead?

Comment by finch1 on 2018-01-04:
Hi Jayess, I'm ok with the programming bit, c++ is great. It's tools like cmake and comand line instructions that halt me down. did some work though and am feeling more confident now

Comment by jayess on 2018-01-04:
C++ is great language, but with the build tools involved it can get in the way of learning if you're learning the language, ROS, and Linux at the same time. Python has an easy syntax and doesn't need to be compiled (so no build tools, generally).

Comment by finch1 on 2018-01-04:
Hi, I feel more confident with CMake and linux after spending time practising. So I tried again, these steps: http://wiki.ros.org/catkin/Tutorials/create_a_workspace http://wiki.ros.org/catkin/Tutorials/CreatingPackage http://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29

Comment by finch1 on 2018-01-04:
So I have all set up as the tutotials. Cmake is giving me this error : add_message_files() directory not found.

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

Comment by jayess on 2018-01-04:
You should start a new question for that problem.

Comment by finch1 on 2018-01-04:
ok will do, cheers

$\endgroup$

Your Answer

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