Closed gavanderhoorn closed 3 years ago
After following the installation instructions, starting FS19, not getting in any vehicle and then immediately executing rosPubMsg true in the game console gets me this:
rosPubMsg true
2021-06-03 16:47 Error: Running LUA method 'rosPubMsg'. 2021-06-03 16:47 C:/Users/user/Documents/My Games/FarmingSimulator2019/mods/modROS/modROS.lua:506: attempt to index field 'vehicle' (a nil value) 2021-06-03 16:47 Warning (script): 'localToWorld': Argument 1 has wrong type. Expected: Int. Actual: Nil 2021-06-03 16:47 ..\..\..\src\base\scripting\lua\LuaScriptSystem.cpp (882): expectedType == Value::VoidType || expectedType == Value::ClassType 2021-06-03 16:47 LUA call stack: 2021-06-03 16:47 =C:/Users/user/Documents/My Games/FarmingSimulator2019/mods/modROS/modROS.lua (298) : localToWorld 2021-06-03 16:47 =C:/Users/user/Documents/My Games/FarmingSimulator2019/mods/modROS/modROS.lua (115) : publish_laser_scan_func 2021-06-03 16:47 dataS/scripts/BaseMission.lua (1599) : update 2021-06-03 16:47 dataS/scripts/FSBaseMission.lua (1979) : update 2021-06-03 16:47 dataS/scripts/missions/mission00.lua (469) : update 2021-06-03 16:47 dataS/scripts/main.lua (1944) : update
the line mentioned is here:
https://github.com/tud-cor/FS19_modROS/blob/0424021c54f95efb26e6a6cef709a7ad547cf61e/modROS.lua#L504-L506
the error makes sense: I'm not in a vehicle, so g_currentMission.controlledVehicle is nil.
g_currentMission.controlledVehicle
nil
After following the installation instructions, starting FS19, not getting in any vehicle and then immediately executing
rosPubMsg true
in the game console gets me this:the line mentioned is here:
https://github.com/tud-cor/FS19_modROS/blob/0424021c54f95efb26e6a6cef709a7ad547cf61e/modROS.lua#L504-L506
the error makes sense: I'm not in a vehicle, so
g_currentMission.controlledVehicle
isnil
.