|
| 1 | +# Longitudinal Control |
| 2 | + |
| 3 | +traffic_simulator has various ways to control the longitudinal behavior of the npc. |
| 4 | + |
| 5 | +## List of Longitudinal Controllers |
| 6 | + |
| 7 | +| Name | Description | |
| 8 | +| --------------------------------------------------------- | -------------------------------------------- | |
| 9 | +| [**requestSpeedChange**](#requestSpeedChange) | Changes the speed of the npc. | |
| 10 | +| [**requestSynchronize**](#requestSynchronize) | Synchronizes the npc with the target entity. | |
| 11 | +| [**setLinearVelocity**](#setLinearVelocity) | Sets the linear velocity of the npc. | |
| 12 | +| [**setTwist**](#setTwist) | Sets the twist of the npc. | |
| 13 | +| [**setAcceleration**](#setAcceleration) | Sets the acceleration of the npc. | |
| 14 | +| [**setAccelerationLimit**](#setAccelerationLimit) | Sets the acceleration limit of the npc. | |
| 15 | +| [**setAccelerationRateLimit**](#setAccelerationRateLimit) | Sets the acceleration rate limit of the npc. | |
| 16 | +| [**setDecelerationLimit**](#setDecelerationLimit) | Sets the deceleration limit of the npc. | |
| 17 | +| [**setDecelerationRateLimit**](#setDecelerationRateLimit) | Sets the deceleration rate limit of the npc. | |
| 18 | +| [**setVelocityLimit**](#setVelocityLimit) | Sets the velocity limit of the npc. | |
| 19 | + |
| 20 | +## Details |
| 21 | +### requestSpeedChange |
| 22 | +By using `API::requestSpeedChange`, you can change the speed of the npc. |
| 23 | + |
| 24 | +| Value | Type | Description | |
| 25 | +| ------------ | ------ | ----------------------------------------------------------- | |
| 26 | +| name | string | Name of the npc. | |
| 27 | +| target_speed | double | Target speed of the npc. | |
| 28 | +| continuous | bool | If true the npc will keep the speed until the next command. | |
| 29 | + |
| 30 | +| Value | Type | Description | |
| 31 | +| ------------ | ------------------------ | ----------------------------------------------------------- | |
| 32 | +| name | string | Name of the npc. | |
| 33 | +| target_speed | double | Target speed of the npc. | |
| 34 | +| transition | speed_change::Transition | Transition type. | |
| 35 | +| constraint | speed_change::Constraint | Constraint type. | |
| 36 | +| continuous | bool | If true the npc will keep the speed until the next command. | |
| 37 | + |
| 38 | +| Value | Type | Description | |
| 39 | +| ------------ | --------------------------------- | ----------------------------------------------------------- | |
| 40 | +| name | string | Name of the npc. | |
| 41 | +| target_speed | speed_change::RelativeTargetSpeed | Relative target speed. | |
| 42 | +| continuous | bool | If true the npc will keep the speed until the next command. | |
| 43 | + |
| 44 | +| Value | Type | Description | |
| 45 | +| ------------ | --------------------------------- | ----------------------------------------------------------- | |
| 46 | +| name | string | Name of the npc. | |
| 47 | +| target_speed | speed_change::RelativeTargetSpeed | Relative target speed. | |
| 48 | +| transition | speed_change::Transition | Transition type. | |
| 49 | +| constraint | speed_change::Constraint | Constraint type. | |
| 50 | +| continuous | bool | If true the npc will keep the speed until the next command. | |
| 51 | + |
| 52 | +### requestSynchronize |
| 53 | +By using `API::requestSynchronize`, you can request the entity to adjust speed to stop at the designated lanelet by the time target entity crosses the another designated lanelet. |
| 54 | + |
| 55 | +| Value | Description | |
| 56 | +| ---------------- | ---------------------------------------------------------------------- | |
| 57 | +| name | Name of the npc. | |
| 58 | +| target_name | Name of the target entity. | |
| 59 | +| target_sync_pose | Target lanelet pose for target entity. | |
| 60 | +| entity_target | Target lanelet pose for controlling entity. | |
| 61 | +| target_speed | Target speed for controlling entity (meter per second). | |
| 62 | +| tolerance | Tolerance for how much margin to accept to stop at the target (meter). | |
| 63 | + |
| 64 | +### setLinearVelocity |
| 65 | +By using `API::setLinearVelocity`, you can set the linear velocity of the npc. |
| 66 | + |
| 67 | +| Value | Type | Description | |
| 68 | +| --------------- | ------ | --------------------------- | |
| 69 | +| name | string | Name of the npc. | |
| 70 | +| linear_velocity | double | Linear velocity of the npc. | |
| 71 | + |
| 72 | +### setTwist |
| 73 | +By using `API::setTwist`, you can set the twist of the npc. |
| 74 | + |
| 75 | +| Value | Type | Description | |
| 76 | +| ----- | ------------------------- | ----------------- | |
| 77 | +| name | string | Name of the npc. | |
| 78 | +| twist | geometry_msgs::msg::Twist | Twist of the npc. | |
| 79 | + |
| 80 | +### setAcceleration |
| 81 | + |
| 82 | +By using `API::setAcceleration`, you can set the acceleration of the npc. |
| 83 | + |
| 84 | +| Value | Type | Description | |
| 85 | +| ------------ | ------------------------- | ------------------------ | |
| 86 | +| name | string | Name of the npc. | |
| 87 | +| acceleration | geometry_msgs::msg::Accel | Acceleration of the npc. | |
| 88 | + |
| 89 | +### setAccelerationLimit |
| 90 | + |
| 91 | +By using `API::setAccelerationLimit`, you can set the acceleration limit of the npc. |
| 92 | + |
| 93 | +| Value | Type | Description | |
| 94 | +| ------------ | ------ | ------------------------------ | |
| 95 | +| name | string | Name of the npc. | |
| 96 | +| acceleration | double | Acceleration limit of the npc. | |
| 97 | + |
| 98 | +### setAccelerationRateLimit |
| 99 | + |
| 100 | +By using `API::setAccelerationRateLimit`, you can set the acceleration rate limit of the npc. |
| 101 | + |
| 102 | +| Value | Type | Description | |
| 103 | +| ----------------- | ------ | ----------------------------------- | |
| 104 | +| name | string | Name of the npc. | |
| 105 | +| acceleration_rate | double | Acceleration rate limit of the npc. | |
| 106 | + |
| 107 | +### setDecelerationLimit |
| 108 | + |
| 109 | +By using `API::setDecelerationLimit`, you can set the deceleration limit of the npc. |
| 110 | + |
| 111 | +| Value | Type | Description | |
| 112 | +| ------------ | ------ | ------------------------------ | |
| 113 | +| name | string | Name of the npc. | |
| 114 | +| deceleration | double | Deceleration limit of the npc. | |
| 115 | + |
| 116 | +### setDecelerationRateLimit |
| 117 | + |
| 118 | +By using `API::setDecelerationRateLimit`, you can set the deceleration rate limit of the npc. |
| 119 | + |
| 120 | +| Value | Type | Description | |
| 121 | +| ----------------- | ------ | ----------------------------------- | |
| 122 | +| name | string | Name of the npc. | |
| 123 | +| deceleration_rate | double | Deceleration rate limit of the npc. | |
| 124 | + |
| 125 | +### setVelocityLimit |
| 126 | + |
| 127 | +By using `API::setVelocityLimit`, you can set the velocity limit of the npc. |
| 128 | + |
| 129 | +| Value | Type | Description | |
| 130 | +| --------------- | ------ | -------------------------- | |
| 131 | +| name | string | Name of the npc. | |
| 132 | +| lenear_velocity | double | Velocity limit of the npc. | |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | + |
0 commit comments