CARLA
Loading...
Searching...
No Matches
test_multigpu_world_state.cpp File Reference
#include "test.h"
#include <carla/multigpu/frameDataCodec.h>
#include <carla/multigpu/worldState.h>
#include <cstring>
#include <sstream>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

struct  ActorAppearance
 An actor's appearance on the primary that a mirror does not get from its spawn attributes or pose. More...
struct  ActorAppearances
 Frame data packet 30, on change and on every full resync. More...
struct  WorldGlobals
 Frame data packet 28, on every frame: world-wide state a client can change on the primary that changes what sensors see or measure. More...
struct  WorldObjects
 Frame data packet 29, on change and on every full resync: map objects whose state is not part of any actor. More...

Functions

std::pair< uint16_t, uint16_t > ComputeMapLayerDiff (uint16_t current, uint16_t desired)
 The map layers to load and to unload to go from current to desired.
std::pair< std::vector< uint64_t >, std::vector< uint64_t > > DiffSortedIds (const std::vector< uint64_t > &current, const std::vector< uint64_t > &desired)
 Ids in desired and not in current (first), and the other way round (second).
 TEST (MultiGpuWorldState, an_empty_set_is_not_an_absent_one)
 TEST (MultiGpuWorldState, an_impossible_object_count_fails)
 TEST (MultiGpuWorldState, appearance_round_trip)
 TEST (MultiGpuWorldState, diff_sorted_ids)
 TEST (MultiGpuWorldState, globals_round_trip)
 TEST (MultiGpuWorldState, layer_diff)
 TEST (MultiGpuWorldState, objects_round_trip)
 TEST (MultiGpuWorldState, objects_with_an_unknown_field_keep_the_set)

Function Documentation

◆ ComputeMapLayerDiff()

std::pair< uint16_t, uint16_t > carla::multigpu::ComputeMapLayerDiff ( uint16_t current,
uint16_t desired )
inline

The map layers to load and to unload to go from current to desired.

Definition at line 230 of file worldState.h.

Referenced by TEST().

◆ DiffSortedIds()

std::pair< std::vector< uint64_t >, std::vector< uint64_t > > carla::multigpu::DiffSortedIds ( const std::vector< uint64_t > & current,
const std::vector< uint64_t > & desired )
inline

Ids in desired and not in current (first), and the other way round (second).

Both inputs sorted.

Definition at line 236 of file worldState.h.

Referenced by TEST().

◆ TEST() [1/8]

TEST ( MultiGpuWorldState ,
an_empty_set_is_not_an_absent_one  )

◆ TEST() [2/8]

TEST ( MultiGpuWorldState ,
an_impossible_object_count_fails  )

◆ TEST() [3/8]

◆ TEST() [4/8]

TEST ( MultiGpuWorldState ,
diff_sorted_ids  )

Definition at line 136 of file test_multigpu_world_state.cpp.

References DiffSortedIds(), and TEST().

◆ TEST() [5/8]

◆ TEST() [6/8]

TEST ( MultiGpuWorldState ,
layer_diff  )

Definition at line 129 of file test_multigpu_world_state.cpp.

References ComputeMapLayerDiff(), and TEST().

◆ TEST() [7/8]

TEST ( MultiGpuWorldState ,
objects_round_trip  )

◆ TEST() [8/8]