CARLA
Toggle main menu visibility
Loading...
Searching...
No Matches
Unreal
CarlaUnreal
Plugins
Carla
Source
Carla
Recorder
CarlaRecorderQuery.h
Go to the documentation of this file.
1
// Copyright (c) 2026 Computer Vision Center (CVC) at the Universitat Autonoma
2
// de Barcelona (UAB).
3
//
4
// This work is licensed under the terms of the MIT license.
5
// For a copy, see <https://opensource.org/licenses/MIT>.
6
7
#pragma once
8
9
#include <fstream>
10
11
#include "
CarlaRecorderTraficLightTime.h
"
12
#include "
CarlaRecorderPhysicsControl.h
"
13
#include "
CarlaRecorderPlatformTime.h
"
14
#include "
CarlaRecorderBoundingBox.h
"
15
#include "
CarlaRecorderKinematics.h
"
16
#include "
CarlaRecorderLightScene.h
"
17
#include "
CarlaRecorderLightVehicle.h
"
18
#include "
CarlaRecorderAnimWalker.h
"
19
#include "
CarlaRecorderAnimVehicle.h
"
20
#include "
CarlaRecorderAnimVehicleWheels.h
"
21
#include "
CarlaRecorderAnimBiker.h
"
22
#include "
CarlaRecorderVisualTime.h
"
23
#include "
CarlaRecorderCollision.h
"
24
#include "
CarlaRecorderEventAdd.h
"
25
#include "
CarlaRecorderEventDel.h
"
26
#include "
CarlaRecorderEventParent.h
"
27
#include "
CarlaRecorderFrames.h
"
28
#include "
CarlaRecorderInfo.h
"
29
#include "
CarlaRecorderPosition.h
"
30
#include "
CarlaRecorderState.h
"
31
#include "
CarlaRecorderWalkerBones.h
"
32
#include "
CarlaRecorderDoorVehicle.h
"
33
#include "
CarlaRecorderWeather.h
"
34
35
class
CarlaRecorderQuery
36
{
37
38
#pragma pack(push, 1)
39
struct
Header
40
{
41
char
Id
;
42
uint32_t
Size
;
43
};
44
#pragma pack(pop)
45
46
public
:
47
48
// get general info
49
std::string
QueryInfo
(std::string Filename,
bool
bShowAll =
false
);
50
// get info about collisions
51
std::string
QueryCollisions
(std::string Filename,
char
Category1 =
'a'
,
char
Category2 =
'a'
);
52
// get info about blocked actors
53
std::string
QueryBlocked
(std::string Filename,
double
MinTime = 30,
double
MinDistance = 10);
54
55
private
:
56
57
std::ifstream
File
;
58
Header
Header
;
59
CarlaRecorderInfo
RecInfo
;
60
CarlaRecorderFrame
Frame
;
61
CarlaRecorderEventAdd
EventAdd
;
62
CarlaRecorderEventDel
EventDel
;
63
CarlaRecorderEventParent
EventParent
;
64
CarlaRecorderPosition
Position
;
65
CarlaRecorderCollision
Collision
;
66
CarlaRecorderStateTrafficLight
StateTraffic
;
67
CarlaRecorderAnimVehicle
Vehicle
;
68
CarlaRecorderAnimWalker
Walker
;
69
CarlaRecorderAnimWheels
VehicleWheels
;
70
CarlaRecorderAnimBiker
Biker
;
71
CarlaRecorderVisualTime
VisualTime
;
72
CarlaRecorderLightVehicle
LightVehicle
;
73
CarlaRecorderLightScene
LightScene
;
74
CarlaRecorderKinematics
Kinematics
;
75
CarlaRecorderActorBoundingBox
ActorBoundingBox
;
76
CarlaRecorderPlatformTime
PlatformTime
;
77
CarlaRecorderPhysicsControl
PhysicsControl
;
78
CarlaRecorderTrafficLightTime
TrafficLightTime
;
79
CarlaRecorderWalkerBones
WalkerBones
;
80
CarlaRecorderDoorVehicle
DoorVehicle
;
81
CarlaRecorderWeather
Weather
;
82
83
// read next header packet
84
bool
ReadHeader
(
void
);
85
86
// skip current packet
87
void
SkipPacket
(
void
);
88
89
// read the start info structure and check the magic string
90
bool
CheckFileInfo
(std::stringstream &Info);
91
};
CarlaRecorderAnimBiker.h
CarlaRecorderAnimVehicleWheels.h
CarlaRecorderAnimVehicle.h
CarlaRecorderAnimWalker.h
CarlaRecorderBoundingBox.h
CarlaRecorderCollision.h
CarlaRecorderDoorVehicle.h
CarlaRecorderEventAdd.h
CarlaRecorderEventDel.h
CarlaRecorderEventParent.h
CarlaRecorderFrames.h
CarlaRecorderInfo.h
CarlaRecorderKinematics.h
CarlaRecorderLightScene.h
CarlaRecorderLightVehicle.h
CarlaRecorderPhysicsControl.h
CarlaRecorderPlatformTime.h
CarlaRecorderPosition.h
CarlaRecorderState.h
CarlaRecorderTraficLightTime.h
CarlaRecorderVisualTime.h
CarlaRecorderWalkerBones.h
CarlaRecorderWeather.h
CarlaRecorderQuery
Definition
CarlaRecorderQuery.h:36
CarlaRecorderQuery::Collision
CarlaRecorderCollision Collision
Definition
CarlaRecorderQuery.h:65
CarlaRecorderQuery::Walker
CarlaRecorderAnimWalker Walker
Definition
CarlaRecorderQuery.h:68
CarlaRecorderQuery::EventParent
CarlaRecorderEventParent EventParent
Definition
CarlaRecorderQuery.h:63
CarlaRecorderQuery::ActorBoundingBox
CarlaRecorderActorBoundingBox ActorBoundingBox
Definition
CarlaRecorderQuery.h:75
CarlaRecorderQuery::Frame
CarlaRecorderFrame Frame
Definition
CarlaRecorderQuery.h:60
CarlaRecorderQuery::EventDel
CarlaRecorderEventDel EventDel
Definition
CarlaRecorderQuery.h:62
CarlaRecorderQuery::ReadHeader
bool ReadHeader(void)
Definition
CarlaRecorderQuery.cpp:89
CarlaRecorderQuery::DoorVehicle
CarlaRecorderDoorVehicle DoorVehicle
Definition
CarlaRecorderQuery.h:80
CarlaRecorderQuery::Biker
CarlaRecorderAnimBiker Biker
Definition
CarlaRecorderQuery.h:70
CarlaRecorderQuery::VisualTime
CarlaRecorderVisualTime VisualTime
Definition
CarlaRecorderQuery.h:71
CarlaRecorderQuery::LightVehicle
CarlaRecorderLightVehicle LightVehicle
Definition
CarlaRecorderQuery.h:72
CarlaRecorderQuery::VehicleWheels
CarlaRecorderAnimWheels VehicleWheels
Definition
CarlaRecorderQuery.h:69
CarlaRecorderQuery::StateTraffic
CarlaRecorderStateTrafficLight StateTraffic
Definition
CarlaRecorderQuery.h:66
CarlaRecorderQuery::PhysicsControl
CarlaRecorderPhysicsControl PhysicsControl
Definition
CarlaRecorderQuery.h:77
CarlaRecorderQuery::CheckFileInfo
bool CheckFileInfo(std::stringstream &Info)
Definition
CarlaRecorderQuery.cpp:107
CarlaRecorderQuery::LightScene
CarlaRecorderLightScene LightScene
Definition
CarlaRecorderQuery.h:73
CarlaRecorderQuery::QueryBlocked
std::string QueryBlocked(std::string Filename, double MinTime=30, double MinDistance=10)
Definition
CarlaRecorderQuery.cpp:1028
CarlaRecorderQuery::QueryCollisions
std::string QueryCollisions(std::string Filename, char Category1='a', char Category2='a')
Definition
CarlaRecorderQuery.cpp:848
CarlaRecorderQuery::WalkerBones
CarlaRecorderWalkerBones WalkerBones
Definition
CarlaRecorderQuery.h:79
CarlaRecorderQuery::Kinematics
CarlaRecorderKinematics Kinematics
Definition
CarlaRecorderQuery.h:74
CarlaRecorderQuery::File
std::ifstream File
Definition
CarlaRecorderQuery.h:57
CarlaRecorderQuery::Vehicle
CarlaRecorderAnimVehicle Vehicle
Definition
CarlaRecorderQuery.h:67
CarlaRecorderQuery::Weather
CarlaRecorderWeather Weather
Definition
CarlaRecorderQuery.h:81
CarlaRecorderQuery::EventAdd
CarlaRecorderEventAdd EventAdd
Definition
CarlaRecorderQuery.h:61
CarlaRecorderQuery::SkipPacket
void SkipPacket(void)
Definition
CarlaRecorderQuery.cpp:102
CarlaRecorderQuery::PlatformTime
CarlaRecorderPlatformTime PlatformTime
Definition
CarlaRecorderQuery.h:76
CarlaRecorderQuery::TrafficLightTime
CarlaRecorderTrafficLightTime TrafficLightTime
Definition
CarlaRecorderQuery.h:78
CarlaRecorderQuery::Position
CarlaRecorderPosition Position
Definition
CarlaRecorderQuery.h:64
CarlaRecorderQuery::RecInfo
CarlaRecorderInfo RecInfo
Definition
CarlaRecorderQuery.h:59
CarlaRecorderQuery::QueryInfo
std::string QueryInfo(std::string Filename, bool bShowAll=false)
Definition
CarlaRecorderQuery.cpp:136
CarlaRecorderActorBoundingBox
Definition
CarlaRecorderBoundingBox.h:26
CarlaRecorderAnimBiker
Definition
CarlaRecorderAnimBiker.h:14
CarlaRecorderAnimVehicle
Definition
CarlaRecorderAnimVehicle.h:14
CarlaRecorderAnimWalker
Definition
CarlaRecorderAnimWalker.h:14
CarlaRecorderAnimWheels
Definition
CarlaRecorderAnimVehicleWheels.h:27
CarlaRecorderCollision
Definition
CarlaRecorderCollision.h:15
CarlaRecorderDoorVehicle
Definition
CarlaRecorderDoorVehicle.h:15
CarlaRecorderEventAdd
Definition
CarlaRecorderEventAdd.h:27
CarlaRecorderEventDel
Definition
CarlaRecorderEventDel.h:13
CarlaRecorderEventParent
Definition
CarlaRecorderEventParent.h:13
CarlaRecorderFrame
Definition
CarlaRecorderFrames.h:13
CarlaRecorderInfo
Definition
CarlaRecorderInfo.h:15
CarlaRecorderKinematics
Definition
CarlaRecorderKinematics.h:14
CarlaRecorderLightScene
Definition
CarlaRecorderLightScene.h:15
CarlaRecorderLightVehicle
Definition
CarlaRecorderLightVehicle.h:15
CarlaRecorderPhysicsControl
Definition
CarlaRecorderPhysicsControl.h:16
CarlaRecorderPlatformTime
Definition
CarlaRecorderPlatformTime.h:14
CarlaRecorderPosition
Definition
CarlaRecorderPosition.h:14
CarlaRecorderQuery::Header
Definition
CarlaRecorderQuery.h:40
CarlaRecorderQuery::Header::Size
uint32_t Size
Definition
CarlaRecorderQuery.h:42
CarlaRecorderQuery::Header::Id
char Id
Definition
CarlaRecorderQuery.h:41
CarlaRecorderStateTrafficLight
Definition
CarlaRecorderState.h:15
CarlaRecorderTrafficLightTime
Definition
CarlaRecorderTraficLightTime.h:14
CarlaRecorderVisualTime
Definition
CarlaRecorderVisualTime.h:14
CarlaRecorderWalkerBones
Definition
CarlaRecorderWalkerBones.h:24
CarlaRecorderWeather
Definition
CarlaRecorderWeather.h:16
Generated by
1.18.0