watonomous.github.io

  1. Electrical Division
  2. Electrical Division Home
  3. Radar Driver Group
  4. Software Architecture

[ Electrical Division : Transform ]

Created by [ Frank Yan], last modified on Apr 17, 2020


Table of Contents

Document Overview

There are two transform nodes, one for each radar. These nodes are responsible for offsetting the point-cloud data in Rviz. The reason why there is an offset is to help separate the point-cloud data and to reflect the physical offset for the multi-radar set up. The nodes use the tf package from ROS.

Transform Nodes

The two transform nodes are initialized in the all_radar.launch file. 

Transform Nodes

 <!--TRANSFORM -->
 <node pkg="tf" type="static_transform_publisher" name="radar_right_tf" args="0 -0.5 0 0 0 0 base_link radar_right_frame 100" />

 <node pkg="tf" type="static_transform_publisher" name="radar_left_tf" args="0 0.5 0 0 0 0 base_link radar_left_frame 100" />

Yes, that is all the code necessary for these nodes. Let's take a look at what these two lines mean. 

The first part takes the tf package from ROS and we declare the transform to be a static_transform_publisher. What a static transform publisher does is it always sends the same transform to the point-clouds every time it publishes. The coordinates are not going to change no matter what.

You can then choose to name the nodes. This can be named to whatever you like but choose a name that is obvious and relevant. 

The final part of the tf line is the arguments or args for short. Here is the general template of the arguments for the transform:

Transform Template

x y z yaw pitch roll frame_id child_frame_id period_in_ms

First three arguments are the x, y, and z offsets, and is measured in metres with the negative sign meaning that an object is to the right of the origin point. Roll, pitch, and yaw describe the rotations around each of the x, y, and z axes respectively, and is measured in radians where a negative sign would mean a counter-clockwise rotation. The frame_id is the frame that receives the transforms and applies the transforms. The child_frame_id is the frame that sends the transforms to the frame_id. Finally, the last argument is the period of how often to send the transform and is measured in milliseconds. (100 ms = 10Hz)


After this is all done, the transforms are sent to the RViz node and RViz applies these transforms which visualize the offset between the radars. 

Resources

ROS tf page: http://wiki.ros.org/tf

If you are having trouble with frames or want more information about frames/transforms, take a look at this page: Coordinate Systems

\

Document generated by Confluence on Nov 28, 2021 22:40

Atlassian