ucla-mobility / OpenCDA

A generalized framework for prototyping full-stack cooperative driving automation applications under CARLA+SUMO.
Other
988 stars 197 forks source link

Where to find the coordinates for a spawn location #180

Closed JeanPhilippeMonteuuis closed 1 year ago

JeanPhilippeMonteuuis commented 1 year ago

Hello,

My goal is to spawn the ego-vehicle at a specific location in Town07 (e.g., singleTown07_carla). In the picture, the red dot is the spawn position. The blue dot is the destination. Town07

I do not understand where/how to retrieve the coordinates used in spawn_position and destination (see lines below)

scenario: single_cav_list: # this is for merging vehicle or single cav without v2x

I have tried to use the x, y , z coordinates provided in the Unreal Engine Editor but it seems off. Can you provide me some guidance or an example?

Thank you!

DerrickXuNu commented 1 year ago

Thanks for using OpenCDA! I am a little confused about your question. What do you mean "it seems off"?

JeanPhilippeMonteuuis commented 1 year ago

Hey @DerrickXuNu , Thank you for your reply.

I would like to understand: How/Where do you pick x,y,z for spawn_position (red dot in the figure) and destination (blue dot in the figure) to fit my case (figure above)?

About "It seems off", it means to retrieve x,y,z coordinates:

DerrickXuNu commented 1 year ago

Thanks for clarifying your question.

How/Where do you pick x,y,z for spawn_position (red dot in the figure) and destination (blue dot in the figure) to fit my case (figure above)? --> I used UE4Editor (build froun source version) to find the available spawn points.

It seems off -> there are several things you want to try: 1) Make sure you set the spectator to the vehicle you spawn, so that the CarlaUE4 will focus on it automatically 2) Tune the Z value. It maybe your Z is too low so it can not spawn. 3) Check whether there is some error message when you start your script