Community Forum
ANVEL Licensing Options

Matlab Vehicle Control

  • I am trying to control a vehicle in ANVEL through the external API using MATLAB.

    My MATLAB script successfully connects to ANVEL, loads an environment, generates a vehicle, and can start and stop the simulation.

    I'm trying to use the SetVehicleInput API function to control the vehicle, but MATLAB reports an error at the line of the function, saying:

    "undefined function 'SetVehicleInput' for input arguments of type 'com.quantumsignal.anvel.api.VehicleInputRecord'."

    This error occurs whenever I define a VehicleInputRecord as a parameter in the function call itself, as well as when I define an instance of a VehicleInputRecord before the function call and send it in through a variable name.

    Any assistance or advice would be appreciated!

  • Solved:

    the SetVehicleInput function was being called as if it were a stand-alone function:

    SetVehicleInput(, vehicleInputRecord);

    Fixed by changing it to be called as a member function of the instance of ANVEL:

    anv.SetVehicle(, vehicleInputRecord);

    Where anv is described as follows:
    client = com.quantumsignal.AnvelConnector.AnvelClient('', 9094);
    anv = client.anvel;