Skip to content

Commit

Permalink
Mark vehicle envelope key to become non-null
Browse files Browse the repository at this point in the history
Mark the envelope key in Vehicle and related APIs to become a non-null
value with openTCS 7.0.

Additionally, update the user's guide regarding vehicle envelope keys
and documented what happens if a vehicle envelope key is not defined at
a point or path. 

Merged-by: Martin Grzenia <[email protected]>
  • Loading branch information
Finja Averhaus authored and martingr committed Oct 30, 2024
1 parent ff95f0a commit 27ceb1a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ public VehicleCreationTO withMaxReverseVelocity(int maxReverseVelocity) {
*
* @return The key for selecting the envelope to be used for resources the vehicle occupies.
*/
@ScheduledApiChange(when = "7.0", details = "Envelope key will become non-null.")
@Nullable
public String getEnvelopeKey() {
return envelopeKey;
Expand All @@ -439,6 +440,7 @@ public String getEnvelopeKey() {
* @param envelopeKey The value to be set in the copy.
* @return A copy of this object, differing in the given value.
*/
@ScheduledApiChange(when = "7.0", details = "Envelope key will become non-null.")
public VehicleCreationTO withEnvelopeKey(
@Nullable
String envelopeKey
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1513,6 +1513,7 @@ public Vehicle withOrientationAngle(double orientationAngle) {
*
* @return The key for selecting the envelope to be used for resources the vehicle occupies.
*/
@ScheduledApiChange(when = "7.0", details = "Envelope key will become non-null.")
@Nullable
public String getEnvelopeKey() {
return envelopeKey;
Expand All @@ -1524,6 +1525,7 @@ public String getEnvelopeKey() {
* @param envelopeKey The value to be set in the copy.
* @return A copy of this object, differing in the given value.
*/
@ScheduledApiChange(when = "7.0", details = "Envelope key will become non-null.")
public Vehicle withEnvelopeKey(
@Nullable
String envelopeKey
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import org.opentcs.util.annotations.ScheduledApiChange;

/**
*/
Expand Down Expand Up @@ -131,12 +132,14 @@ public VehicleTO setMaxReverseVelocity(
return this;
}

@ScheduledApiChange(when = "7.0", details = "Envelope key will become non-null.")
@XmlAttribute
@Nullable
public String getEnvelopeKey() {
return envelopeKey;
}

@ScheduledApiChange(when = "7.0", details = "Envelope key will become non-null.")
public VehicleTO setEnvelopeKey(
@Nullable
String envelopeKey
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ By referencing an envelope key, a vehicle indicates which envelopes (that may be
(For more details on this, see <<Default scheduler>>.)
With this, it is possible to prevent vehicles from allocating areas intersecting with areas already allocated by other vehicles.

NOTE: If an envelope key is set for a vehicle, but no envelope with the respective key is defined at a specific resource (i.e. point or path), no envelope will be considered for the vehicle when it allocates that resource.

.Defining and editing vehicle envelopes for points and paths
image::screenshot_envelope_editing.drawio.png[]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.opentcs.data.model.Vehicle.IntegrationLevel;
import org.opentcs.data.model.Vehicle.ProcState;
import org.opentcs.data.model.Vehicle.State;
import org.opentcs.util.annotations.ScheduledApiChange;

/**
*/
Expand Down Expand Up @@ -238,11 +239,13 @@ public GetVehicleResponseTO setAllowedOrderTypes(List<String> allowedOrderTypes)
return this;
}

@ScheduledApiChange(when = "7.0", details = "Envelope key will become non-null.")
@Nullable
public String getEnvelopeKey() {
return envelopeKey;
}

@ScheduledApiChange(when = "7.0", details = "Envelope key will become non-null.")
public GetVehicleResponseTO setEnvelopeKey(
@Nullable
String envelopeKey
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.opentcs.kernel.vehicles.LocalVehicleControllerPool;
import org.opentcs.kernel.vehicles.VehicleCommAdapterRegistry;
import org.opentcs.kernel.workingset.PlantModelManager;
import org.opentcs.util.annotations.ScheduledApiChange;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -451,6 +452,7 @@ public void updateVehicleAllowedOrderTypes(
}

@Override
@ScheduledApiChange(when = "7.0", details = "Envelope key will become non-null.")
public void updateVehicleEnvelopeKey(TCSObjectReference<Vehicle> ref, String envelopeKey)
throws ObjectUnknownException,
IllegalArgumentException,
Expand Down

0 comments on commit 27ceb1a

Please sign in to comment.