Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SerializedPublisher not being able to read it's parameters #311

Merged

Conversation

sloretz
Copy link
Collaborator

@sloretz sloretz commented Jan 28, 2023

Part of #276

This fixes SerializedPublisher not being able to read it's parameters in ROS 2.

@svwilliams FYI

here's an updated fuse_simple_tutorial.yaml that shows how to pass parameters to it

state_estimator:
  ros__parameters:
    # Fixed-lag smoother configuration
    optimization_frequency: 20.0
    transaction_timeout: 0.01
    lag_duration: 0.5

    motion_models:
      unicycle_motion_model:
        type: fuse_models::Unicycle2D

    unicycle_motion_model:
      #                         x      y      yaw    vx     vy     vyaw   ax   ay
      process_noise_diagonal: [0.100, 0.100, 0.100, 0.100, 0.100, 0.100, 0.1, 0.1]

    sensor_models:
      initial_localization_sensor:
        type: fuse_models::Unicycle2DIgnition
        motion_models: [unicycle_motion_model]
        ignition: true
      odometry_sensor:
        type: fuse_models::Odometry2D
        motion_models: [unicycle_motion_model]
      imu_sensor:
        type: fuse_models::Imu2D
        motion_models: [unicycle_motion_model]

    initial_localization_sensor:
      publish_on_startup: true
      #                x      y      yaw    vx     vy     vyaw    ax     ay
      initial_state: [0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000]
      initial_sigma: [0.100, 0.100, 0.100, 0.100, 0.100, 0.100, 0.100, 0.100]

    odometry_sensor:
      topic: "odom"
      twist_target_frame: "base_footprint"
      linear_velocity_dimensions: ['x', 'y']
      angular_velocity_dimensions: ['yaw']

    imu_sensor:
      topic: "imu"
      angular_velocity_dimensions: ['yaw']
      linear_acceleration_dimensions: ['x', 'y']
      twist_target_frame: "base_footprint"

    publishers:
      filtered_publisher:
        type: fuse_models::Odometry2DPublisher
      serialized_publisher:
        type: fuse_publishers::SerializedPublisher

    filtered_publisher:
      topic: "odom_filtered"
      base_link_frame_id: "base_footprint"
      odom_frame_id: "odom"
      map_frame_id: "map"
      world_frame_id: "odom"
      publish_tf: true
      publish_frequency: 10.0

    serialized_publisher:
      frame_id: "odom"

Signed-off-by: Shane Loretz <sloretz@google.com>
@sloretz sloretz mentioned this pull request Jan 28, 2023
@methylDragon
Copy link
Collaborator

methylDragon commented Jan 28, 2023

This PR made me realize that I need to namespace the publisher params too (for pose and path publishers)... I'll send a separate PR for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants