Robotics StackExchange | Archived questions

navsat_transform ignores settings (magnetic_declination and yaw_offset)

Hi! the actual navsattransform lacks documentation, (http://docs.ros.org/en/noetic/api/robotlocalization/html/navsattransformnode.html is not up-to-date, seems). I stumbled upon a problem that navsat_transform doesn't take some arguments from yaml settings file. Or maybe I do something wrong or misinterpret the output.

yaml is

navsat_transform:
  ros__parameters:
    use_sim_time: true
    frequency: 10.0
    delay: 30.0
    magnetic_declination_: 0.2008874  
    yaw_offset_: 1.5707963
    zero_altitude_: true
    broadcast_cartesian_transform_: true  
    broadcast_cartesian_transform_as_parent_frame_: true
    base_link_frame_id_: "base_link" 
    world_frame_id_: "map"
    use_manual_datum_: true
    prepareFilteredGps: true
    use_odometry_yaw_: true
    wait_for_datum: true

launched as

pkg_share = launch_ros.substitutions.FindPackageShare(package='sam_bot_description').find('sam_bot_description')

navsat_transform_node = launch_ros.actions.Node(
         package='robot_localization',
         executable='navsat_transform_node',
         name='navsat_transform_node',
         output='screen',
         parameters=[os.path.join(pkg_share, 'config/navsat_transform.yaml'),{'use_sim_time': LaunchConfiguration('use_sim_time')}],
         remappings=[('gps/fix', 'demo/gps'),('imu', 'demo/imu')]
    )

output:

[navsat_transform_node-5] [INFO] [1687603517.801414211] [navsat_transform_node]: Datum (latitude, longitude, altitude) is (...05, ...22,...24)   
[navsat_transform_node-5] [INFO] [1687603517.801490211] [navsat_transform_node]: Datum UTM coordinate is (37U, ...053.81, ...102.65)
[navsat_transform_node-5] [INFO] [1687603517.938109211] [navsat_transform_node]: Corrected for magnetic declination of 0, user-specified offset of 0 and meridian convergence of -0.0255208. Transform heading factor is now -0.025573

Why is it setting "Corrected for magnetic declination of 0" if I set it in yaml to 0.2008874 , and "user-specified offset of 0*" instead of 1.5707963

and it broadcasts no cartesian transforms at all that makes me think that it also ignores " broadcastcartesiantransform_: true " parameter

And i know that it parses the config file as when I do mistakes, it shows parsing errors.

Is it a way to use "debug" to file parameter (like in ekffilternode)* Thanks!

Asked by Dan__2022 on 2023-06-24 06:10:40 UTC

Comments

Answers

If you checkout the github parameter file in (https://github.com/cra-ros-pkg/robot_localization/blob/ros2/params/navsat_transform.yaml), It should be "magnetic_declination_radians" and "yaw_offset"

Asked by sdu568 on 2023-06-24 08:18:09 UTC

Comments

Thanks! I tried tham too first, no success. And in the same github in navsat_transform.cpp file is stated ""Parameter 'broadcast_utm_transform_as_parent_frame' has been " "deprecated. Please use 'broadcast_cartesian_transform_as_parent_frame' instead."

Asked by Dan__2022 on 2023-06-24 08:38:34 UTC

Found it) For those, who has the same problem. In launch file the name of the node was "navsat_transform_node" and in yaml file "navsat_transform" both names should be the same - navsat_transform_node in this case.

Asked by Dan__2022 on 2023-06-24 08:56:00 UTC

Comments