All you need is to follow this tutorial which explains in a very simple way how to write a c++ code to publish/subscribe to ros topics code and compile it with gcc linking to the roscpp library.
http://jbohren.com/articles/roscpp-hello-world/
Originally posted by Mehdi. with karma: 3339 on 2014-10-10
This answer was ACCEPTED on the original site
Post score: 0
Original comments
Comment by leobber on 2014-10-12:
Thank Mehdi, follow no doubt your help, but do not want to just make a publisher / subscribe to communicate with Turtlebot / gazebo, desire to make a program that from it we can send commands to the turtlebot the gazebo.
Comment by leobber on 2014-10-12:
an example of what I want to do clear that the simplest way would be what matlab does with this tool: http://www.mathworks.com/matlabcentral/fileexchange/44853-use-matlab-ros-i-o-package-to-interact-with-the-turtlebot-simulator-in-gazebo
Comment by leobber on 2014-10-12:
I create a program so that we can interact with it to the gazebo and turtlebot first and then with the real robot, know I have to publish through the publisher and subscribe more I wonder if it would be possible to incorporate my software to make direct it exactly like that Matlab package.
Comment by leobber on 2014-10-12:
and which path I should follow to incorporate this direct communication of my software and receiving.I thank you very much your help! and the time it is devoting myself to answer my debts!
Comment by Mehdi. on 2014-10-12:
Well all interaction in ROS is based on publish/subscribe so I am pretty sure you can do whatever you want with that !! Controlling Turtlebot means publishing a command velocity message to the robot's topic responsible for that. And you are not limited to roscpp as library.
Comment by leobber on 2014-10-13:
Exactly, I will follow the tutorial that you pointed me to start understanding the part of how I do to create the functions that go to communicate and receive the ROS. I really appreciate your attention, if you are able to send me a contact to exchange an idea more specific about my work,
Comment by leobber on 2014-10-13:
can be email, whatsapp.
Thank you so much.