Skip to content

Latest commit

 

History

History
166 lines (93 loc) · 8.22 KB

step-1-identify-signals.md

File metadata and controls

166 lines (93 loc) · 8.22 KB

Hack Challenge "Driving Score"

Step 0 - Evaluate SDV Domains

You can choose to use any one of the SDV domains such as Eclipse Leda, or Eclipse Muto (ROS Domain), which will provide you the tools including in-vehicle data collection, sharing data to the cloud as well as building dashboards and widgets to visualize your solutios. Please refer to Step 2: Architecture and Data Flow for potential data flows.

Step 1 - Identify needed input signals

The Vehicle Signal Specification is supported by Eclipse Velocitas and Eclipse Kuksa.VAL Databroker. The Kuksa.VAL DBC Feeder has an example recording of raw vehicle signals in the form of a recorded CAN-Bus network session log file, including the mapping to a specific vehicle model.

It's the easiest way to get simulated data. It's a static recording and will run in a loop though, you won't be able to influence the simulation. However, all of these components can be run in a docker container, which makes it easy and convenient to use - and even run on a headless edge device with a container runtime. In a later step, if you have more time, check out some other vehicle simulators such as CARLA or F1Tenth, maybe you can integrate these as well.

ROS domain can provide you drive data from a simulated racecar driving in race tracks using different maps. You can have the test car drive autonomously with reactive algorithms such as gap follower, time eleastic band (TB) with global and local planners or manually using keyboard or a joystick. F1Tenth.org reactive algorithms such as and simulted vehicles. You can use all the the sensor data published by the simulator and AckermannDrive messages for the information such as the steering angles, velocity etc. [F1Tenth] TODO: Provide a page with quick video descriptions

Vehicle Signals

On digital.auto, you will find a playground for SDV-related use cases and a catalogue of vehicle signals. The beta app contains a CVI catalog of the latest COVESA VSS release and helps you identify standardized vehicle signals:

Example vehicle signals which may be useful for calculating a driving score:

  • Vehicle.Speed
  • Vehicle.AverageSpeed
  • Vehicle.Acceleration
  • Vehicle.Chassis.Axle.Row1.WheelDiameter
  • Vehicle.Chassis.SteeringWheel.Angle
  • Vehicle.Powertrain.Transmission.CurrentGear

Where do I get the Drive Data?

Let's continue with Vehicle.Speed as an example. We provide alternate ways to obtain this information. You can use data from a pre-recorded drive data or you can use an F1Tenth simulated car with autonomous or remote controlled driving. The following sections describe these methods. First using Eclipse Kuksa's DBC Feeder to read some pre-recorded data, and second using Eclipse Muto to start a F1Tenth simulated car.

Run a pre-recorded simulation

We'll be using Eclipse Kuksa's DBC Feeder to read some pre-recorded data and feed it into the data broker, so that we can see how te data looks like.

  1. Run Visual Studio Code task called Start Vehicle App runtime to run runtime services (like Eclipse Kuksa's DBC Feeder or Eclipse Kuksa`s Data Broker) in the correct order.

    • Press F1
    • Select command Tasks: Run Task
    • Select Start VehicleApp runtime
    • Choose Continue without scanning the output

    You should see the tasks run-mosquitto, run-vehicledatabroker, run-vehicleservices and run-feedercan being executed in the Visual Studio Code output panel.

    The terminal of the run-feedercan task should look like:

    More information about the tasks are available here.

  2. Run the VehicleDataBroker-CLI using Visual Studio Code task

    • Press F1
    • Select command Tasks: Run Task
    • Select VehicleDataBroker-CLI
    • Choose Continue without scanning the output

    Type get veh<tab>sp<tab>, which will expand to get Vehicle.Speed

    Use subscribe SELECT Vehicle.Speed WHERE Vehicle.Speed > 0 you would get continuous updates.

In your application, you will access the Eclipse Kuksa Data Broker by its gRPC interface instead of the databroker-cli tool.

Drive Messages from ROS

Muto will make it very easy to start and collect data from the F1Tenth race car. Just follow these steps to get Muto and F1Tenth race car running:

TODO: Add the steps and the video link

Start a simulated racecar with Muto

We'll use a Muto docker image to start a simulated racecar by following the given steps. (The simulation visualization is achieved with Foxglove)

After installing docker on your system;

To start the simulator you will need to provide a name to you simualted car, (i.e. bcx-f1tenth-01), and launch your simulation. Let's assume you named your file example.yaml (you can find a sample here ).

muto:
  REDUCTED FOR BREVITY

  thing:
    namespace: org.eclipse.muto.sandbox.f1tenth # subject to change
    anonymous: False  # Use this for automatically generated id (uuid based - not recommended)
    name: bcx-f1tenth-01 # <------- THIS IS THE NAME TO EDIT - CHOOSE A UNQIE NAME SO THAT YOU DO NOT WRITE OVER SOMEONE ELSE

then just launch Muto simulation with docker:

docker run --name muto-demo --rm -it \
   -v $(pwd)/example.yaml:/home/muto/launch/config/muto.yaml  \
   -p 7777:7777  \
   composiv/muto-demo:noetic-ros-base-focal  \
   /bin/bash -c "source devel/setup.bash && roslaunch launch/demo.launch"

Here you can substitute your own .yaml file for example.yaml using the command above. It replaces the yaml file then runs the simulator.

Now the fun part:

  • Navigate to https://dashboard.composiv.ai/. (If it asks for password, enter ditto for both)
  • In the dashboard go to Vehicles.
  • You need to see that your vehicle is "online" from Vehicles --> Vehicle Panel
  • Select the online vehicle.

Choose a the simulation stack to launch on the car

  • Go to Stacks.
  • For the demonstration select Example - Reactive Gap Follower and click apply.

This will launch the simulation algorithms defined by the stack is on the designated vehicle. Now you should be able to control the stack on the vehicle by clicking start, stop etc.

Visualization and controlling the simulation

Now, we'll run the commmands necessary to visualize the simulation using foxglove studio.

IF you have any issues following the steps above, you can try the following

  • Open your web browser and go to the foxglove webpage.
  • Navigate to Open connection. Use websockets with the value: ws://localhost:7777. (Label 1 in figure above)

Controlling the simulation

Use the publish topic panel (Label 2 in the figure above). Ff the panel is not open add the panel, after selecting publish, type /key into the topic scratch pad. The data type should appear automatically, in case it doesn't, the data type is std_msgs/String

Keystroke inputs for publish panel

  • n : Navigate i.e Autopilot.
  • k : Switch the input device to Keyboard.
  • w : Go Forward.
  • a : Steer Left.
  • s : Go Backward.
  • d : Steer Right.

You can observe the raw messages that rea published to the /drive topic (label 3 in figure above)

Next: Step 2: Architecture and Data Flow