Skip to content

Crash when SE_GetRoadInfoAtDistance method called for a vehicle created by SE_AddObject method  #263

@Genco2

Description

@Genco2

Hello Everyone;
I am working to create a new vehicle(2 vehicles were already existing, new one is the 3rd one) at a given time. I am using SE_AddObject function with no problem.
When following code block executed ;
`

                insertedID = SE_AddObject("insertedVehicle", 1, 0, 1);
		printf("ID : %d \n",insertedID);
		y = SE_ReportObjectPosXYH(insertedID, 0, vehicleState.x, vehicleState.y, vehicleState.h, 10.0);
		SE_GetObjectState(insertedID, &insertedObjectState);
		insertedVehicleHandle = SE_SimpleVehicleCreate(vehicleState.x, vehicleState.y, vehicleState.h, 4.0, 10.0);
                    ...
		SE_SimpleVehicleGetState(insertedVehicleHandle, &insertedVehicleState);

`

I obtain the new vehicle just where I wanted which is the same location as the vehicle with vehicleState struct and can reach insertedObjectState struct. However when I tried to call SE_GetRoadInfoAtDistance function to obtain steer angle for the newly added vehicle;
y = SE_GetRoadInfoAtDistance(2, 5 + 0.75f * insertedVehicleState.speed, &roadInfo, 0, true);
simulation crashes without a message. May first idea is maybe the vehicle created by the "SE_AddObject" method does not have "pos_.GetHRelativeDrivingDirection() " . Does anyone have any idea ?
Thanks a lot.
Genco Cosgun

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions