Skip to content
Robert Haschke edited this page Apr 27, 2020 · 9 revisions

ROS: Robot Operating System

  • middleware, i.e. inter-process communication
  • hardware abstraction for robots
  • message definitions (for RPC)
  • package management system, tailored towards development
  • collection of open-source software packages
  • multi language: C++, Python, Java
  • multi platform: (Ubuntu Linux), Windows 10, OSX

middleware concepts

  • topics (publish - subscribe)
  • services (remote procedure calls)
  • nodes: logical computing components, several per process possible
  • central naming service (roscore)
  • remapping: renaming of nodes, topics, etc.
  • central parameter storage

further reading

catkin build system

  • extends cmake to facilitate package management dependencies, installation to standard locations
  • catkin_make, catkin_make_isolated, catkin tools
  • hierarchical stacking of workspaces: /opt/ros/indigo -> /vol/nirobots/ros/indigo -> /homes/juser/ros
    • load config with: source <base dir>/setup.bash
  • workspace structure
    • src/
    • build/
    • devel/
      • setup.bash

catkin_make / catkin_make_isolated

mkdir -p ~/ros/src
cd ~/ros/src
source /opt/ros/*/setup.bash
catkin_init_workspace
git clone https://github.com/rhaschke/lecture
cd ..
catkin_make

catkin tools

mkdir ~/ros
cd ~/ros
source /opt/ros/*/setup.bash
catkin config --init
mkdir src
cd src
# catkin create pkg lecture
# or clone from repository
git clone https://github.com/rhaschke/lecture
cd lecture
catkin build

For more details on catkin config and catkin create pkg follow the links.

package structure

  • package.xml
    • defines folder as a ROS package
    • defines dependencies: build, test, run
    • author, license, package information
  • CMakeLists.txt

example ros session

source ~/ros/devel/setup.bash
roscore &
rostopic pub -r 1 chatter std_msgs/String "Hello World" &
rostopic echo chatter

Inspect ros universe:

rosnode list
rostopic list
rosservice list
rosmsg list

rqt_graph

Remapping arguments

rosrun roscpp_tutorials talker chatter:=foobar
rosrun roscpp_tutorials listener chatter:=foobar
Clone this wiki locally