new timestamp
This commit is contained in:
parent
6423e7e66c
commit
6e86bec138
|
@ -44,7 +44,8 @@ namespace carla {
|
|||
Reward_Values();
|
||||
~Reward_Values();
|
||||
/// Time-stamp of the current frame.
|
||||
int32_t timestamp;
|
||||
int32_t platform_timestamp;
|
||||
int32_t game_timestamp;
|
||||
/// World location of the player.
|
||||
Vector2D player_location;
|
||||
/// Orientation of the player.
|
||||
|
|
|
@ -264,7 +264,8 @@ static bool getPNGImages(const std::vector<Image> &images, Reward &rwd){
|
|||
reward.set_player_y(values.player_location.y);
|
||||
reward.set_player_x(values.player_location.x);
|
||||
reward.set_speed(values.forward_speed);
|
||||
reward.set_timestamp(values.timestamp);
|
||||
reward.set_platform_timestamp(values.platform_timestamp);
|
||||
reward.set_game_timestamp(values.game_timestamp);
|
||||
|
||||
#ifdef WITH_TURBOJPEG
|
||||
|
||||
|
|
|
@ -78,13 +78,14 @@ message Reward {
|
|||
optional float acceleration_x = 9;
|
||||
optional float acceleration_y = 10;
|
||||
optional float acceleration_z = 11;
|
||||
optional int32 timestamp = 12;
|
||||
optional float ori_x = 13;
|
||||
optional float ori_y = 14;
|
||||
optional float ori_z = 15;
|
||||
optional bytes image_sizes = 16;
|
||||
optional bytes depth_sizes = 17;
|
||||
optional bytes images = 18;
|
||||
optional bytes depths = 19;
|
||||
optional int32 platform_timestamp = 12;
|
||||
optional int32 game_timestamp = 13;
|
||||
optional float ori_x = 14;
|
||||
optional float ori_y = 15;
|
||||
optional float ori_z = 16;
|
||||
optional bytes image_sizes = 17;
|
||||
optional bytes depth_sizes = 18;
|
||||
optional bytes images = 19;
|
||||
optional bytes depths = 20;
|
||||
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@ std::unique_ptr<carla::Reward_Values> makeReward() {
|
|||
reward->collision_car = 10.0f;
|
||||
reward->intersect_other_lane = 0.5f;
|
||||
reward->intersect_offroad = 0.5f;
|
||||
reward->game_timestamp = 0u;
|
||||
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
carla::Image img;
|
||||
|
@ -74,8 +75,9 @@ std::unique_ptr<carla::Reward_Values> makeReward() {
|
|||
reward->image_depth_0 = makeImage(imageWidth, imageHeight);
|
||||
reward->image_depth_1 = makeImage(imageWidth, imageHeight);
|
||||
*/
|
||||
static decltype(carla::Reward_Values::timestamp) timestamp = 0u;
|
||||
reward->timestamp = timestamp++;
|
||||
static decltype(carla::Reward_Values::platform_timestamp) timestamp = 0u;
|
||||
|
||||
reward->platform_timestamp = timestamp++;
|
||||
|
||||
return reward;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue