Skip to content

Simulated Vehicle Node

Overview

The Simulated Vehicle Node is part of the Eclipse ADORe project. It simulates a vehicle's dynamics and publishes its state while integrating with other simulated traffic participants. This node provides control interfaces, state publishers, and supports noise injection for simulation fidelity.

Features

  • Vehicle Dynamics Simulation: Simulates a vehicle using a physical model (e.g., bicycle model).
  • Noise Injection: Adds configurable noise to position, velocity, yaw, and acceleration for realistic simulation.
  • State Publishing:
  • Vehicle dynamic state
  • Odometry for localization
  • Traffic participant data
  • Multi-Vehicle Simulation: Subscribes to the states of other vehicles in the simulation to provide context-aware traffic interactions.
  • Control Interfaces:
  • Supports both manual control via teleoperation.
  • Automated vehicle control.

Topics

Published Topics

  1. vehicle_state/dynamic
  2. Message Type: adore_ros2_msgs::msg::VehicleStateDynamic
  3. Description: Publishes the current dynamic state of the simulated vehicle.

  4. vehicle_state/localization

  5. Message Type: nav_msgs::msg::Odometry
  6. Description: Provides odometry data for localization purposes.

  7. vehicle_state/monitor

  8. Message Type: adore_ros2_msgs::msg::StateMonitor
  9. Description: Publishes localization error metrics.

  10. traffic_participants

  11. Message Type: adore_ros2_msgs::msg::TrafficParticipantSet
  12. Description: Publishes the state of surrounding simulated traffic participants.

Subscribed Topics

  1. next_vehicle_command
  2. Message Type: adore_ros2_msgs::msg::VehicleCommand
  3. Description: Receives commands for steering and acceleration.

  4. teleop_controller

  5. Message Type: geometry_msgs::msg::Twist
  6. Description: Accepts manual control inputs for teleoperation.

  7. automation_toggle

  8. Message Type: std_msgs::msg::Bool
  9. Description: Toggles between manual and automated control.

  10. /<namespace>/vehicle_state/localization

  11. Message Type: nav_msgs::msg::Odometry
  12. Description: Subscribes to localization data from other vehicles.

Parameters

Parameter Name Type Default Value Description
controllable bool true Determines if the vehicle is controllable.
set_start_position_x double 0.0 Initial x-coordinate of the vehicle.
set_start_position_y 0.0 double Initial y-coordinate of the vehicle.
set_start_psi 0.0 double Initial yaw angle of the vehicle.
position_noise_stddev double 0.0 Standard deviation for position noise.
velocity_noise_stddev double 0.0 Standard deviation for velocity noise.
yaw_noise_stddev double 0.0 Standard deviation for yaw noise.
acceleration_noise_stddev double 0.0 Standard deviation for acceleration noise.
other_vehicle_namespaces list<string> [] List of other vehicle namespaces.

How It Works

  1. Initialization:
  2. Loads configuration parameters.
  3. Sets up publishers, subscribers, and noise distributions.
  4. Simulation:
  5. Simulates vehicle dynamics using a physical model.
  6. Injects configurable noise into the vehicle state.
  7. Publishing and Subscribing:
  8. Publishes its dynamic state and subscribes to other vehicles' states.
  9. Broadcasts the simulated vehicle's transform for integration with ROS 2 TF.
  10. Traffic Participant Updates:
  11. Computes distances to other vehicles and publishes a list of relevant traffic participants.