Skip to content

Commit

Permalink
update python wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Apr 24, 2024
1 parent e3cee09 commit 02982f2
Show file tree
Hide file tree
Showing 148 changed files with 914 additions and 3,576 deletions.
4 changes: 2 additions & 2 deletions python/all_mrpt_hwdrivers1.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#include "src/mrpt/hwdrivers/C2DRangeFinderAbstract.cpp"
#include "src/mrpt/hwdrivers/CBoardENoses.cpp"
#include "src/mrpt/hwdrivers/CCameraSensor.cpp"
#include "src/mrpt/hwdrivers/CCANBusReader.cpp"
#include "src/mrpt/hwdrivers/CDUO3DCamera.cpp"
#include "src/mrpt/hwdrivers/CEnoseModular.cpp"
#include "src/mrpt/hwdrivers/CGenericSensor.cpp"
#include "src/mrpt/hwdrivers/CGillAnemometer.cpp"
#include "src/mrpt/hwdrivers/CGPSInterface.cpp"
#include "src/mrpt/hwdrivers/CImageGrabber_dc1394.cpp"
#include "src/mrpt/hwdrivers/CImageGrabber_FlyCapture2.cpp"
#include "src/mrpt/hwdrivers/CImpinjRFID.cpp"
#include "src/mrpt/hwdrivers/CIMUXSens_MT4.cpp"
#include "src/mrpt/hwdrivers/CKinect.cpp"
6 changes: 2 additions & 4 deletions python/all_mrpt_hwdrivers2.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#include "src/mrpt/hwdrivers/CKinect.cpp"
#include "src/mrpt/hwdrivers/CMyntEyeCamera.cpp"
#include "src/mrpt/hwdrivers/CNationalInstrumentsDAQ.cpp"
#include "src/mrpt/hwdrivers/CNTRIPClient.cpp"
#include "src/mrpt/hwdrivers/COpenNI2_RGBD360.cpp"
#include "src/mrpt/hwdrivers/CPtuDPerception.cpp"
#include "src/mrpt/hwdrivers/CRaePID.cpp"
#include "src/mrpt/hwdrivers/CSICKTim561Eth_2050101.cpp"
#include "src/mrpt/hwdrivers/CPhidgetInterfaceKitProximitySensors.cpp"
#include "src/mrpt/hwdrivers/CSickLaserUSB.cpp"
#include "src/mrpt/hwdrivers/CSkeletonTracker.cpp"
#include "src/mrpt/hwdrivers/CStereoGrabber_Bumblebee_libdc1394.cpp"
#include "src/mrpt/hwdrivers/CVelodyneScanner.cpp"
Expand Down
2 changes: 0 additions & 2 deletions python/all_mrpt_serialization.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include "src/mrpt/serialization/CArchive_1.cpp"
#include "src/mrpt/serialization/CArchive_2.cpp"
#include "src/mrpt/serialization/CArchive.cpp"
#include "src/mrpt/serialization/CMessage.cpp"
#include "src/mrpt/serialization/CSerializable.cpp"
1 change: 0 additions & 1 deletion python/all_mrpt_vision.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "src/mrpt/vision/chessboard_camera_calib.cpp"
#include "src/mrpt/vision/CStereoRectifyMap.cpp"
#include "src/mrpt/vision/TKeyPoint.cpp"
#include "src/mrpt/vision/types_1.cpp"
#include "src/mrpt/vision/types.cpp"
8 changes: 0 additions & 8 deletions python/all_wrapped_mrpt_headers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,8 @@

// hwdrivers
#include <mrpt/hwdrivers/C2DRangeFinderAbstract.h>
#include <mrpt/hwdrivers/CBoardENoses.h>
#include <mrpt/hwdrivers/CBoardSonars.h>
#include <mrpt/hwdrivers/CCANBusReader.h>
#include <mrpt/hwdrivers/CCameraSensor.h>
#include <mrpt/hwdrivers/CDUO3DCamera.h>
#include <mrpt/hwdrivers/CEnoseModular.h>
#include <mrpt/hwdrivers/CFFMPEG_InputStream.h>
#include <mrpt/hwdrivers/CGPSInterface.h>
Expand All @@ -105,21 +102,16 @@
#include <mrpt/hwdrivers/COpenNI2Sensor.h>
#include <mrpt/hwdrivers/COpenNI2_RGBD360.h>
#include <mrpt/hwdrivers/CPhidgetInterfaceKitProximitySensors.h>
#include <mrpt/hwdrivers/CPtuBase.h>
#include <mrpt/hwdrivers/CPtuDPerception.h>
#include <mrpt/hwdrivers/CRaePID.h>
#include <mrpt/hwdrivers/CRoboPeakLidar.h>
#include <mrpt/hwdrivers/CRoboticHeadInterface.h>
#include <mrpt/hwdrivers/CSICKTim561Eth_2050101.h>
#include <mrpt/hwdrivers/CServoeNeck.h>
#include <mrpt/hwdrivers/CSickLaserSerial.h>
#include <mrpt/hwdrivers/CSickLaserUSB.h>
#include <mrpt/hwdrivers/CSkeletonTracker.h>
#include <mrpt/hwdrivers/CStereoGrabber_Bumblebee_libdc1394.h>
#include <mrpt/hwdrivers/CStereoGrabber_SVS.h>
#include <mrpt/hwdrivers/CSwissRanger3DCamera.h>
#include <mrpt/hwdrivers/CTaoboticsIMU.h>
#include <mrpt/hwdrivers/CTuMicos.h>
#include <mrpt/hwdrivers/CVelodyneScanner.h>
#include <mrpt/hwdrivers/CWirelessPower.h>

Expand Down
13 changes: 0 additions & 13 deletions python/patch-010.diff

This file was deleted.

1 change: 1 addition & 0 deletions python/src/mrpt/containers/yaml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ void bind_mrpt_containers_yaml(std::function< pybind11::module &(std::string con
cl.def("isSequence", (bool (mrpt::containers::yaml::*)() const) &mrpt::containers::yaml::isSequence, "C++: mrpt::containers::yaml::isSequence() const --> bool");
cl.def("isMap", (bool (mrpt::containers::yaml::*)() const) &mrpt::containers::yaml::isMap, "C++: mrpt::containers::yaml::isMap() const --> bool");
cl.def("asMap", (class std::map<struct mrpt::containers::yaml::node_t, struct mrpt::containers::yaml::node_t> & (mrpt::containers::yaml::*)()) &mrpt::containers::yaml::asMap, "Use: `for (auto &kv: n.asMap()) {...}`\n \n\n std::exception If called on a non-map node. \n\nC++: mrpt::containers::yaml::asMap() --> class std::map<struct mrpt::containers::yaml::node_t, struct mrpt::containers::yaml::node_t> &", pybind11::return_value_policy::automatic);
cl.def("asMapRange", (const class std::map<struct mrpt::containers::yaml::node_t, struct mrpt::containers::yaml::node_t> (mrpt::containers::yaml::*)() const) &mrpt::containers::yaml::asMapRange, "Returns a copy of asMap(), suitable for range-based loops\n\nC++: mrpt::containers::yaml::asMapRange() const --> const class std::map<struct mrpt::containers::yaml::node_t, struct mrpt::containers::yaml::node_t>");
cl.def("size", (size_t (mrpt::containers::yaml::*)() const) &mrpt::containers::yaml::size, "Returns 1 for null or scalar nodes, the number of children for\n sequence or map nodes. \n\nC++: mrpt::containers::yaml::size() const --> size_t");
cl.def("node", (struct mrpt::containers::yaml::node_t & (mrpt::containers::yaml::*)()) &mrpt::containers::yaml::node, "For a master yaml document, returns the root node; otherwise, the\n referenced node. \n\nC++: mrpt::containers::yaml::node() --> struct mrpt::containers::yaml::node_t &", pybind11::return_value_policy::automatic);
cl.def("keyNode", (struct mrpt::containers::yaml::node_t & (mrpt::containers::yaml::*)(const std::string &)) &mrpt::containers::yaml::keyNode, "C++: mrpt::containers::yaml::keyNode(const std::string &) --> struct mrpt::containers::yaml::node_t &", pybind11::return_value_policy::automatic, pybind11::arg("keyName"));
Expand Down
23 changes: 23 additions & 0 deletions python/src/mrpt/hwdrivers/CCANBusReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@
#include <mrpt/config/CConfigFileBase.h>
#include <mrpt/core/Clock.h>
#include <mrpt/hwdrivers/CCANBusReader.h>
#include <mrpt/hwdrivers/CFFMPEG_InputStream.h>
#include <mrpt/hwdrivers/CGenericSensor.h>
#include <mrpt/img/CCanvas.h>
#include <mrpt/img/CImage.h>
#include <mrpt/img/TCamera.h>
#include <mrpt/img/TColor.h>
#include <mrpt/img/TPixelCoord.h>
#include <mrpt/io/CStream.h>
#include <mrpt/math/CMatrixDynamic.h>
#include <mrpt/math/CMatrixFixed.h>
#include <mrpt/obs/CObservationCANBusJ1939.h>
#include <mrpt/poses/CPose3D.h>
Expand Down Expand Up @@ -194,4 +202,19 @@ void bind_mrpt_hwdrivers_CCANBusReader(std::function< pybind11::module &(std::st
cl.def("initialize", (void (mrpt::hwdrivers::CCANBusReader::*)()) &mrpt::hwdrivers::CCANBusReader::initialize, "Set-up communication with the laser.\n Called automatically by rawlog-grabber.\n If used manually, call after \"loadConfig\" and before \"doProcess\".\n\n In this class this method does nothing, since the communications are\n setup at the first try from \"doProcess\" or \"doProcessSimple\".\n\nC++: mrpt::hwdrivers::CCANBusReader::initialize() --> void");
cl.def("doProcess", (void (mrpt::hwdrivers::CCANBusReader::*)()) &mrpt::hwdrivers::CCANBusReader::doProcess, "C++: mrpt::hwdrivers::CCANBusReader::doProcess() --> void");
}
{ // mrpt::hwdrivers::CFFMPEG_InputStream file:mrpt/hwdrivers/CFFMPEG_InputStream.h line:42
pybind11::class_<mrpt::hwdrivers::CFFMPEG_InputStream, std::shared_ptr<mrpt::hwdrivers::CFFMPEG_InputStream>> cl(M("mrpt::hwdrivers"), "CFFMPEG_InputStream", "A generic class which process a video file or other kind of input stream\n (http, rtsp) and allows the extraction of images frame by frame.\n Video sources can be open with \"openURL\", which can manage both video files\n and \"rtsp://\" sources (IP cameras).\n\n Frames are retrieved by calling CFFMPEG_InputStream::retrieveFrame\n\n For an example of usage, see the file \"samples/grab_camera_ffmpeg\"\n\n \n This class is an easy to use C++ wrapper for ffmpeg libraries\n (libavcodec). In Unix systems these libraries must be installed in the system\n as explained in \n* href=\"http://www.mrpt.org/Building_and_Installing_Instructions\" > MRPT's\n wiki. In Win32, a precompiled version for Visual Studio must be also\n downloaded as explained in \n* href=\"http://www.mrpt.org/Building_and_Installing_Instructions\" >the\n wiki.\n \n\n\n ");
cl.def( pybind11::init( [](){ return new mrpt::hwdrivers::CFFMPEG_InputStream(); } ) );
cl.def( pybind11::init( [](mrpt::hwdrivers::CFFMPEG_InputStream const &o){ return new mrpt::hwdrivers::CFFMPEG_InputStream(o); } ) );
cl.def("openURL", [](mrpt::hwdrivers::CFFMPEG_InputStream &o, const std::string & a0) -> bool { return o.openURL(a0); }, "", pybind11::arg("url"));
cl.def("openURL", [](mrpt::hwdrivers::CFFMPEG_InputStream &o, const std::string & a0, bool const & a1) -> bool { return o.openURL(a0, a1); }, "", pybind11::arg("url"), pybind11::arg("grab_as_grayscale"));
cl.def("openURL", [](mrpt::hwdrivers::CFFMPEG_InputStream &o, const std::string & a0, bool const & a1, bool const & a2) -> bool { return o.openURL(a0, a1, a2); }, "", pybind11::arg("url"), pybind11::arg("grab_as_grayscale"), pybind11::arg("verbose"));
cl.def("openURL", (bool (mrpt::hwdrivers::CFFMPEG_InputStream::*)(const std::string &, bool, bool, const class std::map<std::string, std::string > &)) &mrpt::hwdrivers::CFFMPEG_InputStream::openURL, "Open a video file or a video stream (rtsp://)\n This can be used to open local video files (eg. \"myVideo.avi\",\n \"c:\\a.mpeg\") and also IP cameras (e.g `rtsp://a.b.c.d/live.sdp`).\n User/password can be used like `rtsp://USER:PASSWORD/PATH`.\n\n [ffmpeg options](https://www.ffmpeg.org/ffmpeg-protocols.html)\n can be added via the argument.\n\n If is set to true, more information about the video will be\n dumped to cout.\n\n \n close, retrieveFrame\n \n\n false on any error (and error info dumped to cerr), true on\n success.\n\nC++: mrpt::hwdrivers::CFFMPEG_InputStream::openURL(const std::string &, bool, bool, const class std::map<std::string, std::string > &) --> bool", pybind11::arg("url"), pybind11::arg("grab_as_grayscale"), pybind11::arg("verbose"), pybind11::arg("options"));
cl.def("isOpen", (bool (mrpt::hwdrivers::CFFMPEG_InputStream::*)() const) &mrpt::hwdrivers::CFFMPEG_InputStream::isOpen, "Return whether the video source was open correctly \n\nC++: mrpt::hwdrivers::CFFMPEG_InputStream::isOpen() const --> bool");
cl.def("close", (void (mrpt::hwdrivers::CFFMPEG_InputStream::*)()) &mrpt::hwdrivers::CFFMPEG_InputStream::close, "Close the video stream (this is called automatically at destruction).\n \n\n openURL\n\nC++: mrpt::hwdrivers::CFFMPEG_InputStream::close() --> void");
cl.def("getVideoFPS", (double (mrpt::hwdrivers::CFFMPEG_InputStream::*)() const) &mrpt::hwdrivers::CFFMPEG_InputStream::getVideoFPS, "Get the frame-per-second (FPS) of the video source, or \"-1\" if the video\n is not open. \n\nC++: mrpt::hwdrivers::CFFMPEG_InputStream::getVideoFPS() const --> double");
cl.def("retrieveFrame", (bool (mrpt::hwdrivers::CFFMPEG_InputStream::*)(class mrpt::img::CImage &)) &mrpt::hwdrivers::CFFMPEG_InputStream::retrieveFrame, "Get the next frame from the video stream.\n Note that for remote streams (IP cameras) this method may block until\n enough information is read to generate a new frame.\n Images are returned as 8-bit depth grayscale if \"grab_as_grayscale\" is\n true.\n \n\n false on any error, true on success.\n \n\n openURL, close, isOpen\n\nC++: mrpt::hwdrivers::CFFMPEG_InputStream::retrieveFrame(class mrpt::img::CImage &) --> bool", pybind11::arg("out_img"));
cl.def("retrieveFrame", (bool (mrpt::hwdrivers::CFFMPEG_InputStream::*)(class mrpt::img::CImage &, long &)) &mrpt::hwdrivers::CFFMPEG_InputStream::retrieveFrame, "Refer to docs for ffmpeg AVFrame::pts\n\nC++: mrpt::hwdrivers::CFFMPEG_InputStream::retrieveFrame(class mrpt::img::CImage &, long &) --> bool", pybind11::arg("out_img"), pybind11::arg("outPTS"));
cl.def("assign", (class mrpt::hwdrivers::CFFMPEG_InputStream & (mrpt::hwdrivers::CFFMPEG_InputStream::*)(const class mrpt::hwdrivers::CFFMPEG_InputStream &)) &mrpt::hwdrivers::CFFMPEG_InputStream::operator=, "C++: mrpt::hwdrivers::CFFMPEG_InputStream::operator=(const class mrpt::hwdrivers::CFFMPEG_InputStream &) --> class mrpt::hwdrivers::CFFMPEG_InputStream &", pybind11::return_value_policy::automatic, pybind11::arg(""));
}
}
Loading

0 comments on commit 02982f2

Please sign in to comment.