carla-simulator / carla

Open-source simulator for autonomous driving research.
http://carla.org
MIT License
11.11k stars 3.58k forks source link

Carla Autopilot #7299

Closed Hurair17 closed 5 months ago

Hurair17 commented 5 months ago

If you are reporting an issue, please use the following outline:

CARLA version: 0.9.14 Platform/OS: Window

I have trained a model which is used to predict the steering angle on the bases of camera sensor image. I drive the car on the bases of the steering value predicted by my AI model. Now I want to drive the car with my trained model but also get the steering value from Carla auto pilot. I am able to drive the car using autopilot and generate the steering value with a trained model. However, I want to drive the car with my model, and use the steering value generated by the autopilot solely for recording purposes.

The simple thing I want to do some changes in Carla autopilot code to just generate the steering angle value without using it for driving. I am not able to find the exact location where is the apply world.player.apply_control() function is defined for carla autopilot. I know that its in C++ but I am not able to find the exact file to do the changes in the C++ code.

xavisolesoft commented 5 months ago

Here you have the C++ code that is invoked when you call world.player.apply_control() in python:

https://github.com/carla-simulator/carla/blob/f477ddb18dbd07a9391c90ee32f1c1d600cbea39/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Actor/CarlaActor.cpp#L850