Carla: How to get live vehicle control used during the simulation?

Created on 5 Apr 2018  路  1Comment  路  Source: carla-simulator/carla

Hi,
is there the chance to get the vehicle control parameters (_steer, throttle, brake, hand_brake_ and _reverse_) from CARLA server - regardless if the simulation is driven by autopilot or manual controls?
I need to store driving information in a ROS bag format to be used for simulation playback.

Thanks for your support,
Alberto

Most helpful comment

If the car was driven in autopilot mode during the simulation you can just use:
measurements.player_measurements.autopilot_control if you are not manually adding the noise yourself to it.
If you are adding noise or you are running the simulation in manual mode, you can store the control command from the client before sending it to the CARLA server in the specified step:
self.client.send_control(control)

You can refer to https://github.com/carla-simulator/carla/blob/master/PythonClient/manual_control.py on how these codes are used.

Reading the control commands already implemented (in autopilot / manual mode) are not available as part of measurement to my knowledge, so don't see how you would get them from the server.

You can only get the control command yet to be implemented.

>All comments

If the car was driven in autopilot mode during the simulation you can just use:
measurements.player_measurements.autopilot_control if you are not manually adding the noise yourself to it.
If you are adding noise or you are running the simulation in manual mode, you can store the control command from the client before sending it to the CARLA server in the specified step:
self.client.send_control(control)

You can refer to https://github.com/carla-simulator/carla/blob/master/PythonClient/manual_control.py on how these codes are used.

Reading the control commands already implemented (in autopilot / manual mode) are not available as part of measurement to my knowledge, so don't see how you would get them from the server.

You can only get the control command yet to be implemented.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mhusseinsh picture mhusseinsh  路  3Comments

chankim picture chankim  路  3Comments

rowanmcallister picture rowanmcallister  路  3Comments

cstamatiadis picture cstamatiadis  路  3Comments

phzeller picture phzeller  路  3Comments