ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

navsat_transform ignores settings (magnetic_declination and yaw_offset)

asked 2023-06-24 06:10:40 -0500

Dan__2022 gravatar image

updated 2023-06-24 06:30:10 -0500

Hi! the actual navsat_transform lacks documentation, (http://docs.ros.org/en/noetic/api/rob... 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 " broadcast_cartesian_transform_: 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 ekf_filter_node)* Thanks!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2023-06-24 08:56:00 -0500

Dan__2022 gravatar image

updated 2023-06-24 08:56:28 -0500

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.

edit flag offensive delete link more
0

answered 2023-06-24 08:18:09 -0500

sdu568 gravatar image

If you checkout the github parameter file in (https://github.com/cra-ros-pkg/robot_...), It should be "magnetic_declination_radians" and "yaw_offset"

edit flag offensive delete link more

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."

Dan__2022 gravatar image Dan__2022  ( 2023-06-24 08:38:34 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2023-06-24 06:10:40 -0500

Seen: 69 times

Last updated: Jun 24 '23