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
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
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
> cd ~/ros/src > git clone https://github.com/jihoonl/hello_ros.git
> cd ~/ros > catkin_make
After catkin_make, 'build' and 'devel' directories are created.
Assumes that roscore is already running...
> cd ros/devel > source setup.bash > rosrun hello_cpp hello_cpp
> cd ros/devel > source setup.bash > rosrun hello_python hello_python.py