openTCS / opentcs

The open Transportation Control System (by Fraunhofer IML)
https://www.opentcs.org/
345 stars 121 forks source link

TranportOder status change failed error #140

Closed C-002 closed 4 months ago

C-002 commented 6 months ago

Affected version

OpenTcs: release 5.10.0 Used adapter: Custumed NeNa adapter from here for connecting to ROS2 humble.

...

Steps to reproduce

How can the incorrect behaviour be reproduced?

  1. create orders which have two random transport points with load cargo and unload cargo operation
  2. repeat sending orders through WebAPI times.
  3. Sometimes, it occurred the problem that, the status of the operation stayed at "TRAVELLING" even when the vehicle finished its action.

Expected behaviour

Q1: For the problem, failed to change the status of operations, which part of the program should I check,? (Kenerl, OperationsDesk or Adapter ...)

Q2: where will the status of operations be changed in the program when the vehicle begins and finishes the operation process?

Q3: Does the behaviour to change the status of operations in the program use the "firePropertyChange" function?

...

Additional information

the screenshot of the problem: problem_windows_shutcut_20240401

the code when the operations actually done:

    /* --------------- 3a: Handle load cargo feedback ---------------*/
    public void onExecuteLoadCargoFeedback(@Nonnull String feedback) {
        if (this.excutingOperation.equals(OperationConstants.LOAD_CARGO)){
            System.out.println("onOperationLoadCargoFeedback: " + feedback);
            if (feedback.startsWith("FINISH")) {
                System.out.println("onExecuteLoadCargoFeedback() -> Success");
                this.processModel.setVehicleLoadHandlingDevices(Collections.singletonList(new LoadHandlingDevice(LOAD_HANDLING_DEVICE_NAME, true)));
                onOperationExecutionFinished(); // Fake that the operation was successful.
            }
        }
    }

    /* --------------- 3b: Handle unload cargo feedback ---------------*/
    public void onExecuteUnloadCargoFeedback(@Nonnull String feedback) {
        if (this.excutingOperation.equals(OperationConstants.UNLOAD_CARGO)) {
            System.out.println("onOperationUnLoadCargoFeedback: " + feedback);
            if (feedback.startsWith("FINISH")) {
                System.out.println("onExecuteUnloadCargoFeedback() -> Success");
                this.processModel.setVehicleLoadHandlingDevices(Collections.singletonList(new LoadHandlingDevice(LOAD_HANDLING_DEVICE_NAME, false)));
                onOperationExecutionFinished(); // Fake that the operation was successful.
            }
        }
    }

Any suggestions or hints, I'd appreciate it!

swltr commented 6 months ago

@C-002 Can you reproduce the problem exclusively with the NeNa adapter, or can you reproduce it with other adapters, too, e.g. the loopback driver built into openTCS?

swltr commented 4 months ago

@C-002 I am closing this. If you can reproduce this with a more recent version of openTCS AND with other communication adapters, feel free to reopen. If this happens only with the NeNa adapter, you may want to open an issue over at https://github.com/nielstiben/openTCS-NeNa, instead.