CARLA
 
载入中...
搜索中...
未找到
CarlaRecorderQuery.h
浏览该文件的文档.
1// Copyright (c) 2017 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
24#include "CarlaRecorderFrames.h"
25#include "CarlaRecorderInfo.h"
27#include "CarlaRecorderState.h"
30
32{
33
34 #pragma pack(push, 1)
35 struct Header
36 {
37 char Id;
38 uint32_t Size;
39 };
40 #pragma pack(pop)
41
42public:
43
44 // get general info
45 std::string QueryInfo(std::string Filename, bool bShowAll = false);
46 // get info about collisions
47 std::string QueryCollisions(std::string Filename, char Category1 = 'a', char Category2 = 'a');
48 // get info about blocked actors
49 std::string QueryBlocked(std::string Filename, double MinTime = 30, double MinDistance = 10);
50
51private:
52
53 std::ifstream File;
74
75 // read next header packet
76 bool ReadHeader(void);
77
78 // skip current packet
79 void SkipPacket(void);
80
81 // read the start info structure and check the magic string
82 bool CheckFileInfo(std::stringstream &Info);
83};
CarlaRecorderCollision Collision
CarlaRecorderAnimWalker Walker
CarlaRecorderEventParent EventParent
CarlaRecorderActorBoundingBox ActorBoundingBox
CarlaRecorderFrame Frame
CarlaRecorderEventDel EventDel
CarlaRecorderDoorVehicle DoorVehicle
CarlaRecorderLightVehicle LightVehicle
CarlaRecorderStateTrafficLight StateTraffic
CarlaRecorderPhysicsControl PhysicsControl
bool CheckFileInfo(std::stringstream &Info)
CarlaRecorderLightScene LightScene
std::string QueryBlocked(std::string Filename, double MinTime=30, double MinDistance=10)
std::string QueryCollisions(std::string Filename, char Category1='a', char Category2='a')
CarlaRecorderWalkerBones WalkerBones
CarlaRecorderKinematics Kinematics
CarlaRecorderAnimVehicle Vehicle
CarlaRecorderEventAdd EventAdd
CarlaRecorderPlatformTime PlatformTime
CarlaRecorderTrafficLightTime TrafficLightTime
CarlaRecorderPosition Position
CarlaRecorderInfo RecInfo
std::string QueryInfo(std::string Filename, bool bShowAll=false)