johschmitz / blender-driving-scenario-creator Goto Github PK
View Code? Open in Web Editor NEWBlender add-on for creating OpenDRIVE and OpenSCENARIO based automotive driving scenarios including 3D models
License: GNU General Public License v3.0
Blender add-on for creating OpenDRIVE and OpenSCENARIO based automotive driving scenarios including 3D models
License: GNU General Public License v3.0
Hi,
I just tried the add on for Blender 2.93 and I wanted to export the following map
When exporting, I received the following error:
Python: Traceback (most recent call last):
File ".config/blender/2.93/scripts/addons/blender-driving-scenario-creator/export.py", line 45, in execute
self.export_openscenario(context, self.directory)
File ".config/blender/2.93/scripts/addons/blender-driving-scenario-creator/export.py", line 223, in export_openscenario
if incoming_roads[k].predecessor:
AttributeError: 'NoneType' object has no attribute 'predecessor'
location: :-1
However, some folders were created (catalogs, models, scenegraph, xodr). But the xodr folder is empty, so I guess there is a problem with the OpenDrive file generation (would also match with 'predecessor' attribute I guess?)
Would be cool, if you could have a look at that, maybe try the blender file or say, what I did wrong. That would be awesome. :)
Hi
Would you please explain how I can export the roads designed in blender driving scenario creator to Carla?
which format should I export?
I wanted to design my own road and then open it in the Carla simulator, then I wanted to add objects such as a vehicle, pedestrian, bicycle, and .. (in Carla) to generate my scenario.
Hi. Thanks for making and distributing a good add-on.
I'm practicing making a road with this, how do I make a ramp? Any ideas?
Really impressive tool!
Are the Spiral and Polynomial functions placeholders or do they function? They are greyed out in the plug-in I have.
These can be necessary to fit the xodr standard for linking some more complex road structures together.
Hello ! I am having trouble with the installation. I do have the scenariogeneration module installed but I still have this error when I want to enable the add-on.
Traceback (most recent call last):
File "C:\Program Files (x86)\Steam\steamapps\common\Blender\3.0\scripts\modules\addon_utils.py", line 351, in enable
mod = import(module_name)
File "C:\Users\diane\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\blender-driving-scenario-creator_init_.py", line 19, in
from . export import DSC_OT_export
File "C:\Users\diane\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\blender-driving-scenario-creator\export.py", line 17, in
from scenariogeneration import xosc
ModuleNotFoundError: No module named 'scenariogeneration'
Has someone had the same error ? Thank you !
Hi, thanks for your contribution, it's a wonderful project for me, combine blender and openDrive is a genius idea!
but when i reading the code , here are some suggestion for your pro
The function's job is to translate the "sample points" to "Mesh", so may be we can delete the strip param in this function ? for this, we just delete none type points in "get_road_sample_points".
def get_road_vertices_edges_faces(self, road_sample_points): vertices = [] edges = [] faces = [] idx_vertex = 0 point_index = 0 while point_index < len(road_sample_points): for idx_face_strip in range(len(road_sample_points[point_index])): if not road_sample_points[point_index][0]: continue samples_right = road_sample_points[point_index + 1][idx_face_strip] samples_left = road_sample_points[point_index][idx_face_strip] num_vertices = len(samples_left) + len(samples_right) vertices += samples_right + samples_left[::-1] edges += [[idx_vertex + n, idx_vertex + n + 1] for n in range(num_vertices - 1)] \ + [[idx_vertex + num_vertices - 1, idx_vertex]] faces += [[idx_vertex + n for n in range(num_vertices)]] idx_vertex += num_vertices point_index = point_index + 2 return vertices, edges, faces
and when i want to add a solid_solid type for it, i found maybe it's better to add "s" and "t" to strip struct, because solid_solid neet 3 "t" value to create mesh (yellow line, asphalt line, yellow lin) , for this struct, i have to write this code anywhere
if strip.type_road_mark == 'solid_solid': do something
Attribute Error: 'BMLayerAccessVert' object has no attribute crease
in junction.py line 282 in get_mesh function
Hello @johschmitz , I am new to this openscenario and CARLA simulator, Is it possible to create a specific scenario, for example, a overtaking scenario in a two-way highway with this blender creator and to import it to CARLA for testing?
Also, just an add-on question from my side, Are there any solutions?/tools for creating concrete scenarios from functional scenarios for testing with CARLA simulator?
Hi! Thank you for the great software.
After I create OpenScenario (trajectories and car), I confirmed that xosc file has been created properly.
However, I want to check in the Blender layout that the scenario was created well as I expected.
Playing animation does not work so I can't check my scenario was created properly or not.
As I am new to blender, I want to know if these features are supported or not .
System: Ubuntu 22.04
Blender 3.5
I have run ./python3.10 -m ensurepip.
It shows satisfaction, but there is no pip3 in the folder. Thus, the scenariogeneration cannot be installed by ./pip3 install scenariogeneration and the addon does not work well.
I looked for some methods to address this issue. Fortunately, I got it.
Try download install package from https://pypi.python.org/pypi/pip#downloads and use ./python[python version] setup.py install to install pip.
I share this with someone who has the same issue here.
Hi!
I'm using your add-on to create custom maps for CARLA. It works fine, but I'm facing some problems when connecting on and off ramps of highways to the other road network. Here is an example:
What's the best way to connect the off ramp of the highway to a default street? When I force it to become a single lane by closing it, I cannot connect it, because it uses the former left lane (off ramp) and connects it with the right lane of the default street.
BTW: I used the option "close" when turning the double lane off ramp to a single lane street. Why is this option not available any in current releases (I used 0.21.1)?
Thanks in advance!
Hello
Your tool is very useful to create OpenDrive files. I just started using the tool and have a couple of questions regarding the tool.
How can i create a map based on real world. I need to create a rough road based on google map. i roughly estimated the distances from the google map. I also created a straight road but seems like i can't control the length of the road. Is there any option to adjust the length of the road after plotting it. I saw the scale option but i think its not the right one as the markings are streching while using it. Any method i am missing ?
Is there any another approach rather than the distance to create a map based on google map?
How to join two roads expecially a road that goes left from the main road like a cut out road from the Autobahn?
Thanks
Hi, I'm having trouble creating a highway entrance/exit. I would like to know if there is anything about creating the roadway by entering the exact coordinates and heading of the startpoints/endpoints, or a way to update the coordinates of the startpoints/endpoints of the road section after the first creation.
Thanks a lot.
PS. If this is not the proper channel to ask for it, I do apologize
where to download driving scenario generator release .zip archive?
Hello, I have been working with the Driving Scenario Creator and have made a list of suggestions that can improve the workflow.
I like that I can make custom roads. However, it takes a very long time to create a version of a road that exists in real life. So far, my workflow has consisted of creating the road, checking if it fits, deleting the road, changing some settings and repeat. In other words, a lot of trial and error.
My suggestion is to have a section in the object properties menu that holds the values for the created road, which can then be changed dynamically to update it when it's already placed. This would also make changing previously placed roads possible if they need to be adjusted to fit a newer one. I believe this would speed up the process of making and connecting roads by a lot.
The road presets that are given by default are a great starting point in most cases. The problem I am having is that sometimes I would need one or a few settings that are different from the preset, which I need to use more than once. It would be nice to be able to save my own presets and maybe edit and delete them as well.
Three great additions to the broken line setting would be:
Thank you!
Hello,
Since several issues refer to this task (#21, #14, #4), I thought writing about my experience here would be useful. I ran both tools on Windows. Here was the process:
make import
from the CARLA project directory. It did not give any error. It creates a map_package directory in the <CARLA project folder>/Unreal/CarlaUE4/Content
directory.make launch
from the CARLA project directory. Clicked the play button on Unreal Engine to start the server.<CARLA project folder>/PythonAPI/util
directory, I ran the config.py
script using the following command: python config.py --map <map name>
This is the same map name of the fbx and opendrive from earlier. This reloaded the scene with the imported map with lane markings. I also ran /PythonAPI/examples/generate_traffic.py to test simulation capability and it worked.Here are the outputs on Blender and CARLA:
Hello,
Using a parser for OpenDRIVE and its capability to generate .obj files, I was able to create an OpenDRIVE importer for Blender. I separated the .obj files for multiple elements so that each can have a different material applied to them. Currently, it's just the base road mesh and road markings. Luckily, all the imported meshes seem to have the same origin so no transformations are needed. Once the .obj files are brought in, I can apply materials and create a hierarchy for the meshes.
We can completely run the process without opening the Blender GUI to go from OpenDRIVE to FBX using the command blender --background --python <scriptname.py> -- <path to .obj 1> <path to .obj 2> <path to fbx output>
. This can be combined with the steps mentioned in #23 to bring generated maps into CARLA if needed.
Hi, Is there any plan to support snapping to prebuilt geometries when creating roads?
When executing sudo -E ./pip3 install scenariogeneration
I get the follwing error:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
ipympl 0.9.3 requires matplotlib<4,>=3.4.0, which is not installed.
ipympl 0.9.3 requires pillow, which is not installed.
fmpy 0.3.15 requires attrs, which is not installed.
fmpy 0.3.15 requires lark, which is not installed.
fmpy 0.3.15 requires lxml, which is not installed.
fmpy 0.3.15 requires pytz, which is not installed.
I just executed it again and this time, no errors popped up. Is this normal behavior?
After installing the plugin, enable error reporting : No module named 'attr'
Hello,
I'm currently using your plugin to design a road network for one of our use cases. However, I encountered a bug after exporting the project using the plugin's export option. The problem arises with the exported .xodr file when converting it to a .net.xml using netconvert (a SUMO tool). This issue only occurs when I add a junction to the network. I've attached screenshots below to illustrate the steps for reproducing the issue.
Note: I am using the latest release of both tools.
After reverse engineering, I discovered that the issue is caused by the predecessor
and successor
XML tags within the link
XML tags.
As the log indicates, the id attribute
used with the predecessor and successor tags should be of type string int
rather than string float
.
Therefore, to resolve the issue, simply replace all occurrences of the predecessor and successor tag IDs with a string int
, as shown in the image below:
By following these steps, you should be able to resolve the issue and successfully convert the file as shown below:
Thanks in advance!
Happy coding!
Is it on the roadmap to also be able to model and export OpenCRG data alongside the OpenDRIVE? This would enable to build more detailed 3D models of the road surface for sensor simulation while also enabling a consistent vehicle dynamics simulation.
Hi, I get the following error when trying to enable the blender-driving-scenario-creator
add-on.
Here some remarks for reproducing the error. It would be great if you could help me with this issue.
Operating System Ubuntu 18.04.6 LTS
Step where the problem occurs: Add-on (Linux and Windows)
Blender version: Blender 3.2.2
Notes: I tried installing blender both under /opt
and under my home and nothing changed
Printout when trying to enable the add-on:
Read prefs: /home/aaa/.config/blender/3.2/config/userpref.blend
Traceback (most recent call last):
File "/home/aaa/blender-3/3.2/scripts/modules/addon_utils.py", line 335, in enable
mod = __import__(module_name)
File "/home/aaa/.config/blender/3.2/scripts/addons/blender-driving-scenario-creator/__init__.py", line 19, in <module>
from . export import DSC_OT_export
File "/home/aaa/.config/blender/3.2/scripts/addons/blender-driving-scenario-creator/export.py", line 17, in <module>
from scenariogeneration import xosc
File "/home/aaa/blender-3/3.2/python/lib/python3.10/site-packages/scenariogeneration/__init__.py", line 7, in <module>
from .esmini_runner import *
File "/home/aaa/blender-3/3.2/python/lib/python3.10/site-packages/scenariogeneration/esmini_runner.py", line 15, in <module>
from .xodr import OpenDrive
File "/home/aaa/blender-3/3.2/python/lib/python3.10/site-packages/scenariogeneration/xodr/__init__.py", line 11, in <module>
from .signals_objects import *
File "/home/aaa/blender-3/3.2/python/lib/python3.10/site-packages/scenariogeneration/xodr/signals_objects.py", line 12, in <module>
from lib2to3.pytree import convert
ModuleNotFoundError: No module named 'lib2to3'
I tried to install it with ./python3.10 -m pip install 2to3
in /home/aaa/blender-3/3.2/python/bin
but I didn't notice any improvements.
Thanks
Hi, I don't know if it could be considered an issue but I was wondering if there is any suggestion on how to
automatically add OpenDrive roads on a set of curves (eventually imported from OSM) directly in Blender.
Thanks a lot.
PS. If this is not the proper channel to ask for it, I do apologize
I am unable to join my desired lanes in a junction. Instead the tool is snapping the lane to the center and I don't know if its a technical issue or something regarding snap settings which I should turn off.
Hi,
Thank you for the great software. I wonder if it is possible to import pre-existing opendrive maps and then edit them or define a scenario on that?
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.