Ask Your Question
0

Transform different to its own inverse

asked 2017-05-15 01:43:20 -0600

ufr3c_tjc gravatar image

When configuring robot_localization today I came across a weird phenomenon which is, I think, an error. I'm using navsat_transform_node to take in our GPS data, and I have the broadcast_utm_transform parameter set to true. When using tf_monitor to view the transforms utm -> map and map -> utm, they actually differ in translational value, and one is not the negative of the other. See here for the result of tf_monitor. The time says '0.000', meaning it is a static transform, so it doesn't seem like it can be multiple publishers.

robot_localization.launch

  <node name="NavSatTransform" pkg="robot_localization" type="navsat_transform_node" respawn="true" output="screen">
    <param name="magnetic_declination_radians" value="0.1917"/>
    <param name="yaw_offset" value="0"/>
    <param name="broadcast_utm_transform" value="true"/>
    <param name="broadcast_utm_transform_as_parent_frame" value="true"/>
    <param name="delay" value="5"/>
    <param name="wait_for_datum" value="false"/>
    <param name="use_odometry_yaw" value="false"/>
    <param name="publish_filtered_gps" value="false"/>
    <param name="zero_altitude" value="true"/>
    <remap from="/gps/fix" to="phidgets_gps/data"/>
    <remap from="/imu/data" to="phidgets_imu/data_filtered"/>
    <remap from="/odometry/filtered" to="robot_localization_all/odom"/>
    <remap from="/odometry/gps" to="phidgets_gps/data_filtered"/>
    <rosparam param="datum">[-27.454919, 153.029867, 0.0]</rosparam>
  </node>

  <node name="RobotLocalizationCts" pkg="robot_localization" type="ekf_localization_node" respawn="true" output="screen">
    <param name="frequency" value="10"/>
    <param name="print_diagnostics" value="true"/>
    <param name="sensor_timeout" value="3"/>
    <param name="two_d_mode" value="true"/>
    <param name="publish_tf" value="true"/>
    <param name="publish_acceleration" value="false"/>
    <param name="map_frame" value="map"/>
    <param name="odom_frame" value="odom"/>
    <param name="base_link_frame" value="base_footprint"/>
    <param name="world_frame" value="odom"/>
    <remap from="set_pose" to="robot_localization_cts/set_pose"/>
    <remap from="odometry/filtered" to="robot_localization_cts/odom"/>
    <param name="odom0" value="tracks_diff_drive_with_position_controller/odom"/>
    <rosparam param="odom0_config">[false, false, false,
                                    false, false, false,
                                    true,  true,  true,
                                    false, false, true,
                                    false, false, false]</rosparam>
    <param name="odom0_differential" value="false"/>
    <param name="odom0_relative" value="false"/>
    <param name="odom0_queue_size" value="10"/>
    <param name="imu0" value="phidgets_imu/data_filtered"/>
    <rosparam param="imu0_config">[false, false, false,
                                   true,  true,  true,
                                   false, false, false,
                                   true,  true,  true,
                                   true,  true,  true,]</rosparam>
        <param name="imu0_differential" value="false"/>
        <param name="imu0_relative" value="false"/>
        <param name="imu0_remove_gravitational_acceleration" value="true"/>
        <param name="imu0_queue_size" value="10"/>
  </node>

  <node name="RobotLocalizationAll" pkg="robot_localization" type="ekf_localization_node" respawn="true" output="screen">
    <param name="frequency" value="10"/>
    <param name="sensor_timeout" value="3"/>
    <param name="two_d_mode" value="true"/>
    <param name="publish_tf" value="true"/>
    <param name="publish_acceleration" value="false"/>
    <param name="map_frame" value="map"/>
    <param name="odom_frame" value="odom"/>
    <param name="base_link_frame" value="base_footprint"/>
    <param name="world_frame" value="map"/>
    <remap from="set_pose" to="robot_localization_all/set_pose"/>
    <remap from="odometry/filtered" to="robot_localization_all/odom"/>
    <param name="odom0" value="tracks_diff_drive_with_position_controller/odom"/>
    <rosparam param="odom0_config">[false, false, false,
                                    false, false, false,
                                    true,  true,  true,
                                    false, false, true,
                                    false, false, false]</rosparam>
    <param name="odom0_differential" value="false"/>
    <param name="odom0_relative" value="false"/>
    <param name="odom0_queue_size" value="10"/>
    <param name="odom1" value="phidgets_gps/data_filtered"/>
    <rosparam param="odom1_config">[true,  true,  false,
                                    false, false, false,
                                    false, false, false,
                                    false, false, false,
                                    false, false, false]</rosparam>
    <param name="odom1_differential" value="false"/>
    <param name="odom1_relative" value="false"/>
    <param name="odom1_queue_size" value="10"/>
    <param name ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2017-05-15 02:20:29 -0600

rbbg gravatar image

This seems to be correct. The translation is not the same because there is a slight rotation in this transform. In that case, the translation does not need to be negative of the inverse transform. For a visual explanation, consider the following picture:

image description

When expressing the location of frame_1 in the coordinates of frame_0 and vice versa, you can see that the norm will be the same, but the direction of the vector won't be. (In this case, the T vector of frame_0 expressed in frame_1 will be almost aligned with the -X1 axis, as opposed to the direction of the negative of the drawn T vector.)

Hope that helps.

edit flag offensive delete link more

Comments

Yes yes of course. I guess I hadn't come across a transform with a rotation before, and it is late in the day here so my brain couldn't fathom it. Thanks for that!

ufr3c_tjc gravatar imageufr3c_tjc ( 2017-05-15 02:39:26 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-05-15 01:43:20 -0600

Seen: 83 times

Last updated: May 15 '17