guardstrikelab / carla_apollo_bridge

This project aims to provide a data and control bridge for the communication between the latest version of Apollo and Carla.
Apache License 2.0
311 stars 91 forks source link

Synchronous and Asynchronous mode in Carla_Apollo_Bridge #198

Open AOOOOOA opened 1 week ago

AOOOOOA commented 1 week ago

Hi,

Thanks for your brilliant work! However, I have a few questions about the synchronous and asynchronous mode.

Carla has sync mode and async mode with fixed or varied time step as they introduced: https://carla.readthedocs.io/en/latest/adv_synchrony_timestep/#:~:text=By%20default%2C%20CARLA%20runs%20in,only%20one%20client%20should%20tick.

The main.py in Carla_Apollo_Bridge adopts the async mode with varied time steps: image

Is this a mandatory setting to guarantee the normal running of Apollo in Carla? Can I change it to sync mode with a fixed time step?

Thanks for your kind answer! @XiaoFei9704 @synkrotron @meua

hlyyy commented 5 days ago

Hi, I have the same question. I found that creating a synchronous client based on the bridge is useless. Do you have any other solution to solve this problem?

AOOOOOA commented 4 days ago

Hi, I have the same question. I found that creating a synchronous client based on the bridge is useless. Do you have any other solution to solve this problem?

Hi, I took a closer look at the code and found out they have set the mode to sync+fixed time-stamp. The figure above is the final setting after running. What do you mean of the "useless", the vehicle in Carla can not execute the same command as in DreamView?

hlyyy commented 3 days ago

Hi, I have the same question. I found that creating a synchronous client based on the bridge is useless. Do you have any other solution to solve this problem?

Hi, I took a closer look at the code and found out they have set the mode to sync+fixed time-stamp. The figure above is the final setting after running. What do you mean of the "useless", the vehicle in Carla can not execute the same command as in DreamView?

Not really. I created a synchronous client based on the bridge to control the movement of the car. But the sync mode didn't work. When I haven't run world.tick(), the car is already moving. I guess it's due to the sync mode in the bridge you mentioned.

AOOOOOA commented 3 days ago

Hi, I have the same question. I found that creating a synchronous client based on the bridge is useless. Do you have any other solution to solve this problem?

Hi, I took a closer look at the code and found out they have set the mode to sync+fixed time-stamp. The figure above is the final setting after running. What do you mean of the "useless", the vehicle in Carla can not execute the same command as in DreamView?

Not really. I created a synchronous client based on the bridge to control the movement of the car. But the sync mode didn't work. When I haven't run world.tick(), the car is already moving. I guess it's due to the sync mode in the bridge you mentioned.

The car already moving in both Apollo DreamView and Carla ?

hlyyy commented 3 days ago

Hi, I have the same question. I found that creating a synchronous client based on the bridge is useless. Do you have any other solution to solve this problem?

Hi, I took a closer look at the code and found out they have set the mode to sync+fixed time-stamp. The figure above is the final setting after running. What do you mean of the "useless", the vehicle in Carla can not execute the same command as in DreamView?

Not really. I created a synchronous client based on the bridge to control the movement of the car. But the sync mode didn't work. When I haven't run world.tick(), the car is already moving. I guess it's due to the sync mode in the bridge you mentioned.

The car already moving in both Apollo DreamView and Carla ?

Yes. And it is not controlled by the sync client I created.

AOOOOOA commented 3 days ago

Hi, I have the same question. I found that creating a synchronous client based on the bridge is useless. Do you have any other solution to solve this problem?

Hi, I took a closer look at the code and found out they have set the mode to sync+fixed time-stamp. The figure above is the final setting after running. What do you mean of the "useless", the vehicle in Carla can not execute the same command as in DreamView?

Not really. I created a synchronous client based on the bridge to control the movement of the car. But the sync mode didn't work. When I haven't run world.tick(), the car is already moving. I guess it's due to the sync mode in the bridge you mentioned.

The car already moving in both Apollo DreamView and Carla ?

Yes. And it is not controlled by the sync client I created.

It is wired. Could you please provide the code so that I can reproduce the issue?

hlyyy commented 3 days ago

Hi, I have the same question. I found that creating a synchronous client based on the bridge is useless. Do you have any other solution to solve this problem?

Hi, I took a closer look at the code and found out they have set the mode to sync+fixed time-stamp. The figure above is the final setting after running. What do you mean of the "useless", the vehicle in Carla can not execute the same command as in DreamView?

Not really. I created a synchronous client based on the bridge to control the movement of the car. But the sync mode didn't work. When I haven't run world.tick(), the car is already moving. I guess it's due to the sync mode in the bridge you mentioned.

The car already moving in both Apollo DreamView and Carla ?

Yes. And it is not controlled by the sync client I created.

It is wired. Could you please provide the code so that I can reproduce the issue?

I guess it is because Carla only allow one client to use sync mode. And the bridge has already used a sync mode. So the sync client i created didn't work. I was also confused when i encountered this problem.

AOOOOOA commented 3 days ago

Hi, I have the same question. I found that creating a synchronous client based on the bridge is useless. Do you have any other solution to solve this problem?

Hi, I took a closer look at the code and found out they have set the mode to sync+fixed time-stamp. The figure above is the final setting after running. What do you mean of the "useless", the vehicle in Carla can not execute the same command as in DreamView?

Not really. I created a synchronous client based on the bridge to control the movement of the car. But the sync mode didn't work. When I haven't run world.tick(), the car is already moving. I guess it's due to the sync mode in the bridge you mentioned.

The car already moving in both Apollo DreamView and Carla ?

Yes. And it is not controlled by the sync client I created.

It is wired. Could you please provide the code so that I can reproduce the issue?

I guess it is because Carla only allow one client to use sync mode. And the bridge has already used a sync mode. So the sync client i created didn't work. I was also confused when i encountered this problem.

No, as it said in Carla Documentation, the sync mode is applied to the global setting. Only one client needs to call the world.tick(). That's why I feel wired about the issue you mentioned.

hlyyy commented 3 days ago

Hi, I have the same question. I found that creating a synchronous client based on the bridge is useless. Do you have any other solution to solve this problem?

Hi, I took a closer look at the code and found out they have set the mode to sync+fixed time-stamp. The figure above is the final setting after running. What do you mean of the "useless", the vehicle in Carla can not execute the same command as in DreamView?

Not really. I created a synchronous client based on the bridge to control the movement of the car. But the sync mode didn't work. When I haven't run world.tick(), the car is already moving. I guess it's due to the sync mode in the bridge you mentioned.

The car already moving in both Apollo DreamView and Carla ?

Yes. And it is not controlled by the sync client I created.

It is wired. Could you please provide the code so that I can reproduce the issue?

I guess it is because Carla only allow one client to use sync mode. And the bridge has already used a sync mode. So the sync client i created didn't work. I was also confused when i encountered this problem.

No, as it said in Carla Documentation, the sync mode is applied to the global setting. Only one client needs to call the world.tick().

I understand! But how do we control the simulation and the car based on the bridge? I mean getting the vehicle information or controlling other actors movement in each frame.