Skip to content

jihoonl/hello_ros

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hello_ros

Hello world in ros

It is a minimum example to show how to compile in catkin. The example contains how to create

  • cpp package
  • python package

and how to generate

  • msg
  • srv
  • action

How To

Assumes that up-to-date ROS(>=groovy) is installed. If not please, visit installation page.(http://www.ros.org/wiki/ROS/Installation)

After the full step you should have the directory structure below.

   ros ----- build
         |
         --- devel
         |
         --- src/CMakeLists.txt
             src/hello_ros/hello_cpp
                           hello_python

Create workspace directory

This step illustrates how to create catkin workspace under ros directory and how to download sources into workspace.

> mkdir ~/ros
> cd ~/ros
> mkdir ~/ros/src
> cd ~/ros/src
> catkin_init_workspace

If catkin_init_workspace command is not available, please do

source /opt/ros//setup.bash

Download source file

> cd ~/ros/src
> git clone https://github.com/jihoonl/hello_ros.git

Compile

> cd ~/ros
> catkin_make

After catkin_make, 'build' and 'devel' directories are created.

Execution

Assumes that roscore is already running...

Execute hello_cpp

> cd ros/devel
> source setup.bash
> rosrun hello_cpp hello_cpp

Execute hello_python

> cd ros/devel
> source setup.bash
> rosrun hello_python hello_python.py

About

Hello world in ros

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published