0% found this document useful (0 votes)
50 views23 pages

Coordinate Transforms

The document discusses key concepts for robotics software including 3D geometry, ROS conventions for coordinate frames and transforms, and the ROS transform library. It covers frames of reference, Cartesian coordinates, poses, roll pitch yaw and other orientation representations, ROS standard frames, TF broadcasters, and how the transform library converts between frames through affine transformations involving translation and rotation.

Uploaded by

mike mike
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views23 pages

Coordinate Transforms

The document discusses key concepts for robotics software including 3D geometry, ROS conventions for coordinate frames and transforms, and the ROS transform library. It covers frames of reference, Cartesian coordinates, poses, roll pitch yaw and other orientation representations, ROS standard frames, TF broadcasters, and how the transform library converts between frames through affine transformations involving translation and rotation.

Uploaded by

mike mike
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Coordinate Transforms

Overview
3-dimensional geometry
ROS conventions
ROS transform library
Frames of Reference
robots sense objects in the physical world
need positions and orientations over time
a frame of reference provides a physical
representation for observations
provides a coordinate system
may move with an observer or sensor
Cartesian Coordinates
three numbers describe any point in 3-
dimensional space
the frame of reference defines an origin for
those coordinates
the “right hand rule” determines their signs
Right Hand Rule
There are several variants.
This one is used in robotics:
Poses
a point has no orientation
a rigid body has a pose with both position and
orientation
orientation uses several representations:
Euler angles: roll, pitch and yaw
rotation matrix
quaternion
Roll, Pitch and Yaw
Right Hand Rule for Rotation
thumb is axis of rotation
positive rotation follows fingers
angles are in radians
Problems with Roll, Pitch and Yaw
the order of the angles
affects the rotation
some sequences do
not work for some
angles (“gimbal lock”)
Other Representations
rotation matrix
3 x 3 matrix
no gimbal lock
multiple rotations via multiplication
quaternion
four numbers
no gimbal lock
multiple rotations via multiplication
ROS Conventions
Described in REP-0103, key concepts:
all angles are in radians
all coordinate frames are right-handed
standard axis orientation:
x forward
y left
z up
orientations are quaternions
ROS Message Header
many ROS messages have a Header
std_msgs/Header fields:
time stamp
string frame_id
these fields describe the time and frame of
reference for the message data
ROS Frames of Reference
robots have many coordinate frames
each frame identifier is a string:
map
odom
base_footprint
base_link
frames for specific robots may use a prefix
robot1/base_link
Common ROS Coordinate Frames
REP-0105 specifies standard coordinate
frames for mobile robots:
map is fixed in the world
odom is the world as measured by odometry
base_link is rigidly attached to the robot base
the graph of reference frames is a tree
not always natural, but efficient to process
map -> odom -> base_link
TF Broadcasters
localization publishes map -> odom
odometry publishes odom -> base_link
per-robot nodes broadcast the frames of
various sensors:
base_link -> nav_hokuyo_laser_link
base_link -> kinect_camera_depth_frame
base_link -> kinect_camera_rgb_frame
Optical Frames
Computer vision has different conventions:
X is right
Y is down
Z is forward
ROS optical frames use “_optical” suffix:
kinect_camera_rgb_frame ->
kinect_camera_rgb_optical_frame
useful with opencv
ROS Transform Library
essential for sharing robot software
distributed interface
collects transforms from broadcaster nodes
publishes them for listener nodes
converts points and poses between frames
higher-level interfaces transform ROS
messages into any known frame
Frame of Reference Conversion
involves translation and rotation
this is an affine transformation
the ROS library does both with a single matrix
multiplication
Transform Library Versions
two packages: tf and tf2
http://wiki.ros.org/tf
http://wiki.ros.org/tf2
hydro uses tf2 as underlying implementation
the older tf interface is still supported
tf2 documentation is less complete
we will use the tf API for these examples
Useful TF Commands
rosrun tf tf_monitor
rosrun tf tf_echo
rosrun tf view_frames
Visualizing Frames of Reference
run segbot simulation:
see BWI wiki tutorial
roslaunch segbot_gazebo segbot_navigation.launch
add TF display
show axes (right hand rule):
X is red (forefinger)
Y is green (middle finger)
Z is blue (thumb)
Working the TF Tutorials
http://wiki.ros.org/tf/Tutorials
Introduction to tf
Writing a tf broadcaster
Writing a tf listener
Summary
Robot software must share many common
concepts for package sharing to work:
3D geometry
ROS conventions
ROS transform library

You might also like