Lecture 1
Lecture 1
Introduction to ROS
Course 1
Course 2 Course 4
ROS package structure ROS services
Integration and programming with Eclipse ROS actions (actionlib)
ROS C++ client library (roscpp) ROS time
ROS subscribers and publishers ROS bags
ROS parameter server
RViz visualization
Exercise 1 Exercise 5
Exercise 2 Exercise 3 Exercise 4
ros.org
Peer to peer
Individual programs communicate over defined API (ROS messages, services, etc.).
Distributed
Programs can be run on multiple computers and communicate over the network.
Multi-lingual
ROS modules can be written in any language for which a client library exists (C++, Python,
MATLAB, Java, etc.).
Light-weight
Stand-alone libraries are wrapped around with a thin ROS layer.
Free and open-source
Most ROS software is open-source and free to use.
More info
http://wiki.ros.org/Master
geometry_msgs/PoseStamped.msg
geometry_msgs/Point.msg
std_msgs/Header header
float64 x uint32 seq
float64 y time stamp
float64 z string frame_id
geometry_msgs/Pose pose
geometry_msgs/Point position
sensor_msgs/Image.msg float64 x
float64 y
std_msgs/Header header float64 z
uint32 seq geometry_msgs/Quaternion
time stamp orientation
string frame_id float64 x
uint32 height float64 y
uint32 width float64 z
string encoding float64 w
uint8 is_bigendian
uint32 step
uint8[] data
!
Whenever you build a new package, update your environment More info
http://wiki.ros.org/catkin/Tutorials
> source devel/setup.bash https://catkin-tools.readthedocs.io/
The source space contains The build space is where The development (devel)
the source code. This is where CMake is invoked to build the space is where built targets
you can clone, create, and packages in the source are placed (prior to being
edit source code for the space. Cache information and installed).
packages you want to build. other intermediate files are
kept here.
Already
setup in the
More info provided
http://catkin-tools.readthedocs.io/en/latest/verbs/catkin_config.html
http://catkin-tools.readthedocs.io/en/latest/cheat_sheet.html installation.
Note: You could also directly clone to your catkin workspace, but using a
common git folder is convenient if you have multiple catkin workspaces.
More info
http://wiki.ros.org/roslaunch
talker_listener.launch
!
<launch> Notice the syntax difference
<node name="listener" pkg="roscpp_tutorials" type="listener" output="screen"/>
<node name="talker" pkg="roscpp_tutorials" type="talker" output="screen"/>
for self-closing tags:
</launch> <tag></tag> and <tag/>
More info
http://wiki.ros.org/roslaunch/XML/arg
Pter Fankhauser | 20.02.2017 | 29
ROS Launch
Including Other Launch Files
range_world.launch (simplified)
<?xml version="1.0"?>
<launch>
<arg name="use_sim_time" default="true"/>
<arg name="world" default="gazebo_ros_range"/>
Include other launch files with <include> tag to <arg name="debug" default="false"/>
organize large projects <arg name="physics" default="ode"/>
More info
http://wiki.ros.org/roslaunch/XML/include
Pter Fankhauser | 20.02.2017 | 30
Gazebo Simulator
Object tree Toolbar
Simulate 3d rigid-body dynamics
Simulate a variety of sensors including noise
3d visualization and user interaction
Includes a database of many robots and
environments (Gazebo worlds)
Provides a ROS interface
Extensible with plugins