Presentation is loading. Please wait.

Presentation is loading. Please wait.

Robot Operating System (ROS): An Introduction

Similar presentations


Presentation on theme: "Robot Operating System (ROS): An Introduction"— Presentation transcript:

1 Robot Operating System (ROS): An Introduction
Paul Nyholm David Wheeler BYU MAGICC Lab Brigham Young University

2 Exploration Path Planner
Motivation Robot 1: Mission Statement Using an altimeter, Xbox Kinect, and IMU, safely drive through a room creating a map of the environment. Kinect Map Exploration Path Planner Altimeter Estimator IMU Robot Control

3 Motivation Robot 2: Mission Statement
Using an laser range finder, GPS, and IMU, safely fly to specific user defined waypoints and search for moving vehicles. Vehicle Detection Laser Global Map Waypoint GUI GPS Estimator IMU Robot Control

4 Motivation ROS: High Modularity Follows Intuitive Information Flow

5 Exploration Path Planner
Concept ROS Node ROS Message Independent Python or C++ programs. Node crash protection. Inter-program communication. Subscriber Publisher Kinect Map Exploration Path Planner Altimeter Estimator IMU /topic_name Robot Control

6 Concept Subscriber Example: #include "ros/ros.h"
#include "std_msgs/String.h“ void chatterCallback(const std_msgs::String::ConstPtr& msg) { ROS_INFO("I heard: [%s]", msg->data.c_str()); } int main(int argc, char **argv) ros::init(argc, argv, "listener"); ros::NodeHandle n; ros::Subscriber sub = n.subscribe("chatter", 1000, chatterCallback); ros::spin(); return 0;

7 Concept Publisher Example: #include "ros/ros.h"
#include "std_msgs/String.h" #include <sstream> int main(int argc, char **argv) { ros::init(argc, argv, "talker"); ros::NodeHandle n;. ros::Publisher chatter_pub = n.advertise<std_msgs::String>("chatter", 1000); ros::Rate loop_rate(10); int count = 0; while (ros::ok()) std_msgs::String msg; std::stringstream ss; ss << "hello world " << count; msg.data = ss.str(); ROS_INFO("%s", msg.data.c_str()); chatter_pub.publish(msg); ros::spinOnce(); loop_rate.sleep(); ++count; } return 0;

8 Concept roscore my_talker
rosrun talker my_talker chatter:=new_chatter_topic altimeter roslaunch rosrun altimeter my_altimeter range:=range_topic Estimator rosrun estimator my_estimator alt_topic:=range_topic estimate:=current_estimate

9 Exploration Path Planner
Concept Define one node at a time using message interface Blackbox everything else Subscriber Publisher Kinect Map Exploration Path Planner Altimeter Estimator IMU /topic_name Robot Control

10 Tools ROS offers many built in tools that are helpful for collecting, visualizing, and processing data rqt suite rosbag tf rviz wstool

11 Tools rqt_graph Gives a graphical representation of the active nodes and topics

12 Tools rqt_plot Plots incoming messages on specified topics

13 Tools rqt_bag & rosbag rosbag records (subscribes to) specified topics and makes them available for playback (publishing) useful for analysis and simulation chatter IMU commands states goal chatter IMU commands states goal rosbag record topic_name rosbag play bagfile.bag

14 Tools rqt_bag GUI access to rosbag Selectively publish topics

15 Tools TF Keeps track of coordinate frames and transformations
Lookup transformations between different frames at specified times (including the past) Does the math for you!!!

16 Tools rviz Visualize coordinate frames, point clouds, paths, goals, models, and much more

17 Useful wstool commands Free Version Control Sources
Tools wstool ROS tool to manage various version control sources supports git, mercurial, subversion, bazaar Useful wstool commands wstool update wstool status wstool diff wstool info Free Version Control Sources github.com bitbucket.com google it

18 Setup Ubuntu LTS ( ROS Hydro (

19 Setup catkin workspace high level build manager
where your source code (packages) lives cmake lower level build manager creates your .make file catkin_ws/ build/ devel/ src/ CMakeLists.txt (never touch this) package_one/ CMakeLists.txt (must be modified) package.xml msg/ msg1.msg msg2.msg source1.cpp source2.cpp include/ header.h package_two/ …

20 Setup Qt Creator Qt is a power, easy to use IDE for C++ projects
Can be used for programming catkin packages Installation on Ubuntu: $ sudo apt-get install qtcreator Opening Catkin Workspace with Qt Creator: $ cd ~/catkin_ws/src $ qtcreator CMakeLists.txt It is easiest to run this from the command line so that Qt Creator has access to your required environment variables


Download ppt "Robot Operating System (ROS): An Introduction"

Similar presentations


Ads by Google