CARLA
 
载入中...
搜索中...
未找到
pytorch.h
浏览该文件的文档.
1// Copyright (c) 2022 Computer Vision Center (CVC) at the Universitat Autonoma de Barcelona (UAB).
2// This work is licensed under the terms of the MIT license.
3// For a copy, see <https://opensource.org/licenses/MIT>.
4
5#pragma once
6#define _GLIBCXX_USE_CXX11_ABI 0
7
8#include <memory>
9#include <vector>
10
11namespace carla {
12namespace learning {
13
14 void test_learning();
15
16 struct NeuralModelImpl;
17
28
29 struct Inputs {
30 public:
35 float steering = 0;
36 float throttle = 0;
37 float braking = 0;
38 int terrain_type = 0;
39 bool verbose = false;
40 };
41
42 struct WheelOutput {
43 public:
44 float wheel_forces_x = 0;
45 float wheel_forces_y = 0;
46 float wheel_forces_z = 0;
47 float wheel_torque_x = 0;
48 float wheel_torque_y = 0;
49 float wheel_torque_z = 0;
50 std::vector<float> _particle_forces;
51 };
59
60 // Interface with the torch implementation
62 public:
63
65 void LoadModel(char* filename, int device);
66
67 void SetInputs(Inputs input);
68 void Forward();
69 void ForwardDynamic();
70 void ForwardCUDATensors();
72
74
75 private:
76 std::unique_ptr<NeuralModelImpl> Model;
79 };
80
81}
82}
void SetInputs(Inputs input)
Definition pytorch.cpp:177
std::unique_ptr< NeuralModelImpl > Model
Definition pytorch.h:76
void LoadModel(char *filename, int device)
Definition pytorch.cpp:162
void test_learning()
Definition pytorch.cpp:27
This file contains definitions of common data structures used in traffic manager.
Definition Carla.cpp:133
std::vector< float > _particle_forces
Definition pytorch.h:50