CS 378 - Autonomous Vehicles in Traffic I Week 8b - Transformations - - PowerPoint PPT Presentation

cs 378 autonomous vehicles in traffic i
SMART_READER_LITE
LIVE PREVIEW

CS 378 - Autonomous Vehicles in Traffic I Week 8b - Transformations - - PowerPoint PPT Presentation

CS 378 - Autonomous Vehicles in Traffic I Week 8b - Transformations Announcements I did not go through the 3 single person projects that I were on the slides on Monday Any thoughts about groups or projects yet? Please send emails


slide-1
SLIDE 1

CS 378 - Autonomous Vehicles in Traffic I

Week 8b - Transformations

slide-2
SLIDE 2

Announcements

  • I did not go through the 3 single person projects that I were
  • n the slides on Monday
  • Any thoughts about groups or projects yet?

○ Please send emails to me if you have any questions

  • The rviz problems on the CS machines should now be

resolved.

  • If rviz crashes out unexpectedly or seg faults, remove ~/.

rviz/*

  • There seems to be a problem with rosmake art_run on non

Oneiric systems. Run it without the --rosdep-install flag for now.

slide-3
SLIDE 3

Transformations

  • Transformations have typically played an important role in

robotics and some computer vision applications

  • Important for the idea of sensor registration
  • Can be useful for verifying and understanding sensor

readings.

slide-4
SLIDE 4

Example 1 - Multiple Kinects

[http://www.youtube.com/watch?v=5-w7UXCAUJE]

slide-5
SLIDE 5

Example 2 - Line Detection (RoboCup)

Input from Camera Detection How can we get rid of these spurious readings?

slide-6
SLIDE 6

Example 2 (contd)

How do we perform this projection?

  • Proprioception gives us estimates of all the joints
  • Assuming that the contact foot is on the ground - we can

calculate the position and orientation of the camera w.r.t. to the ground.

slide-7
SLIDE 7

The tf tree - PR2

[Image taken from http://www.ros.org/wiki/tf]

PR2 Robot

Different coordinate represent either joints or other significant points of interest on the robot body. You have to define a given joint relative to some other joint or reference point. For instance, the elbow joint will be described relative to the shoulder joint.

slide-8
SLIDE 8

The tf tree - Marvin

slide-9
SLIDE 9

The tf tree - Marvin

  • How is this useful to us?
  • The tf tree defines the relations between various sensors.
  • Say if we want to fill point cloud data with color?

○ Terminal 1 ■ roscore ○ Terminal 2 ■ rosparam set /use_sim_time true ■ rosbag play --clock <bag-file> ○ Terminal 3 ■ rosrun velodyne_pointcloud cloud_node ■ (Remember to remap topics for older bag files) ○ Terminal 4 ■ rosmake rgb_pointcloud ■ rosrun rgb_pointcloud rgb_pointcloud_publisher _image_transport:=compressed

slide-10
SLIDE 10

Future Ideas

  • Change the tf tree
  • (Automated Surveying) Figure out the correct position of

the SICK Lidars

  • (Automated Surveying) Automated registration of cameras

wrt to velodyne

  • (Velodyne Calibration) Incorporate pitch and roll

determined through the calibration tool into the tf tree.

slide-11
SLIDE 11

Onwards then!

How to use the tf code?

  • Go through the tf tutorials!
  • http://www.ros.org/wiki/tf/Tutorials
  • Even if you are not implementing tf - I recommend

everyone complete the introduction to tf tutorial

○ http://www.ros.org/wiki/tf/Tutorials/Introduction%20to%20tf

What does tf provide?

  • tf maintains the relationship between coordinate frames in

a tree structure buffered in time [http://www.ros.org/wiki/tf]

  • It provides functions to transform points, vectors etc. from a

coordinate frame to another.

  • pcl_tf provides methods for transforming pcl data

structures (yay!)

slide-12
SLIDE 12

Some basic tf tools

  • Viewing the tf tree

○ rosrun tf view_frames ○ evince frames.pdf

  • Viewing a particular transformation

○ rosrun tf tf_echo <source_frame> <target_frame> ○ rosrun tf tf_echo /vehicle /velodyne

  • Publishing a static transform

○ rosrun tf static_transform_publisher x y z yaw pitch roll frame_id child_frame_id period_in_ms ○ rosrun tf static_transform_publisher 5 0 0 0 0 0 /some_ref /vehicle 100

  • All of these are explained with an example in the introduction to tf

tutorial.

slide-13
SLIDE 13

Output of view_frames - Marvin

slide-14
SLIDE 14

Using tf in code

  • Publishing tf information

○ A simple example of publishing tf messages is art_common/src/vehicle_static_tf.cc ○ In this file we publish the same tf tree I showed earlier

  • Keep in mind that there are 2 different conventions:

○ Regular Frame: +x is forward, +y is left, +z is up ○ Optical Frame: +z is forward, +x is right, +y is down ○ Both of these are still following the right handed convention!

slide-15
SLIDE 15

The code

slide-16
SLIDE 16

The code

slide-17
SLIDE 17

The code

slide-18
SLIDE 18

Subscribing to tf

A simple example

  • This is useful for transforming some simple data structures -
  • r looking up the transformations themselves
  • Check out the velodyne_pcl package to transform

pointclouds

slide-19
SLIDE 19

tf, rviz and messages

  • Each message containing sensor data should have a

frame_id corresponding to the tf frame it is in. ○ outMsg.header.frame_id = "some_frame_id"; ○ outMsg.header = inMsgPtr->header; ○ Some of you may be experiencing this problem in Assignment 3

  • Let's play around with tf in rviz.
slide-20
SLIDE 20

Programming Assignment 4 discussion

  • Let's take a look at the camera output from the car