Temporary fix for windows link errors.
This commit is contained in:
parent
68d75a9874
commit
28a044de99
|
@ -210,7 +210,7 @@ static void ConvertImage(T &self, EColorConverter cc) {
|
|||
throw std::invalid_argument("invalid color converter!");
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
// method to convert optical flow images to rgb
|
||||
static boost::python::numpy::ndarray ColorCodedFlow (
|
||||
carla::sensor::data::OpticalFlowImage& image) {
|
||||
|
@ -317,6 +317,7 @@ static boost::python::numpy::ndarray ColorCodedFlow (
|
|||
bn::dtype type = bn::dtype::get_builtin<uint8_t>();
|
||||
return bn::from_data(&result[0], type, shape, stride, bp::object()).copy();
|
||||
}
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
static std::string SaveImageToDisk(T &self, std::string path, EColorConverter cc) {
|
||||
|
@ -396,7 +397,9 @@ void export_sensor_data() {
|
|||
.add_property("height", &csd::OpticalFlowImage::GetHeight)
|
||||
.add_property("fov", &csd::OpticalFlowImage::GetFOVAngle)
|
||||
.add_property("raw_data", &GetRawDataAsBuffer<csd::OpticalFlowImage>)
|
||||
#ifndef _WIN32
|
||||
.def("get_color_coded_flow", &ColorCodedFlow)
|
||||
#endif
|
||||
.def("__len__", &csd::OpticalFlowImage::size)
|
||||
.def("__iter__", iterator<csd::OpticalFlowImage>())
|
||||
.def("__getitem__", +[](const csd::OpticalFlowImage &self, size_t pos) -> csd::OpticalFlowPixel {
|
||||
|
|
|
@ -209,8 +209,9 @@ static auto MakeCallback(boost::python::object callback) {
|
|||
}
|
||||
};
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <boost/python/numpy.hpp>
|
||||
#endif
|
||||
|
||||
#include "Geom.cpp"
|
||||
#include "Actor.cpp"
|
||||
|
@ -238,7 +239,9 @@ BOOST_PYTHON_MODULE(libcarla) {
|
|||
#if PY_MAJOR_VERSION < 3 || PY_MINOR_VERSION < 7
|
||||
PyEval_InitThreads();
|
||||
#endif
|
||||
#ifndef _WIN32
|
||||
boost::python::numpy::initialize();
|
||||
#endif
|
||||
scope().attr("__path__") = "libcarla";
|
||||
export_geom();
|
||||
export_control();
|
||||
|
|
Loading…
Reference in New Issue