Git Product home page Git Product logo

Comments (6)

GoodarzMehr avatar GoodarzMehr commented on July 22, 2024 1

I think you have to implement this yourself, i.e. write some code that gets the state of each traffic light from SUMO and then sets the state of the corresponding traffic light in CARLA. There may be a simpler way of doing this (e.g. by passing an argument) but I'm not aware if it.

from carla.

GoodarzMehr avatar GoodarzMehr commented on July 22, 2024

You can use the carla.TrafficLight class' methods (set_state in particular) to synchronize the visual appearance of each traffic light with its state in SUMO.

from carla.

DanielSioldea avatar DanielSioldea commented on July 22, 2024

You can use the carla.TrafficLight class' methods (set_state in particular) to synchronize the visual appearance of each traffic light with its state in SUMO.

I'm sorry for the question, I am still learning where everything is with CARLA, but would I just include this as an argument when calling "run_syncronization.py", or is there another way to go about doing this?

from carla.

Blyron avatar Blyron commented on July 22, 2024

You will need to implement youself as @GoodarzMehr suggested. If you are fine with this answer, please feel free to close the issue

from carla.

DanielSioldea avatar DanielSioldea commented on July 22, 2024

You will need to implement youself as @GoodarzMehr suggested. If you are fine with this answer, please feel free to close the issue

I am able to get SUMO states through the TraCI API. I have an idea of how to link the SUMO states to the CARLA states using the code snippet from the carla.TrafficLight.set_state. However I am still a bit lost on how to link that to the lights placed in Unreal Engine. Any further information, examples, or references would be much appreciated. Thank you again.

from carla.

GoodarzMehr avatar GoodarzMehr commented on July 22, 2024

The carla.World object has several methods for getting traffic lights during a simulation, and if I understand your problem correctly the get_traffic_lights_in_junction() method in particular (and maybe get_traffic_light_from_opendrive_id()) can be useful in your case.

from carla.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.