carla-simulator / carla

Open-source simulator for autonomous driving research.
http://carla.org
MIT License
11.53k stars 3.72k forks source link

unable to parse the OpenDRIVE XML string #4514

Open seuwcs opened 3 years ago

seuwcs commented 3 years ago

Hello every one!

I have built carla 0.9.12 from source on Ubuntu 18.04 with the edition of Unreal Engine is 4.26.

I made maps in Roadrunner and exported to Unreal, got the 00.fbx and 00.xodr files, then import them to carla, when the map imported, it worked in UE4 like figure 1.

2021-08-09 22-52-40 的屏幕截图

but when I run the script manual_control.py in the terminal, something went wrong, the error is :

ERROR: unable to parse the OpenDRIVE XML string RuntimeError: failed to generate map The server could not send the OpenDRIVE (.xodr) file: Make sure it exists, has the same name of your town, and is correct. 2021-08-09 22-55-41 的屏幕截图

However, I do place the file 00.xodr in the folder with the path is carla/Unreal/CarlaUE4/Content/Carla/Maps/OpenDrive/ 2021-08-09 22-56-59 的屏幕截图

Besides, I have tried to find solutions in https://github.com/carla-simulator/carla/issues/2257 but it did not work for me, I got puzzled. who can give me some suggestions? any help is appreciated !

More importantly. I have another computer, Ubuntu18.04, carla version is 0.9.10, Unreal Engine 4.24, surprisingly, it worked.

I really don't know how could it can't work with carla 0.9.12 and UE 4.26.

Any suggestions is appreciated! thank you very much! @krmartin @sunpochin @Jazzinghen @cesarsouza @ItsTimmy @glopezdiest @corkyw10 @XGodina

LucasFKobernic commented 3 years ago

I'm having the same issues

seuwcs commented 3 years ago

I'm having the same issues

if you have solved the problem?

LucasFKobernic commented 3 years ago

Not yet,

I made the map insertion in CARLA 0.9.11 and then i copied the map folder in CARLA 0.9.12 Content folder and now i'm able to open and use the map. It is not the best solution, but it works for now.

seuwcs commented 3 years ago

Not yet,

I made the map insertion in CARLA 0.9.11 and then i copied the map folder in CARLA 0.9.12 Content folder and now i'm able to open and use the map. It is not the best solution, but it works for now.

It seems strange.

seuwcs commented 3 years ago

Not yet,

I made the map insertion in CARLA 0.9.11 and then i copied the map folder in CARLA 0.9.12 Content folder and now i'm able to open and use the map. It is not the best solution, but it works for now.

I have a question, the figure below describes the file that had been imported to UE4, in the folder, there do not exist the file that named exp0_BuiltData.uasset.

2021-08-13 17-20-50 的屏幕截图

However, in the folder /carla/Unreal/CarlaUE4/Content/Carla/Maps. the map file built by carla default, do have the file whose suffix is "_BuiltData.uasset",

2021-08-13 17-21-44 的屏幕截图

why the happens?

XGodina commented 3 years ago

Hi @seuwcs, @LucasFKobernic !! When you import a RoadRunner map into CARLA, a folder of that map is created. Inside that folder, you should put the OpenDrive with their according folder. image

seuwcs commented 3 years ago

Hi @seuwcs, @LucasFKobernic !! When you import a RoadRunner map into CARLA, a folder of that map is created. Inside that folder, you should put the OpenDrive with their according folder. image

Thanks for your advice. I have made a try, but I still got the same problem.

Firstly, I imported a map to carla from roadrunner in the folder Maps(/home/wcs/carla/Unreal/CarlaUE4/Content/Carla/Maps), like the following figure:

2021-08-17 10-07-29 的屏幕截图

the new folder is named as "e1", under e1, the OpenDrive folder is created and the e1.xodr file was put under the OpenDrive folder, like this:

2021-08-17 10-08-11 的屏幕截图

but when I clicked "Play" in UE4, and run the manual_control.py script under the path : carla/PythonAPI/examples, that question still exist, like this:

2021-08-17 10-17-16 的屏幕截图

As you know, after the map was imported to carla, two files will be created, and usually the two files are named as : filename.umap and filename_BuiltData.uasset respectively, and they are correspond to each other. like this:

2021-08-17 10-21-19 的屏幕截图

However, in the folder ExportedMaps(/home/wcs/carla/Unreal/CarlaUE4/Content/Carla/ExportedMaps), there only exist one file named :e1.umap, basicially, the file e1.BuiltData.uasset should also be created.But it didn't.

2021-08-17 10-07-53 的屏幕截图

What troubles me most is why the e1.BuiltData.uasset file is not created.

Besides, the e1.xodr file had been put in the folder OpenDrive in the path: /home/wcs/carla/Unreal/CarlaUE4/Content/Carla/Maps/OpenDrive as well.

2021-08-17 10-08-44 的屏幕截图

but the problem still exist (unable to parse the OpenDRIVE XML string). I really don't know why this happens.

if you know how this happened?Thanks for your advice.

XGodina commented 3 years ago

I will talk with our engineers about that. Now almost all our team are on holiday. I'll let you know when I know something.

supavit-siriwan commented 3 years ago

I got the same problem. And I fix by the following method and it woke fine.

I guess that CARLA lib is search ".xodr" from the location of ".umap". So, I create "OpenDrive" folded beside the ".umap" file. And contain the ".xodr" file. In my case is at "~/carla/CarlaUE4/Content/Carla/ExportedMaps"


And for the compiled package. I do the same after complied. In my case is at "~/carla/Dist/CARLA_Shipping_0.9.12-dirty/LinuxNoEditor/CarlaUE4/Content/Carla/ExportedMaps" I think the compile script did not include this folder by default.

seuwcs commented 3 years ago

Thank you for sharing your solution, I will have a try. Very much thanks.

在 2021-09-29 04:27:11,"Supavit Siriwan" @.***> 写道:

I got the same problem. And I fix by the following method and it woke fine.

I guess that CARLA lib is search ".xodr" from the location of ".umap". So, I create "OpenDrive" folded beside the ".umap" file. And contain the ".xodr" file. In my case is at "~/carla/CarlaUE4/Content/Carla/ExportedMaps"

And for the compiled package. I do the same after complied. In my case is at "~/carla/Dist/CARLA_Shipping_0.9.12-dirty/LinuxNoEditor/CarlaUE4/Content/Carla/ExportedMaps" I think the compile script did not include this folder by default.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

duongtran11 commented 3 years ago

@seuwcs Did you get it work? I have the same problem while launching carla_ros_bridge.

Phd-Ma commented 3 years ago

I got the same problem.

werewolfdev commented 2 years ago

Hi @supavit-siriwan @seuwcs iam also trying to export map from road runner and use in CARLA build from source. AS of now I used export (carla) option , put them in the import folder and did make import. Now inorder to open the Unreal engine editor with the custom map could you please tell me what should be done from my end

jl940213 commented 2 years ago

I succeeded in solving the problem , you should create a folder named OpenDrive in //Unreal/CarlaUE4/Content/Carla/Maps/test. The 'test' is your own roadrunner map package which contain many .uasset file .Then put the same named .xodr file into OpenDrive file. Then run the manual_control.py!

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

PPTaniya commented 2 years ago

I am also facing the same issue. Tried the above provided solution. But it seems its not working for me. Please let me know any other solution is there.

CARLA Version: 0.9.13 OS: ubuntu 18.04.06 Unreal Engine: 4.26

lpxiangyan9 commented 2 years ago

i have the same question, i use TruevisionDesigner export .xodr file and import to UE4. but running py code throw this error CARLA Version: 0.9.13 OS:WIN 10 UE:UECARLA4

sangeetsu commented 2 years ago

I have the exact same problem Used RoadRunner to Import map. Used the same RoadRunner export on a different PC with the same versions of everything and it works there. Ubuntu - 18 LTS Carla 0.9.13 UE 4.26

Tried editing permissions (gave chmod 777) for the OpenDrive folders. It works if I run the server from the UE Editor. If I package it and try to use manual_control_steeringwheel.py it throws this error:

ERROR: unable to parse the OpenDRIVE XML string Traceback (most recent call last): File "manual_control_steeringwheel.py", line 871, in main() File "manual_control_steeringwheel.py", line 863, in main game_loop(args) File "manual_control_steeringwheel.py", line 792, in game_loop world = World(client.get_world(), hud, args.filter) File "manual_control_steeringwheel.py", line 140, in init self.restart() File "manual_control_steeringwheel.py", line 162, in restart spawn_points = self.world.get_map().get_spawn_points() RuntimeError: failed to generate map

If I try to use manual_control.py:

ERROR: unable to parse the OpenDRIVE XML string RuntimeError: failed to generate map The server could not send the OpenDRIVE (.xodr) file: Make sure it exists, has the same name of your town, and is correct.

Server side log:

~/carla/Dist/CARLA_Shipping_0.9.13-1-g8854804f4-dirty/LinuxNoEditor$ ./CarlaUE4.sh 4.26.2-0+++UE4+Release-4.26 522 0 Disabling core dumps. ERROR: unable to parse the OpenDRIVE XML string WARNING: Coud not generate traffic lights: missing map.

supavit-siriwan commented 1 year ago

@sangeetsu For packaging. You need to add path of custom OpenDrive folder to UE4 project config.

Config file: ~/carla/Unreal/CarlaUE4/Config/DefaultGame.ini

add

+DirectoriesToAlwaysStageAsUFS=(Path="RHT_Straight_10km/Maps/RHT_Straight_10km/OpenDrive")

under

+DirectoriesToAlwaysStageAsUFS=(Path="Carla/Config")

Note: RHT_Straight_10km is my custom map.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Edelweissor commented 1 year ago

You may find the solution here, https://github.com/carla-simulator/carla/issues/4010#issuecomment-810349551.

The issue was happening due to lack of write permission for the server on the directory CarlaUE4/Content/Carla/Maps/OpenDrive/ because the server needs to write a file there during parsing.

JoFeGoOr commented 1 year ago

i've have the same problem, i am working on win11. i gave write permission to CarlaUE4/Content/Carla/Maps/OpenDrive/ folder, i am unable to uncheck the read only option.

C:\carla\PythonAPI\util>python config.py -x C:\carla\Unreal\CarlaUE4\Content\Carla\Maps\OpenDrive\ScenarioBasic.xodr
load opendrive map 'ScenarioBasic.xodr'.
map not found

C:\carla\PythonAPI\util>python config.py -l
weather presets:

    ClearNight, ClearNoon, ClearSunset, CloudyNight, CloudyNoon,
    CloudySunset, Default, DustStorm, HardRainNight, HardRainNoon,
    HardRainSunset, MidRainSunset, MidRainyNight, MidRainyNoon,
    SoftRainNight, SoftRainNoon, SoftRainSunset, WetCloudyNight,
    WetCloudyNoon, WetCloudySunset, WetNight, WetNoon, WetSunset.

available maps:

    /Game/ScenarioBasic/Maps/ScenarioBasic/ScenarioBasic, Town10HD_Opt.

C:\carla\PythonAPI\util>python config.py -m ScenarioBasic
load map 'ScenarioBasic'.

C:\carla\PythonAPI\util>python config.py -x C:\carla\Unreal\CarlaUE4\Content\Carla\Maps\OpenDrive\ScenarioBasic.xodr
load opendrive map 'ScenarioBasic.xodr'.
map not found

C:\carla\PythonAPI\util>cd ..

C:\carla\PythonAPI>cd examples

C:\carla\PythonAPI\examples>python manual_control.py
pygame 2.5.2 (SDL 2.28.3, Python 3.8.10)
Hello from the pygame community. https://www.pygame.org/contribute.html
INFO: listening to server 127.0.0.1:2000

Welcome to CARLA manual control.

Use ARROWS or WASD keys for control.

    W            : throttle
    S            : brake
    A/D          : steer left/right
    Q            : toggle reverse
    Space        : hand-brake
    P            : toggle autopilot
    M            : toggle manual transmission
    ,/.          : gear up/down
    CTRL + W     : toggle constant velocity mode at 60 km/h

    L            : toggle next light type
    SHIFT + L    : toggle high beam
    Z/X          : toggle right/left blinker
    I            : toggle interior light

    TAB          : change sensor position
    ` or N       : next sensor
    [1-9]        : change to sensor [1-9]
    G            : toggle radar visualization
    C            : change weather (Shift+C reverse)
    Backspace    : change vehicle

    O            : open/close all doors of vehicle
    T            : toggle vehicle's telemetry

    V            : Select next map layer (Shift+V reverse)
    B            : Load current selected map layer (Shift+B to unload)

    R            : toggle recording images to disk

    CTRL + R     : toggle recording of simulation (replacing any previous)
    CTRL + P     : start replaying last recorded simulation
    CTRL + +     : increments the start time of the replay by 1 second (+SHIFT = 10 seconds)
    CTRL + -     : decrements the start time of the replay by 1 second (+SHIFT = 10 seconds)

    F1           : toggle HUD
    H/?          : toggle help
    ESC          : quit

ERROR: unable to parse the OpenDRIVE XML string
RuntimeError: failed to generate map
  The server could not send the OpenDRIVE (.xodr) file:
  Make sure it exists, has the same name of your town, and is correct.

this works fine:

 C:\carla\PythonAPI\util>python config.py -m ScenarioBasic
load map 'ScenarioBasic'.
Danlaw-Nikhil commented 10 months ago

Has anyone solved this issue , I have followed the procedures in the same way I have downloaded an osm file from https://www.openstreetmap.org/ created a .fbx file for the same using blender imported both of these files into unreal engine editor (Carla fork) [ But was unable to import the .xodr file] now i am able to launch the CARLA , but again the map loads in CARLA , but whenever i try accessing the same through the Python APIs , world.get_map() returns an error stating : ERROR: unable to parse the OpenDRIVE XML string RuntimeError: failed to generate map i am using Ubuntu 20.04 Unreal engine 4.26 CARLA 0.9.15

any suggestions are welcome. Thank you 1 2 3

josyulavt commented 9 months ago

@sangeetsu For packaging. You need to add path of custom OpenDrive folder to UE4 project config.

Config file: ~/carla/Unreal/CarlaUE4/Config/DefaultGame.ini

add

+DirectoriesToAlwaysStageAsUFS=(Path="RHT_Straight_10km/Maps/RHT_Straight_10km/OpenDrive")

under

+DirectoriesToAlwaysStageAsUFS=(Path="Carla/Config")

Note: RHT_Straight_10km is my custom map.

Hi thanks for the answer, I don't see any occurrences of DirectoriesToAlwaysStageAsUFS in my DefaultEngine.ini , these are contents of my file

[/Script/Engine.Engine]
bSmoothFrameRate=false
SmoothedFrameRateRange=(LowerBound=(Type="ERangeBoundTypes::Inclusive",Value=22),UpperBound=(Type="ERangeBoundTypes::Exclusive",Value=120))

[/Script/HardwareTargeting.HardwareTargetingSettings]
TargetedHardwareClass=Desktop
AppliedTargetedHardwareClass=Desktop
DefaultGraphicsPerformance=Maximum
AppliedDefaultGraphicsPerformance=Maximum

[/Script/EngineSettings.GameMapsSettings]
EditorStartupMap=/Game/Carla/Maps/Town10HD_Opt.Town10HD_Opt
GameDefaultMap=/Game/map_package/Maps/smartroad/smartroad.smartroad
ServerDefaultMap=/Game/Carla/Maps/Town10HD_Opt.Town10HD_Opt
GlobalDefaultGameMode=/Game/Carla/Blueprints/Game/CarlaGameMode.CarlaGameMode_C
GameInstanceClass=/Script/Carla.CarlaGameInstance
TransitionMap=/Game/Carla/Maps/Town10HD_Opt.Town10HD_Opt
GlobalDefaultServerGameMode=/Game/Carla/Blueprints/Game/CarlaGameMode.CarlaGameMode_C

[/Script/Engine.RendererSettings]
r.DefaultFeature.MotionBlur=True
r.BasePassOutputsVelocity=True
r.BasePassForceOutputsVelocity=False
r.AllowStaticLighting=True
r.DiscardUnusedQuality=True
r.DefaultFeature.Bloom=False
r.DefaultFeature.AmbientOcclusion=False
r.DefaultFeature.AmbientOcclusionStaticFraction=False
r.DefaultFeature.AutoExposure=False
r.CustomDepth=3
r.Streaming.PoolSize=4000
r.TextureStreaming=True
r.GenerateMeshDistanceFields=True
r.DistanceFieldBuild.EightBit=False
r.DistanceFieldBuild.Compress=False
r.DistanceFields.AtlasSizeXY=1024
r.DistanceFields.AtlasSizeZ=2048
r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=True
r.DefaultFeature.AntiAliasing=2
r.VirtualTextures=True

[/Script/AIModule.AISense_Sight]
bAutoRegisterAllPawnsAsSources=False
bAutoRegisterNewPawnsAsSources=False

[/Script/NavigationSystem.RecastNavMesh]
RuntimeGeneration=Static

[/Script/AIModule.CrowdManager]
MaxAgents=1000

[/Script/LinuxTargetPlatform.LinuxTargetSettings]
SpatializationPlugin=
ReverbPlugin=
OcclusionPlugin=
-TargetedRHIs=SF_VULKAN_SM5
-TargetedRHIs=GLSL_430
+TargetedRHIs=SF_VULKAN_SM5
+TargetedRHIs=GLSL_430

[/Script/Engine.PhysicsSettings]
DefaultGravityZ=-980.000000
DefaultTerminalVelocity=4000.000000
DefaultFluidFriction=0.300000
SimulateScratchMemorySize=262144
RagdollAggregateThreshold=4
TriangleMeshTriangleMinAreaThreshold=5.000000
bEnableShapeSharing=False
bEnablePCM=False
bEnableStabilization=False
bWarnMissingLocks=True
bEnable2DPhysics=False
PhysicErrorCorrection=(PingExtrapolation=0.100000,PingLimit=100.000000,ErrorPerLinearDifference=1.000000,ErrorPerAngularDifference=1.000000,MaxRestoredStateError=1.000000,MaxLinearHardSnapDistance=400.000000,PositionLerp=0.000000,AngleLerp=0.400000,LinearVelocityCoefficient=100.000000,AngularVelocityCoefficient=10.000000,ErrorAccumulationSeconds=0.500000,ErrorAccumulationDistanceSq=15.000000,ErrorAccumulationSimilarity=100.000000)
LockedAxis=Invalid
DefaultDegreesOfFreedom=Full3D
BounceThresholdVelocity=200.000000
FrictionCombineMode=Average
RestitutionCombineMode=Average
MaxAngularVelocity=3600.000000
MaxDepenetrationVelocity=0.000000
ContactOffsetMultiplier=0.010000
MinContactOffset=0.000100
MaxContactOffset=1.000000
bSimulateSkeletalMeshOnDedicatedServer=True
DefaultShapeComplexity=CTF_UseSimpleAndComplex
bDefaultHasComplexCollision=True
bSuppressFaceRemapTable=False
bSupportUVFromHitResults=False
bDisableActiveActors=False
bDisableKinematicStaticPairs=False
bDisableKinematicKinematicPairs=False
bDisableCCD=False
bEnableEnhancedDeterminism=True
MaxPhysicsDeltaTime=0.333330
bSubstepping=True
bSubsteppingAsync=False
MaxSubstepDeltaTime=0.010000
MaxSubsteps=10
SyncSceneSmoothingFactor=0.000000
InitialAverageFrameRate=0.016667
PhysXTreeRebuildRate=10
DefaultBroadphaseSettings=(bUseMBPOnClient=False,bUseMBPOnServer=False,MBPBounds=(Min=(X=0.000000,Y=0.000000,Z=0.000000),Max=(X=0.000000,Y=0.000000,Z=0.000000),IsValid=0),MBPNumSubdivs=2)

[/Script/WindowsTargetPlatform.WindowsTargetSettings]
Compiler=Default
-TargetedRHIs=PCD3D_SM5
+TargetedRHIs=PCD3D_SM5
+TargetedRHIs=SF_VULKAN_SM5
+TargetedRHIs=PCD3D_ES31
DefaultGraphicsRHI=DefaultGraphicsRHI_DX12
MinimumOSVersion=MSOS_Vista
bTarget32Bit=False
AudioSampleRate=48000
AudioCallbackBufferFrameSize=1024
AudioNumBuffersToEnqueue=1
AudioMaxChannels=0
AudioNumSourceWorkers=4
SpatializationPlugin=
ReverbPlugin=
OcclusionPlugin=
CompressionOverrides=(bOverrideCompressionTimes=False,DurationThreshold=5.000000,MaxNumRandomBranches=0,SoundCueQualityIndex=0)
bUseAudioStreamCaching=False
CacheSizeKB=0
MaxChunkSizeOverrideKB=0
bResampleForDevice=False
MaxSampleRate=0.000000
HighSampleRate=0.000000
MedSampleRate=0.000000
LowSampleRate=0.000000
MinSampleRate=0.000000
CompressionQualityModifier=0.000000
AutoStreamingThreshold=0.000000
SoundCueCookQualityIndex=-1

[/Script/Engine.CollisionProfile]
+Profiles=(Name="CustomSensorCollision",CollisionEnabled=QueryOnly,bCanModify=True,ObjectTypeName="SensorObject",CustomResponses=((Channel="WorldStatic",Response=ECR_Ignore),(Channel="WorldDynamic",Response=ECR_Ignore),(Channel="Pawn",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore),(Channel="PhysicsBody",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore),(Channel="Destructible",Response=ECR_Ignore),(Channel="SensorObject"),(Channel="SensorTrace")),HelpMessage="Used for custom collision meshes for objects that has very complex meshes but we want them to appear in raycast based sensors")
+DefaultChannelResponses=(Channel=ECC_GameTraceChannel1,DefaultResponse=ECR_Ignore,bTraceType=False,bStaticObject=False,Name="SensorObject")
+DefaultChannelResponses=(Channel=ECC_GameTraceChannel2,DefaultResponse=ECR_Ignore,bTraceType=True,bStaticObject=False,Name="SensorTrace")
+DefaultChannelResponses=(Channel=ECC_GameTraceChannel3,DefaultResponse=ECR_Overlap,bTraceType=True,bStaticObject=False,Name="OverlapChannel")
+EditProfiles=(Name="BlockAll",CustomResponses=((Channel="SensorObject"),(Channel="SensorTrace")))
+EditProfiles=(Name="OverlapAll",CustomResponses=((Channel="SensorObject",Response=ECR_Overlap),(Channel="SensorTrace",Response=ECR_Overlap)))

smartroad is my custom map I have placed the map in Import folder and compiled carla as specified on the documentation, All the folders have rwx permissions, I'm unsure what's happening, Did you succeed in solving this? can you please help? thank you

sangeetsu commented 9 months ago

@josyulavt could you explain in detail the steps you followed to make the custom map and a list of files you have in your Import folder?

sangeetsu commented 9 months ago

Has anyone solved this issue , I have followed the procedures in the same way I have downloaded an osm file from https://www.openstreetmap.org/ created a .fbx file for the same using blender imported both of these files into unreal engine editor (Carla fork) [ But was unable to import the .xodr file] now i am able to launch the CARLA , but again the map loads in CARLA , but whenever i try accessing the same through the Python APIs , world.get_map() returns an error stating : ERROR: unable to parse the OpenDRIVE XML string RuntimeError: failed to generate map i am using Ubuntu 20.04 Unreal engine 4.26 CARLA 0.9.15

any suggestions are welcome. Thank you 1 2 3

I had pasted my xodr(OpenDRIVE) file from the RoadRunner export into my packaged version sample33\LinuxNoEditor\CarlaUE4\Content\Carla\Maps\OpenDrive\

josyulavt commented 9 months ago

@josyulavt could you explain in detail the steps you followed to make the custom map and a list of files you have in your Import folder?

  1. Export osm pbf from your favorite website.
  2. Import osm into roadrunner and generate .fbx, .xodr and other files under export as Carla Map
  3. Place the files into "Import" folder in carla
  4. Do make import
  5. Do make launch
  6. You can now see your map in file -> open levels -> yourmapname
  7. make launch
  8. make package I had to manually paste the smartroad.xodr file in Maps/OpenDrive, but I still get the same error
sangeetsu commented 9 months ago

@josyulavt could you explain in detail the steps you followed to make the custom map and a list of files you have in your Import folder?

  1. Export osm pbf from your favorite website.
  2. Import osm into roadrunner and generate .fbx, .xodr and other files under export as Carla Map
  3. Place the files into "Import" folder in carla
  4. Do make import
  5. Do make launch
  6. You can now see your map in file -> open levels -> yourmapname
  7. make launch
  8. make package I had to manually paste the smartroad.xodr file in Maps/OpenDrive, but I still get the same error

Did you add your custom map into the list of packaged maps in UE Editor(before packaging)? I remember setting my custom map as default on there.

josyulavt commented 9 months ago

@josyulavt could you explain in detail the steps you followed to make the custom map and a list of files you have in your Import folder?

  1. Export osm pbf from your favorite website.
  2. Import osm into roadrunner and generate .fbx, .xodr and other files under export as Carla Map
  3. Place the files into "Import" folder in carla
  4. Do make import
  5. Do make launch
  6. You can now see your map in file -> open levels -> yourmapname
  7. make launch
  8. make package I had to manually paste the smartroad.xodr file in Maps/OpenDrive, but I still get the same error

Did you add your custom map into the list of packaged maps in UE Editor? I remember setting my custom map as default on there.

I followed this tutorial https://www.youtube.com/watch?v=ctRlzUM8QdM and yes I set it as default too..

sangeetsu commented 9 months ago

I see that happening at 3:07, not sure what else could have caused the problem.

josyulavt commented 9 months ago

I see that happening at 3:07, not sure what else could have caused the problem.

I have not added any lights or buildings to the map, could that be an issue?

sangeetsu commented 9 months ago

I see that happening at 3:07, not sure what else could have caused the problem.

I have not added any lights or buildings to the map, could that be an issue?

That shouldn't be an issue. It should load default lighting if you haven't added it.

josyulavt commented 9 months ago

I see that happening at 3:07, not sure what else could have caused the problem.

I have not added any lights or buildings to the map, could that be an issue?

That shouldn't be an issue. It should load default lighting if you haven't added it.

I see.. thanks @sangeetsu

josyulavt commented 9 months ago

I resolved this by placing the contents generated in theContent/<map_name>/OpenDrive/<map_name>.xodr into Dist/.../CarlaUE4/.../Content/<map_name>/OpenDrive/<map_name>.xml

sergiopaniego commented 2 months ago

@sangeetsu For packaging. You need to add path of custom OpenDrive folder to UE4 project config.

Config file: ~/carla/Unreal/CarlaUE4/Config/DefaultGame.ini

add

+DirectoriesToAlwaysStageAsUFS=(Path="RHT_Straight_10km/Maps/RHT_Straight_10km/OpenDrive")

under

+DirectoriesToAlwaysStageAsUFS=(Path="Carla/Config")

Note: RHT_Straight_10km is my custom map.

This solution worked for me! :rocket:

meilaoliu commented 1 month ago

I see that happening at 3:07, not sure what else could have caused the problem.我在 3:07 看到这种情况发生,不确定还有什么可能导致问题。

I have not added any lights or buildings to the map, could that be an issue?我没有在地图上添加任何灯光或建筑物,这会是个问题吗?

That shouldn't be an issue. It should load default lighting if you haven't added it.这应该不是问题。如果您尚未添加默认照明,它应该会加载它。

I see.. thanks  明白了。。谢谢@sangeetsu

I resolved this by placing the contents generated in theContent/<map_name>/OpenDrive/<map_name>.xodr into Dist/.../CarlaUE4/.../Content/<map_name>/OpenDrive/<map_name>.xml我通过将 Content/<map_name>/OpenDrive/<map_name>.xodr Dist/.../CarlaUE4/.../Content/<map_name>/OpenDrive/<map_name>.xml

OMG,Thank you so much,That sloved my problem perfectly!