Skip to content

VehicleStatusSensor#

Introduction#

VehicleStatusSensor is a component that is designed to aggregate information about the current state of the vehicle. It aggregates information about:

  • Control mode - currently active control mode, e.g. AUTONOMOUS or MANUAL.
  • Gear status - currently engaged gearbox gear, e.g. DRIVE or REVERSE.
  • Steering status - current angle of the steering tire in radians left, e.g. 0.1745 (10°).
  • Turn indicators status - current status of the direction indicators, e.g. DISABLE or ENABLE_LEFT.
  • Hazard lights status - current status of the hazard lights, e.g. DISABLE or ENABLE.
  • Velocity status - current lateral, longitudinal and heading velocities values, e.g {0.2, 0.0, 0.0}.

Prefab#

Prefab can be found under the following path:

Assets/AWSIM/Prefabs/Sensors/VehicleStatusSensor.prefab

This sensor is added directly to the URDF link in the EgoVehicle prefab.

link

A detailed description of the URDF structure and sensors added to prefab Lexus RX450h 2015 is available in this section.

Components#

components

All features are implemented within the Vehicle Report Ros2 Publisher (script) which can be found under the following path:

Assets/AWSIM/Prefabs/Sensors/*

Vehicle Report Ros2 Publisher (script)#

script

The script is responsible for updating and publishing each of the aggregated data on a separate topic. Therefore, it has 6 publishers publishing the appropriate type of message with a constant frequency - one common for all data.

Elements configurable from the editor level#

  • * Report Topic - topic on which suitable type of information is published
    (default: listed in the table below)
  • Publish Hz - frequency of publications on each topic
    (default: 30Hz)
  • Frame ID - frame in which data is published, used in Header
    (default: base_link)
  • QoS- Quality of service profile used in the publication
    (default assumed as "system_default": Reliable, Volatile, Keep last/1)
  • Vehicle - the object from which all published data are read
    (default: None)

Vehicle configuration

An important element of the script configuration that must be set is the scene Object (Vehicle). It will be used for reading all the data needed. The appropriate EgoVehicle object should be selected.

If you can't select the right object, make sure it's set up correctly - it has got added all the scripts needed for EgoVehicle.

Published topics#

  • Frequency: 30Hz
  • QoS: Reliable, Volatile, Keep last/1
Category Topic Message type frame_id
Control mode /vehicle/status/control_mode autoware_auto_vehicle_msgs/ControlModeReport -
Gear status /vehicle/status/gear_status autoware_auto_vehicle_msgs/GearReport -
Steering status /vehicle/status/steering_status autoware_auto_vehicle_msgs/SteeringReport -
Turn indicators status /vehicle/status/turn_indicators_status autoware_auto_vehicle_msgs/TurnIndicatorsReport -
Hazard lights status /vehicle/status/hazard_lights_status autoware_auto_vehicle_msgs/HazardLightsReport -
Velocity status /vehicle/status/velocity_status autoware_auto_vehicle_msgs/VelocityReport base_line