From 538fc7d30beef630aa5fb2185e84bf5074bcfa29 Mon Sep 17 00:00:00 2001 From: Arik Date: Mon, 26 Aug 2024 11:23:09 -0400 Subject: [PATCH] Add missing conversion class from vector of WheelTelemetryData to Python list Add missing conversion class from vector of WheelTelemetryData to Python list This adds a missing conversion from vector of WheelTelemetryData to a Python list. When trying to access the "wheels" attribute of the VehicleTelemetryData without this, this exception will occur: TypError: No to_python (by-value) converter found for C++ type: std::vector> This addition fixes this issue to make the usage in line with similar classes such as "VehiclePhysicsControl" and "WheelPhysicsControl" Checklist: - [x] Your branch is up-to-date with the dev branch and tested with latest changes. - [x] Extended the README/documentation, if necessary. - [x] Code compiles correctly. - [x] All tests passing with make check. --- PythonAPI/carla/source/libcarla/Control.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PythonAPI/carla/source/libcarla/Control.cpp b/PythonAPI/carla/source/libcarla/Control.cpp index f0e8f5e5da0..fa3f30afde5 100644 --- a/PythonAPI/carla/source/libcarla/Control.cpp +++ b/PythonAPI/carla/source/libcarla/Control.cpp @@ -585,6 +585,11 @@ void export_control() { .def(self_ns::str(self_ns::self)) ; + class_ >("vector_of_wheels_telemetry") + .def(vector_indexing_suite >()) + .def(self_ns::str(self_ns::self)) + ; + class_("WheelTelemetryData") .def(init( (arg("tire_friction")=0.0f,