scenic.domains.driving.actions

Actions for dynamic agents in the driving domain.

These actions are automatically imported when using the driving domain.

The RegulatedControlAction is based on code from the CARLA project, licensed under the following terms:

Copyright (c) 2018-2020 CVC.

This work is licensed under the terms of the MIT license. For a copy, see <https://opensource.org/licenses/MIT>.

Summary of Module Members

Classes

OffsetAction

Teleports actor forward (in direction of its heading) by some offset.

RegulatedControlAction

Regulated control of throttle, braking, and steering.

SetBrakeAction

Set the amount of brake.

SetHandBrakeAction

Set or release the hand brake.

SetPositionAction

Teleport an agent to the given position.

SetReverseAction

Engage or release reverse gear.

SetSpeedAction

Set the speed of an agent (keeping its heading fixed).

SetSteerAction

Set the steering ‘angle’.

SetThrottleAction

Set the throttle.

SetVelocityAction

Set the velocity of an agent.

SetWalkingDirectionAction

Set the walking direction.

SetWalkingSpeedAction

Set the walking speed.

SteeringAction

Abstract class for actions usable by agents which can steer.

WalkingAction

Abstract class for actions usable by agents which can walk.

Member Details

class SetPositionAction(pos)[source]

Bases: scenic.core.simulators.Action

Teleport an agent to the given position.

Parameters

pos (scenic.core.vectors.Vector) –

class OffsetAction(offset)[source]

Bases: scenic.core.simulators.Action

Teleports actor forward (in direction of its heading) by some offset.

Parameters

offset (scenic.core.vectors.Vector) –

class SetVelocityAction(xVel, yVel, zVel=0)[source]

Bases: scenic.core.simulators.Action

Set the velocity of an agent.

Parameters
class SetSpeedAction(speed)[source]

Bases: scenic.core.simulators.Action

Set the speed of an agent (keeping its heading fixed).

Parameters

speed (float) –

class SteeringAction[source]

Bases: scenic.core.simulators.Action

Abstract class for actions usable by agents which can steer.

Such agents must implement the Steers protocol.

class SetThrottleAction(throttle)[source]

Bases: scenic.domains.driving.actions.SteeringAction

Set the throttle.

Parameters

throttle (float) – Throttle value between 0 and 1.

class SetSteerAction(steer)[source]

Bases: scenic.domains.driving.actions.SteeringAction

Set the steering ‘angle’.

Parameters

steer (float) – Steering ‘angle’ between -1 and 1.

class SetBrakeAction(brake)[source]

Bases: scenic.domains.driving.actions.SteeringAction

Set the amount of brake.

Parameters

brake (float) – Amount of braking between 0 and 1.

class SetHandBrakeAction(handBrake)[source]

Bases: scenic.domains.driving.actions.SteeringAction

Set or release the hand brake.

Parameters

handBrake (bool) – Whether or not the hand brake is set.

class SetReverseAction(reverse)[source]

Bases: scenic.domains.driving.actions.SteeringAction

Engage or release reverse gear.

Parameters

reverse (bool) – Whether or not the car is in reverse.

class RegulatedControlAction(throttle, steer, past_steer, max_throttle=0.5, max_brake=0.5, max_steer=0.8)[source]

Bases: scenic.domains.driving.actions.SteeringAction

Regulated control of throttle, braking, and steering.

Controls throttle and braking using one signal that may be positive or negative. Useful with simple controllers that output a single value.

Parameters
  • throttle (float) – Control signal for throttle and braking (will be clamped as below).

  • steer (float) – Control signal for steering (also clamped).

  • past_steer (float) – Previous steering signal, for regulating abrupt changes.

  • max_throttle (float) – Maximum value for throttle, when positive.

  • max_brake (float) – Maximum (absolute) value for throttle, when negative.

  • max_steer (float) – Maximum absolute value for steer.

class WalkingAction[source]

Bases: scenic.core.simulators.Action

Abstract class for actions usable by agents which can walk.

Such agents must implement the Walks protocol.

class SetWalkingDirectionAction(heading)[source]

Bases: scenic.domains.driving.actions.WalkingAction

Set the walking direction.

class SetWalkingSpeedAction(speed)[source]

Bases: scenic.domains.driving.actions.WalkingAction

Set the walking speed.