- The Robot Operating System Ben Lewis February 2 2015
Intent of Lecture I am not an expert Give an overview of possibilities Show examples Learn that ROS can be very useful Please read the information on the wiki and do the tutorials
What is ROS? Non-OS software package for developing robotics. Version system - names like “Hydro” or “Indigo” Handles communications, services, and multiple computers with good abstraction De facto industry standard - very common Developed at Stanford (by a BYU grad), then by Willow Garage Supports C++ and Python Runs on Linux (Windows version experimental)
Features Publisher-subscriber architecture Can network to multiple computers Can log and play back information (rosbag) Rich ecosystem of developers Gazebo simulator Manages coordinate frames
Getting Started Install - via apt-get and apt-add-repository Detailed instructions are found online desktop-full version is ideal sudo rosdep-init Adding path (setup.bash) to .bashrc Distributions - ROS Indigo Installs OpenCV as well Create a workspace (catkin_ws)
Packages Logical organization of functionality (messages, publishers, subscribers, services) for a common purpose Located in the src directory of the workspace Built using catkin_make Many packages are available online rospack list
Topics and Messages rqt_graph Topics carry messages between publisher and subscribers Predefined messages: std_msgs, sensor_msgs, etc. A bundle of data http://wiki.ros.org/common_msgs Choose a message type or roll your own
Common Commands roscore rosrun rosmsg rostopic rosls / roscd catkin_make
Running ROS Run roscore & (1x) Start all nodes Use a launch file for efficiency - XML file that launches everything, configures parameters, etc. Run rqt_graph for visualization, rostopic echo, rostopic hz, etc. Call services, publish commands, etc.
Simple Program catkin_create_pkg <name> <dependencies> e.g. rospy, roscpp, opencv (?) Dependencies can be added later Publisher (example) Subscriber (example) Callbacks when receiving a message
Making the package package.xml CMakeLists.txt catkin_make in workspace Package name, version, owner, dependencies Meta information CMakeLists.txt cmake file, defines included files and dependencies Add custom messages, services, executables, libraries, etc. catkin_make in workspace
Launch Files Incredibly useful for starting a large number of nodes Automatically calls roscore Initialize parameters for nodes Configurability XML format
Services Bi-directional Can be used to perform dedicated tasks Client-server architecture Usually placed in the srv folder
Other features Network connection Data playback Custom messages Remapping nodes to different names Normally, you can only have one node of the same name running; new instances kill old instances Log messages (i.e. ROS_INFO) MATLAB compatibility (... sort of) Namespaces - for preventing conflicts in nodes. Each robot should have its own namespace Multiple roscores?