ROS Slides
ROS Slides
ROS Slides
Robotics Research
Make your research easier with ROS and other tools
What is ROS?
ROS - the Robot Operating System
a middleware
your friend!
A brief history
Originally developed for class software at Stanford
(c. 2007)
First pub ICRA 2009
Current setup for our robots is using Ubuntu 14.04 LTS with ROS Indigo
but installing from source is not too hard, particularly if its only a few packages
you need to hack on
Somewhat supported:
Matlab / Octave (with help from MathWorks now)
Java
lisp
Issues
Native real-time support is poor
Other labs
http://wiki.ros.org/ROS/Tutorials
http://www.coe.utah.edu/~cs7939/ros_tips.html
ROS Components: interprocess communication (IPC)
Nodes - processes on the system (registered with the ROS master node)
Topics - publish-subscribe communication (TCP/IP usually...)
cam_image arm_pose
Camera Arm Tracker Control
Node Node Policy Node
joint_cmd
cur_joint_state
Joint Arm
Encoder Controller
Node Node
Nodes
Primary construct in ROS
very simple (e.g repackage some data stream into a more useful data type)
to very complex (e.g. take visual data, extract features, plan a desired task
space trajectory, perform feedback control to track the trajectory)
Topics and Messages
Topics
transport strongly-typed messages between nodes
publishers publish to a named topic (e.g. joint_state)
subscribers subscribe to a topic
can have multiple publishers or subscribers on the
same topic
Beer
Detector
Node
Camera cam_image
Node
Obstacle
Avoidance
Node
Messages
Messages
typed structures (specified in a txt file)
built from primitive types
hierarchical structure can get complicated
standard header: time, seq, frame_id
Example:
string object_name
int object_height
geometry_msgs/Pose object_pose
Format:
field1 req1
field2 req2
---
field3 res1
field4 res2
Parameter Server
Shared dictionary of variables between all nodes
Services - message passing which blocks until the receiving node finishes and
returns a result
cam_image arm_pose
Camera Arm Tracker Control
Node Node Policy Node
joint_cmd
cur_joint_state
Parameter Server:
"jakes_g" = 9.7 Joint Arm
"/left_arm/joint0/init_pos" = Encoder Controller
0.2 Node Node
...
Using ROS
Setting up an environment
Can easily install packages in Ubuntu via apt
Need to set certain environmental variables to access command line tools and
navigate the ROS system easily.
These environment variables can get complicated for large projects or many
projects that are switched between. Some tools to help with this, but can get
confusing quickly.
This is where the tutorials & documentation online are better than what I can
offer
Command line tools
Has many tools for interacting with the system:
roscd - easily navigate to different ros packages
> roscd beer_detector_pkg
rosrun - run ROS nodes in other directories from an arbitrary path
> rosrun beer_detector_pkg beer_detector_node.py
roscore - creates the ROS master as well as parameter server and ros output
aggregator
NEEDS TO BE RUN BEFORE RUNNING ROS NODES!
rostopic - get info on current topics running
rosmsg - look up information about available ROS messages (e.g. hz, echo, )
And many others...
Launch Files...make your life easier!
XML files for specifying:
Joints:
Revolute
Prismatic
Fixed - allows for adding arbitrary reference frames
Geometry:
Can define separate visual and (simpler) collision geometries
URDF: Example
rosbag: Logging and Replaying Data
Collects data published over different topics
Can also just log some data (e.g. camera info and joint states)