Skip to content

Basic test package in ROS

jitrc edited this page Dec 26, 2012 · 3 revisions
$ roscd
$ cd sandbox
$ roscreate-pkg beginner_tutorials roscpp
$ rospack profile
$ rospack find beginner_tutorials 
$ gedit beginner_tutorials/src/helloROS.cpp

-- Add the following lines

#include <iostream>
using namespace std;
int main()
{
    cout<<"Hello";
        return 0;
}

--

$ gedit  beginner_tutorials/CMakeLists.txt

-- Add the following lines

rosbuild_add_executable(hello src/helloROS.cpp)

--

$ rosmake beginner_tutorials
$ rosrun beginner_tutorials hello
Clone this wiki locally