diff --git a/src/hangar_sim/config/config.yaml b/src/hangar_sim/config/config.yaml
index feddea7ab..20911b77f 100644
--- a/src/hangar_sim/config/config.yaml
+++ b/src/hangar_sim/config/config.yaml
@@ -92,12 +92,12 @@ ros2_control:
- "force_torque_sensor_broadcaster"
- "imu_sensor_broadcaster"
- "joint_state_broadcaster"
- - "platform_velocity_controller"
+ - "platform_velocity_controller_nav2"
- "vacuum_gripper"
# Load but do not start these controllers so they can be activated later if needed.
controllers_inactive_at_startup:
- "joint_trajectory_controller"
- - "platform_velocity_controller_nav2"
+ - "platform_velocity_controller"
- "velocity_force_controller"
- "arm_only_velocity_force_controller"
- "joint_velocity_controller"
diff --git a/src/hangar_sim/config/control/picknik_ur.ros2_control.yaml b/src/hangar_sim/config/control/picknik_ur.ros2_control.yaml
index 995815a5f..ed8a4a0b3 100644
--- a/src/hangar_sim/config/control/picknik_ur.ros2_control.yaml
+++ b/src/hangar_sim/config/control/picknik_ur.ros2_control.yaml
@@ -37,26 +37,25 @@ platform_velocity_controller:
interface_name: velocity
command_joint_names: ["front_left_wheel", "rear_left_wheel", "rear_right_wheel", "front_right_wheel"]
reference_joint_names: ["linear_x_joint", "linear_y_joint", "rotational_yaw_joint"]
- body_frame_control: false
- body_frame_yaw_joint: "rotational_yaw_joint"
+ body_frame_control: true
front_left_wheel_command_joint_name: "front_left_wheel"
front_right_wheel_command_joint_name: "front_right_wheel"
rear_right_wheel_command_joint_name: "rear_right_wheel"
rear_left_wheel_command_joint_name: "rear_left_wheel"
- kinematics.wheels_radius: 0.05
- kinematics.sum_of_robot_center_projection_on_X_Y_axis: 0.4704
+ kinematics.wheels_radius: 0.0666
+ kinematics.sum_of_robot_center_projection_on_X_Y_axis: 0.59
wheel_separation_multiplier: 1.0
wheel_radius_multiplier: 1.0
publish_rate: 50.0
- reference_timeout: 0.1
+ reference_timeout: 0.5
use_stamped_vel: False
- pose_covariance_diagonal: [0.001, 0.001, 1000000.0, 1000000.0, 1000000.0, 0.03]
- twist_covariance_diagonal: [0.001, 0.001, 0.001, 1000000.0, 1000000.0, 0.03]
+ pose_covariance_diagonal: [0.1, 0.1, 1000000.0, 1000000.0, 1000000.0, 0.5]
+ twist_covariance_diagonal: [0.1, 0.1, 0.1, 1000000.0, 1000000.0, 0.5]
- cmd_vel_timeout: 0.5
+ cmd_vel_timeout: 5.0
base_frame_id: "ridgeback_base_link"
odom_frame_id: "odom"
@@ -105,19 +104,19 @@ platform_velocity_controller_nav2:
rear_right_wheel_command_joint_name: "rear_right_wheel"
rear_left_wheel_command_joint_name: "rear_left_wheel"
- kinematics.wheels_radius: 0.05
- kinematics.sum_of_robot_center_projection_on_X_Y_axis: 0.4704
+ kinematics.wheels_radius: 0.0666
+ kinematics.sum_of_robot_center_projection_on_X_Y_axis: 0.59
wheel_separation_multiplier: 1.0
wheel_radius_multiplier: 1.0
publish_rate: 50.0
- reference_timeout: 0.1
+ reference_timeout: 0.5
use_stamped_vel: False
pose_covariance_diagonal: [0.001, 0.001, 1000000.0, 1000000.0, 1000000.0, 0.03]
twist_covariance_diagonal: [0.001, 0.001, 0.001, 1000000.0, 1000000.0, 0.03]
- cmd_vel_timeout: 0.5
+ cmd_vel_timeout: 5.0
base_frame_id: "ridgeback_base_link"
odom_frame_id: "odom"
@@ -239,7 +238,7 @@ joint_trajectory_controller:
ff_velocity_scale: 1.0
constraints:
stopped_velocity_tolerance: 0.0
- goal_time: 0.0
+ goal_time: 5.0
shoulder_pan_joint:
goal: 0.05
shoulder_lift_joint:
@@ -253,11 +252,11 @@ joint_trajectory_controller:
wrist_3_joint:
goal: 0.05
linear_x_joint:
- goal: 0.05
+ goal: 0.1
linear_y_joint:
- goal: 0.05
+ goal: 0.1
rotational_yaw_joint:
- goal: 0.05
+ goal: 0.1
acceleration_limits:
shoulder_pan_joint: 10.0
@@ -282,7 +281,14 @@ force_torque_sensor_broadcaster:
imu_sensor_broadcaster:
ros__parameters:
sensor_name: imu_site
- frame_id: imu_link
+ frame_id: ridgeback_base_link
+ # Static covariance values (row-major 3x3 matrices)
+ # Orientation covariance (rad^2)
+ static_covariance_orientation: [0.001, 0.0, 0.0, 0.0, 0.001, 0.0, 0.0, 0.0, 0.001]
+ # Angular velocity covariance (rad/s)^2
+ static_covariance_angular_velocity: [0.01, 0.0, 0.0, 0.0, 0.01, 0.0, 0.0, 0.0, 0.01]
+ # Linear acceleration covariance (m/s^2)^2
+ static_covariance_linear_acceleration: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
velocity_force_controller:
diff --git a/src/hangar_sim/config/fuse/fuse.yaml b/src/hangar_sim/config/fuse/fuse.yaml
index db8a0d8a1..3a9ad2b43 100644
--- a/src/hangar_sim/config/fuse/fuse.yaml
+++ b/src/hangar_sim/config/fuse/fuse.yaml
@@ -1,5 +1,5 @@
# Mobile base localization configuration using fuse
-# Using 3D odometry model for wheel odometry-based pose estimation
+# Ground vehicle state estimation: wheel odometry + IMU
state_estimator:
ros__parameters:
# Fixed-lag smoother configuration
@@ -15,7 +15,10 @@ state_estimator:
mobile_base_motion:
# Process noise for state variables
# Order: x, y, z, roll, pitch, yaw, vx, vy, vz, vroll, vpitch, vyaw, ax, ay, az
- process_noise_diagonal: [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 1.0, 1.0, 1.0]
+ # z, roll, pitch and their derivatives are near-zero for a ground robot.
+ #process_noise_diagonal: [0.25, 0.25, 0.00001, 0.00001, 0.00001, 0.25
+ # -, 0.1, 0.1, 0.00001, 0.00001, 0.0001, 0.1, 0.0001, 0.0001, 0.00001]
+ process_noise_diagonal: [1.0, 1.0, 0.0001, 0.0001, 0.0001, 0.5, 0.5, 0.5, 0.0001, 0.0001, 0.0001, 0.25, 0.00001, 0.00001, 0.00001]
sensor_models:
initial_localization_sensor:
@@ -25,32 +28,48 @@ state_estimator:
wheel_odom_sensor:
type: fuse_models::Odometry3D
motion_models: [mobile_base_motion]
+ imu_sensor:
+ type: fuse_models::Imu3D
+ motion_models: [mobile_base_motion]
initial_localization_sensor:
publish_on_startup: true
# Order: x, y, z, roll, pitch, yaw, vx, vy, vz, vroll, vpitch, vyaw, ax, ay, az
initial_state: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
- initial_sigma: [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1]
+ # Order: x, y, z, roll, pitch, yaw, vx, vy, vz, vroll, vpitch, vyaw, ax, ay, az
+ # z and its derivatives start with very tight sigma — ground robot stays on the plane.
+ initial_sigma: [0.1, 0.1, 0.001, 0.01, 0.01, 0.1, 0.1, 0.1, 0.001, 0.01, 0.01, 0.1, 0.001, 0.001, 0.001]
+ # Wheel odometry — provides translation (x, y) and yaw
+ # Using differential mode because platform_velocity_controller/odom is
+ # wheel-integrated odometry that drifts over time. Differential mode fuses
+ # only the relative change between consecutive messages, preventing
+ # accumulated drift from corrupting the estimate.
wheel_odom_sensor:
- # Using /odom_reliable from QoS relay (bridges BEST_EFFORT to RELIABLE)
- topic: /odom_reliable
+ topic: /platform_velocity_controller_nav2/odom
queue_size: 10
- # 2D position from wheels (no z)
- position_dimensions: ['x', 'y']
- # Heading only
+ pose_loss:
+ type: fuse_loss::HuberLoss
+ a: 1.0
+ linear_velocity_loss:
+ type: fuse_loss::HuberLoss
+ a: 1.0
+ position_dimensions: ['x', 'y', 'z']
orientation_dimensions: ['yaw']
- # Forward velocity
- linear_velocity_dimensions: ['x']
- # Turn rate
+ linear_velocity_dimensions: ['x', 'y']
angular_velocity_dimensions: ['yaw']
- # Use relative constraints (pose changes rather than absolute poses)
differential: true
- # Covariances - use large values for unused dimensions
- # Order: x, y, z, roll, pitch, yaw
- pose_covariance_diagonal: [0.05, 0.05, 1e9, 1e9, 1e9, 0.05]
- # Order: vx, vy, vz, vroll, vpitch, vyaw
- twist_covariance_diagonal: [0.05, 1e9, 1e9, 1e9, 1e9, 0.05]
+ independent: false
+ use_twist_covariance: true
+
+ # IMU sensor — provides orientation and yaw rate
+ # - Roll/pitch/yaw orientation (absolute, covariance 0.001 vs wheel odom 0.5)
+ # - Yaw angular velocity from gyroscope
+ imu_sensor:
+ topic: /imu_sensor_broadcaster/imu_reliable
+ orientation_dimensions: ['roll', 'pitch', 'yaw']
+ angular_velocity_dimensions: ['yaw']
+ queue_size: 10
# Publish filtered odometry
publishers:
@@ -59,8 +78,8 @@ state_estimator:
filtered_publisher:
topic: 'odom_filtered'
- base_link_frame_id: 'base_footprint'
- base_link_output_frame_id: 'base_footprint'
+ base_link_frame_id: 'ridgeback_base_link'
+ base_link_output_frame_id: 'ridgeback_base_link'
odom_frame_id: 'odom'
map_frame_id: 'map'
world_frame_id: 'odom'
diff --git a/src/hangar_sim/description/front_left_wheel_link.xml b/src/hangar_sim/description/front_left_wheel_link.xml
index f06fcf854..9d16b089f 100644
--- a/src/hangar_sim/description/front_left_wheel_link.xml
+++ b/src/hangar_sim/description/front_left_wheel_link.xml
@@ -2,356 +2,238 @@