Simulates encoder velocity, IMU, and INS sensors for testing the stack without real hardware. Subscribes to cmd_vel, integrates velocity into a ground-truth pose, and publishes noisy sensor measurements that mimic real hardware behavior.
Sensor noise is modeled using two components: per-sample Gaussian white noise for instantaneous measurement error, and Ornstein-Uhlenbeck (OU) processes for slow-drifting correlated errors (e.g. scale factor bias on encoders, multipath drift on GPS). OU processes are mean-reverting, so errors stay bounded over time rather than growing without bound like a random walk.
- Integrates
cmd_velusing 2D unicycle kinematics (Euler integration) atupdate_period_s - Velocity is zeroed if no
cmd_velis received withincmd_vel_timeout_s - Robot starts at map position
(0, 0)with headinginitial_yaw_rad - All coordinates are ENU (East-North-Up): yaw=0 faces east, positive yaw is counter-clockwise
- Publishes
TwistWithCovarianceStampedin thebase_frame_idframe - Applies OU multiplicative scale-factor drift and per-sample Gaussian white noise (measurement model documented in
EncVelConfig) - Reported covariance is state-dependent:
var = noise_std^2 + (measurement * drift_std)^2
The VN-300 is modeled as a single sensor: all four outputs draw from shared error states (per-quantity mapping documented in Vn300Config), so gps, imu, ins_vel, and odom stay mutually consistent like the real hardware's Kalman filter output.
- Applies additive OU drift and per-sample Gaussian white noise per quantity (measurement model documented in
Vn300Config). Unlike the encoder's multiplicative drift, position and yaw drift accumulate even while stationary - Reported covariance is fixed rather than state-dependent:
var = noise_std^2 + drift_std^2per quantity; the IMU reports no linear-acceleration estimate (covariance-1)
- Publishes
Imuin theimu_frame_idframe - Reports absolute orientation (yaw in ENU, relative to true north) and body-frame angular velocity z
- Looks up
base_frame_id->imu_frame_idto apply the mounting offset to the robot's true yaw
- Publishes
NavSatFixin theins_frame_idframe (not the physical antenna) - This is the Kalman filter fused GPS output rather than the raw antenna output
- ENU position is converted to WGS84 lat/lon/alt using a local topocentric projection anchored at
datum
- Publishes
TwistWithCovarianceStampedin theins_frame_idframe - Reports body-frame linear.x and angular.z
- Publishes
Odometryin themapframe withchild_frame_id = ins_frame_id
cmd_vel(geometry_msgs/TwistStamped) - Velocity commands
enc_vel(geometry_msgs/TwistWithCovarianceStamped) - Simulated encoder velocity inbase_frame_idimu(sensor_msgs/Imu) - Simulated VN-300 IMU inimu_frame_idgps(sensor_msgs/NavSatFix) - Simulated VN-300 GPS fix inins_frame_idins_vel(geometry_msgs/TwistWithCovarianceStamped) - Simulated VN-300 INS velocity inins_frame_idodom(nav_msgs/Odometry) - Simulated VN-300 INS odometry inmapframeodom/ground_truth(nav_msgs/Odometry) - Noiseless true pose inmapframe (child_frame_id = base_link_ground_truth)
map->base_link_ground_truth- Noiseless true robot pose, broadcast every update
base_link->imu_link- IMU mounting orientation (used to compute yaw offset for IMU topic)