Loading presentation...

Present Remotely

Send the link below via email or IM


Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.


Introduction to ROS - USC Robotics

No description

Yujia Zhai

on 21 April 2011

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Introduction to ROS - USC Robotics

ART Software Weekend Saturday, April 16, 2011 Robot Operating System ROS What does it
mean to be
an operating system? Application Application Application Application OS Kernel Message Message Message Message topic topic node node node node node ROSCORE Message provides basic functionality of an operating system - keeps a list of nodes
- keeps a list of topics a certain type (format / purpose) of message
- a type: (point cloud, image, pose, etc.)
- a name for identification and declaring its purpose
(e.g. "/Kinect/RGBCamera/Image_Compressed")) type of message = type of topic Definition In programing Pose pose_robot;
pose_robot.position.x = 25.0;
Quaternion rot_robot;
rot_robot = pose_robot.orientation; treat is as a c++ struct

struct Pose{
Point position;
Quaternion orientation;
}; a running application Graphic user interface that communicates with roscore console application What's essential in
programming for a robot? Package where nodes, topics and messages
are made. contains message definitions header files:
* for your own application
* as a part of library main programs
for nodes basic info and
declaration of
dependencies specify how to
the package programs with main() function
can run as nodes. Location
/ Coordinate Transform Time When the message is generated.
you don't want to deal with:
outdated message
messages that are not synchronized
Most message types in ROS have "stamp".
e.g. object_example.header.stamp Always know where your robot and other related stuff are. transformation of obejct is equal to transformation
of coordinate ( everything is in matrix ) tf package in ROS an independent, distributive
message system only for tranformation matrix

basic message types for transformation
translation: vector
rotation: quaternion, eular(roll, pitch, yaw)
... means there is no place for storage
you have to broadcast the
transfomation msg all the time tf::TransformListener listener;
listener.lookupTransform(frame1, frame2, time, callback_function)

broadcaster.sendTransform(stampedTransform, frame1, frame2); similar with the general message publish / subscribe.
you don't need to care about type or name of the topic; just give the name of two frames. Data
Structure Use pointers and references as much as possible. traditional pointers pointer1 object pointer2 pointer1 object pointer2 delete operation pointer2 ? Efficient
& Secure smart pointer pointer1 pointer2 object counter
= 2 - delete pointer1 - counter
= 1 object pointer2 - delete pointer2 - object counter
= 0 - object itself is deleted - Smart Pointer boost::shared_ptr , which is used in many places in the ROS
http://www.boost.org/doc/libs/1_46_1/libs/smart_ptr/shared_ptr.htm avoid declaring global variables or functions Use classes as much
as possible. check out the message_filters package www.ros.org/wiki/message_filters Make use of
ROS node
system don't write all functionalities in one package
split them into different packages
use messages for communication art_common
some basic type definitions
and useful classes (Timer, etc.)
you can use them by simply including
"art_common/art_common.hpp" Some important packages Beohawk if you want use ROS functionality (subscriber, publisher, etc.) in your program, you have to use it.

#include <ros/ros.h> in program roscpp for every package, be sure to add their name to the manifest.xml in your own package. std_msgs if you want to publish message of basic data types like string, you have to use std_msgs library, like "std_msgs::string".

#include <ros/ros.h> is a stack of packages (geometry_msgs, nav_msgs, sensor_msgs) that define many message types.

#include<sensor_msgs/PointCloud2.h> common_msgs tf robot positioning system
based on cordinate transformation

#include <tf/transform_broadcaster.h> visualization/rviz vision_opencv OpenCV library for 2D image processing is a powerful tool that can visualize
various types of messages (image, point-
cloud, pose, map, tf, etc.)

run in terminal: rosrun rviz rviz library for linera algebra (matrix stuff) eigen point cloud library pcl openni_camera driver for Kinect. publish pointcloud message ros_tutorial showcases of programming for ROS be sure to check out:
http://www.ros.org/wiki/tf/Tutorials/Introduction%20to%20tf use namespaces and typedef well checkout the "programming standard" and "test_code" folders in svn A node can: either subscribe to a topic to get msgs
or publish msgs to a topic
or both. Stablization 2d feature matching kinect 3d
matching graph communication mission
planning PID control

Plane recognition Flight command ros network
through wi-fi serial comm
between pc
and arduino Scale invarient
color-based features matching descriptors
in the descriptor's space draw vectors and select
those that agree each other
most (random sample
consensus) get 3d
info of the
points we find
in 2d feature
matching calculate the transformation of the matrix
by SVD (singular value decomposition) node -> position
edge -> constraint

the matching result no finite result: everything is based on
probability ? Any Questions? Thank you! and have a good day! http://www.ros.org/wiki/roscpp/Overview/
Full transcript