Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronous and Asynchronous mode in Carla_Apollo_Bridge #198

Open
AOOOOOA opened this issue Jun 25, 2024 · 9 comments
Open

Synchronous and Asynchronous mode in Carla_Apollo_Bridge #198

AOOOOOA opened this issue Jun 25, 2024 · 9 comments

Comments

@AOOOOOA
Copy link

AOOOOOA commented Jun 25, 2024

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
Copy link

hlyyy commented Jun 30, 2024

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
Copy link
Author

AOOOOOA commented Jul 1, 2024

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
Copy link

hlyyy commented Jul 1, 2024

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
Copy link
Author

AOOOOOA commented Jul 1, 2024

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
Copy link

hlyyy commented Jul 1, 2024

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
Copy link
Author

AOOOOOA commented Jul 1, 2024

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
Copy link

hlyyy commented Jul 1, 2024

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
Copy link
Author

AOOOOOA commented Jul 1, 2024

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
Copy link

hlyyy commented Jul 1, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants