Setting Up TF Messages

The TF message provided within MORAI SIM is based on the tf transform package used in ROS. Currently, TF is only available when using ROS connections with MORAI SIM. To begin building a TF message, access the ROS publisher menu within the Network Settings menu.

TF2Publisher

  • Message Type: tf2_msgs/TFMessage

  • Default Topic: /tf

  • FrameID: /map

  • ChildFrameID: /base_link

TF2Publisher runs a coordinate transformation between the main FrameID and a component ChildFrameID. The default frame IDs are shown in the detailed breakdown above.

Set the FrameID to the map coordinate system, and the ChildFrameID to the vehicle coordinate system. The default values should do this automatically.

Once the TF publisher is set up, any sensors added to the vehicle will be added to the TF message by their FrameID, which can be changed in the property window for each individual sensor.

If no sensors are attached, only the vehicle’s coordinate system transform is generated by TF.

TF Functionality Check

Once a series of TF publishers are created, you can visually verify the TFs through tools such as ROS RViz.

The example below shows the locations of each sensor’s origin with respect to the vehicle’s coordinate system.