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

how to Create the src/talker.cpp

asked 2014-07-09 07:42:36 -0500

beginner_alex gravatar image

Hello,

im new to ROS and i've been doing the tutorials so far till the point it says create the src/talker.cpp file and i have no clue how to that. can someone please tell me how to do it.

thanks, alex

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
0

answered 2014-07-09 15:42:45 -0500

ccapriotti gravatar image

Alex, what our crowd here means is the following:

As you probably already know, ROS is not an operating system per se (contrary to what the name leads you to believe), but a giant library of applications that, integrated, will be able to control a robot.

Let's call ROS here, in this context, a layer.

Now that layer depends on another, which is the operating system. In most cases, ROS runs on some variation of unix, typically linux, and on unix pretty much everything is a file, or treated as a file.

More to the point, when instructions tell you to create a file like that, they actually mean : open your preferred text editor, write your code, and save it with name X".

Depending on which variation of unix you have, different text editors will be available.

If you are using a terminal (text based commands, which I think you are), try

nano src/talker.cpp

It is a simple text editor with some hints of its usage at the bottom of the screen.

Or, if you are using a GUI, AND a terminal on it, you can try

gedit src/talker.cpp

which will probably bring up a nice graphical text editor, which is pretty much user friendly.

As you progress in code complexity, other editors, or even programming environments may become more suitable, but for simple stuff, stick to the basics.

Now, if life finally starts to make sense with all of this blah blah of mine, I would suggest that you take some time and learn a bit more about typical unix commands, most likely "bash" commands. That will come in handy.

Have fun !

edit flag offensive delete link more
0

answered 2014-07-11 08:29:23 -0500

beginner_alex gravatar image

ccapriotti thanks alot. i was just confused to which editor i should be using (GNU EMACS or VIM)

edit flag offensive delete link more

Comments

Please do not create answers for discussion or comments. Instead, either edit and append to your original post or use the comment functionality.

dornhege gravatar image dornhege  ( 2014-07-11 08:47:34 -0500 )edit
0

answered 2014-07-09 07:47:20 -0500

dornhege gravatar image

This just means: Open a text/code editor and save as src/talker.cpp.

edit flag offensive delete link more
0

answered 2014-07-09 08:09:11 -0500

Captcha gravatar image

updated 2014-07-09 08:09:46 -0500

create a folder named "src" and then just add a document named "talker.cpp" inside !

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-07-09 07:42:36 -0500

Seen: 2,821 times

Last updated: Jul 11 '14