Skip to content

Commit

Permalink
update pymrpt
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Oct 4, 2024
1 parent 8abda5f commit e3366f9
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 14 deletions.
4 changes: 2 additions & 2 deletions python/src/mrpt/maps/CVoxelMapBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

void bind_mrpt_maps_CVoxelMapBase(std::function< pybind11::module &(std::string const &namespace_) > &M)
{
{ // mrpt::maps::CVoxelMapBase file:mrpt/maps/CVoxelMapBase.h line:42
{ // mrpt::maps::CVoxelMapBase file:mrpt/maps/CVoxelMapBase.h line:44
pybind11::class_<mrpt::maps::CVoxelMapBase<mrpt::maps::VoxelNodeOccupancy>, std::shared_ptr<mrpt::maps::CVoxelMapBase<mrpt::maps::VoxelNodeOccupancy>>, mrpt::maps::CMetricMap> cl(M("mrpt::maps"), "CVoxelMapBase_mrpt_maps_VoxelNodeOccupancy_t", "");
cl.def("assign", (class mrpt::maps::CVoxelMapBase<struct mrpt::maps::VoxelNodeOccupancy> & (mrpt::maps::CVoxelMapBase<mrpt::maps::VoxelNodeOccupancy>::*)(const class mrpt::maps::CVoxelMapBase<struct mrpt::maps::VoxelNodeOccupancy> &)) &mrpt::maps::CVoxelMapBase<mrpt::maps::VoxelNodeOccupancy>::operator=, "C++: mrpt::maps::CVoxelMapBase<mrpt::maps::VoxelNodeOccupancy>::operator=(const class mrpt::maps::CVoxelMapBase<struct mrpt::maps::VoxelNodeOccupancy> &) --> class mrpt::maps::CVoxelMapBase<struct mrpt::maps::VoxelNodeOccupancy> &", pybind11::return_value_policy::automatic, pybind11::arg("o"));
cl.def("asString", (std::string (mrpt::maps::CVoxelMapBase<mrpt::maps::VoxelNodeOccupancy>::*)() const) &mrpt::maps::CVoxelMapBase<mrpt::maps::VoxelNodeOccupancy>::asString, "C++: mrpt::maps::CVoxelMapBase<mrpt::maps::VoxelNodeOccupancy>::asString() const --> std::string");
Expand Down Expand Up @@ -70,7 +70,7 @@ void bind_mrpt_maps_CVoxelMapBase(std::function< pybind11::module &(std::string
cl.def("getAsSimplePointsMap", (class mrpt::maps::CSimplePointsMap * (mrpt::maps::CMetricMap::*)()) &mrpt::maps::CMetricMap::getAsSimplePointsMap, "C++: mrpt::maps::CMetricMap::getAsSimplePointsMap() --> class mrpt::maps::CSimplePointsMap *", pybind11::return_value_policy::automatic);
cl.def("assign", (class mrpt::maps::CMetricMap & (mrpt::maps::CMetricMap::*)(const class mrpt::maps::CMetricMap &)) &mrpt::maps::CMetricMap::operator=, "C++: mrpt::maps::CMetricMap::operator=(const class mrpt::maps::CMetricMap &) --> class mrpt::maps::CMetricMap &", pybind11::return_value_policy::automatic, pybind11::arg(""));
}
{ // mrpt::maps::CVoxelMapBase file:mrpt/maps/CVoxelMapBase.h line:42
{ // mrpt::maps::CVoxelMapBase file:mrpt/maps/CVoxelMapBase.h line:44
pybind11::class_<mrpt::maps::CVoxelMapBase<mrpt::maps::VoxelNodeOccRGB>, std::shared_ptr<mrpt::maps::CVoxelMapBase<mrpt::maps::VoxelNodeOccRGB>>, mrpt::maps::CMetricMap> cl(M("mrpt::maps"), "CVoxelMapBase_mrpt_maps_VoxelNodeOccRGB_t", "");
cl.def("assign", (class mrpt::maps::CVoxelMapBase<struct mrpt::maps::VoxelNodeOccRGB> & (mrpt::maps::CVoxelMapBase<mrpt::maps::VoxelNodeOccRGB>::*)(const class mrpt::maps::CVoxelMapBase<struct mrpt::maps::VoxelNodeOccRGB> &)) &mrpt::maps::CVoxelMapBase<mrpt::maps::VoxelNodeOccRGB>::operator=, "C++: mrpt::maps::CVoxelMapBase<mrpt::maps::VoxelNodeOccRGB>::operator=(const class mrpt::maps::CVoxelMapBase<struct mrpt::maps::VoxelNodeOccRGB> &) --> class mrpt::maps::CVoxelMapBase<struct mrpt::maps::VoxelNodeOccRGB> &", pybind11::return_value_policy::automatic, pybind11::arg("o"));
cl.def("asString", (std::string (mrpt::maps::CVoxelMapBase<mrpt::maps::VoxelNodeOccRGB>::*)() const) &mrpt::maps::CVoxelMapBase<mrpt::maps::VoxelNodeOccRGB>::asString, "C++: mrpt::maps::CVoxelMapBase<mrpt::maps::VoxelNodeOccRGB>::asString() const --> std::string");
Expand Down
7 changes: 4 additions & 3 deletions python/src/mrpt/nav/holonomic/ClearanceDiagram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ void bind_mrpt_nav_holonomic_ClearanceDiagram(std::function< pybind11::module &(
cl.def("decimated_k_to_real_k", (size_t (mrpt::nav::ClearanceDiagram::*)(size_t) const) &mrpt::nav::ClearanceDiagram::decimated_k_to_real_k, "C++: mrpt::nav::ClearanceDiagram::decimated_k_to_real_k(size_t) const --> size_t", pybind11::arg("k"));
cl.def("assign", (class mrpt::nav::ClearanceDiagram & (mrpt::nav::ClearanceDiagram::*)(const class mrpt::nav::ClearanceDiagram &)) &mrpt::nav::ClearanceDiagram::operator=, "C++: mrpt::nav::ClearanceDiagram::operator=(const class mrpt::nav::ClearanceDiagram &) --> class mrpt::nav::ClearanceDiagram &", pybind11::return_value_policy::automatic, pybind11::arg(""));
}
// mrpt::nav::PTG_collision_behavior_t file:mrpt/nav/tpspace/CParameterizedTrajectoryGenerator.h line:42
// mrpt::nav::PTG_collision_behavior_t file:mrpt/nav/tpspace/CParameterizedTrajectoryGenerator.h line:43
pybind11::enum_<mrpt::nav::PTG_collision_behavior_t>(M("mrpt::nav"), "PTG_collision_behavior_t", pybind11::arithmetic(), "Defines behaviors for where there is an obstacle *inside* the robot shape\nright at the beginning of a PTG trajectory.\n\n\n \n Used in CParameterizedTrajectoryGenerator::COLLISION_BEHAVIOR")
.value("COLL_BEH_BACK_AWAY", mrpt::nav::COLL_BEH_BACK_AWAY)
.value("COLL_BEH_STOP", mrpt::nav::COLL_BEH_STOP)
.export_values();

;

{ // mrpt::nav::CParameterizedTrajectoryGenerator file:mrpt/nav/tpspace/CParameterizedTrajectoryGenerator.h line:79
{ // mrpt::nav::CParameterizedTrajectoryGenerator file:mrpt/nav/tpspace/CParameterizedTrajectoryGenerator.h line:80
pybind11::class_<mrpt::nav::CParameterizedTrajectoryGenerator, std::shared_ptr<mrpt::nav::CParameterizedTrajectoryGenerator>, mrpt::serialization::CSerializable, mrpt::config::CLoadableOptions> cl(M("mrpt::nav"), "CParameterizedTrajectoryGenerator", "This is the base class for any user-defined PTG.\n There is a class factory interface in\nCParameterizedTrajectoryGenerator::CreatePTG.\n\n Papers:\n - J.L. Blanco, J. Gonzalez-Jimenez, J.A. Fernandez-Madrigal, \"Extending\nObstacle Avoidance Methods through Multiple Parameter-Space Transformations\",\nAutonomous Robots, vol. 24, no. 1, 2008.\nhttp://ingmec.ual.es/~jlblanco/papers/blanco2008eoa_DRAFT.pdf\n\n Changes history:\n - 30/JUN/2004: Creation (JLBC)\n - 16/SEP/2004: Totally redesigned.\n - 15/SEP/2005: Totally rewritten again, for integration into MRPT\nApplications Repository.\n - 19/JUL/2009: Simplified to use only STL data types, and created the class\nfactory interface.\n - MAY/2016: Refactored into CParameterizedTrajectoryGenerator,\nCPTG_DiffDrive_CollisionGridBased, PTG classes renamed.\n - 2016-2018: Many features added to support \"PTG continuation\", dynamic\npaths depending on vehicle speeds, etc.\n\n \n\n ");
cl.def("GetRuntimeClass", (const struct mrpt::rtti::TRuntimeClassId * (mrpt::nav::CParameterizedTrajectoryGenerator::*)() const) &mrpt::nav::CParameterizedTrajectoryGenerator::GetRuntimeClass, "C++: mrpt::nav::CParameterizedTrajectoryGenerator::GetRuntimeClass() const --> const struct mrpt::rtti::TRuntimeClassId *", pybind11::return_value_policy::automatic);
cl.def_static("GetRuntimeClassIdStatic", (const struct mrpt::rtti::TRuntimeClassId & (*)()) &mrpt::nav::CParameterizedTrajectoryGenerator::GetRuntimeClassIdStatic, "C++: mrpt::nav::CParameterizedTrajectoryGenerator::GetRuntimeClassIdStatic() --> const struct mrpt::rtti::TRuntimeClassId &", pybind11::return_value_policy::automatic);
Expand Down Expand Up @@ -148,14 +148,15 @@ void bind_mrpt_nav_holonomic_ClearanceDiagram(std::function< pybind11::module &(
cl.def("evalClearanceSingleObstacle", (void (mrpt::nav::CParameterizedTrajectoryGenerator::*)(const double, const double, const unsigned short, class std::map<double, double> &, bool) const) &mrpt::nav::CParameterizedTrajectoryGenerator::evalClearanceSingleObstacle, "Evals the robot clearance for each robot pose along path `k`, for the\n real distances in\n the key of the map<>, then keep in the map value the minimum of its\n current stored clearance,\n or the computed clearance. In case of collision, clearance is zero.\n \n\n true: normal use for obstacles; false: compute\n shortest distances to a target point (no collision)\n\nC++: mrpt::nav::CParameterizedTrajectoryGenerator::evalClearanceSingleObstacle(const double, const double, const unsigned short, class std::map<double, double> &, bool) const --> void", pybind11::arg("ox"), pybind11::arg("oy"), pybind11::arg("k"), pybind11::arg("inout_realdist2clearance"), pybind11::arg("treat_as_obstacle"));
cl.def("assign", (class mrpt::nav::CParameterizedTrajectoryGenerator & (mrpt::nav::CParameterizedTrajectoryGenerator::*)(const class mrpt::nav::CParameterizedTrajectoryGenerator &)) &mrpt::nav::CParameterizedTrajectoryGenerator::operator=, "C++: mrpt::nav::CParameterizedTrajectoryGenerator::operator=(const class mrpt::nav::CParameterizedTrajectoryGenerator &) --> class mrpt::nav::CParameterizedTrajectoryGenerator &", pybind11::return_value_policy::automatic, pybind11::arg(""));

{ // mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState file:mrpt/nav/tpspace/CParameterizedTrajectoryGenerator.h line:176
{ // mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState file:mrpt/nav/tpspace/CParameterizedTrajectoryGenerator.h line:177
auto & enclosing_class = cl;
pybind11::class_<mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState, std::shared_ptr<mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState>> cl(enclosing_class, "TNavDynamicState", "Dynamic state that may affect the PTG path parameterization. \n\n nav_reactive ");
cl.def( pybind11::init( [](){ return new mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState(); } ) );
cl.def( pybind11::init( [](mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState const &o){ return new mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState(o); } ) );
cl.def_readwrite("curVelLocal", &mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState::curVelLocal);
cl.def_readwrite("relTarget", &mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState::relTarget);
cl.def_readwrite("targetRelSpeed", &mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState::targetRelSpeed);
cl.def_readwrite("internalState", &mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState::internalState);
cl.def("__eq__", (bool (mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState::*)(const struct mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState &) const) &mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState::operator==, "C++: mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState::operator==(const struct mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState &) const --> bool", pybind11::arg("o"));
cl.def("__ne__", (bool (mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState::*)(const struct mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState &) const) &mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState::operator!=, "C++: mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState::operator!=(const struct mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState &) const --> bool", pybind11::arg("o"));
cl.def("writeToStream", (void (mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState::*)(class mrpt::serialization::CArchive &) const) &mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState::writeToStream, "C++: mrpt::nav::CParameterizedTrajectoryGenerator::TNavDynamicState::writeToStream(class mrpt::serialization::CArchive &) const --> void", pybind11::arg("out"));
Expand Down
4 changes: 2 additions & 2 deletions python/src/mrpt/nav/reactive/CLogFileRecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ void bind_mrpt_nav_reactive_CLogFileRecord(std::function< pybind11::module &(std
cl.def( pybind11::init( [](){ return new mrpt::nav::CLogFileRecord(); }, [](){ return new PyCallBack_mrpt_nav_CLogFileRecord(); } ) );
cl.def( pybind11::init( [](PyCallBack_mrpt_nav_CLogFileRecord const &o){ return new PyCallBack_mrpt_nav_CLogFileRecord(o); } ) );
cl.def( pybind11::init( [](mrpt::nav::CLogFileRecord const &o){ return new mrpt::nav::CLogFileRecord(o); } ) );
cl.def_readwrite("navDynState", &mrpt::nav::CLogFileRecord::navDynState);
cl.def_readwrite("nPTGs", &mrpt::nav::CLogFileRecord::nPTGs);
cl.def_readwrite("infoPerPTG", &mrpt::nav::CLogFileRecord::infoPerPTG);
cl.def_readwrite("nSelectedPTG", &mrpt::nav::CLogFileRecord::nSelectedPTG);
Expand All @@ -166,7 +165,6 @@ void bind_mrpt_nav_reactive_CLogFileRecord(std::function< pybind11::module &(std
cl.def_readwrite("ptg_last_k_NOP", &mrpt::nav::CLogFileRecord::ptg_last_k_NOP);
cl.def_readwrite("rel_cur_pose_wrt_last_vel_cmd_NOP", &mrpt::nav::CLogFileRecord::rel_cur_pose_wrt_last_vel_cmd_NOP);
cl.def_readwrite("rel_pose_PTG_origin_wrt_sense_NOP", &mrpt::nav::CLogFileRecord::rel_pose_PTG_origin_wrt_sense_NOP);
cl.def_readwrite("ptg_last_navDynState", &mrpt::nav::CLogFileRecord::ptg_last_navDynState);
cl.def_readwrite("visuals", &mrpt::nav::CLogFileRecord::visuals);
cl.def_static("GetRuntimeClassIdStatic", (const struct mrpt::rtti::TRuntimeClassId & (*)()) &mrpt::nav::CLogFileRecord::GetRuntimeClassIdStatic, "C++: mrpt::nav::CLogFileRecord::GetRuntimeClassIdStatic() --> const struct mrpt::rtti::TRuntimeClassId &", pybind11::return_value_policy::automatic);
cl.def("GetRuntimeClass", (const struct mrpt::rtti::TRuntimeClassId * (mrpt::nav::CLogFileRecord::*)() const) &mrpt::nav::CLogFileRecord::GetRuntimeClass, "C++: mrpt::nav::CLogFileRecord::GetRuntimeClass() const --> const struct mrpt::rtti::TRuntimeClassId *", pybind11::return_value_policy::automatic);
Expand All @@ -192,6 +190,8 @@ void bind_mrpt_nav_reactive_CLogFileRecord(std::function< pybind11::module &(std
cl.def_readwrite("HLFR", &mrpt::nav::CLogFileRecord::TInfoPerPTG::HLFR);
cl.def_readwrite("ptg", &mrpt::nav::CLogFileRecord::TInfoPerPTG::ptg);
cl.def_readwrite("clearance", &mrpt::nav::CLogFileRecord::TInfoPerPTG::clearance);
cl.def_readwrite("dynState", &mrpt::nav::CLogFileRecord::TInfoPerPTG::dynState);
cl.def_readwrite("lastDynState", &mrpt::nav::CLogFileRecord::TInfoPerPTG::lastDynState);
cl.def("assign", (struct mrpt::nav::CLogFileRecord::TInfoPerPTG & (mrpt::nav::CLogFileRecord::TInfoPerPTG::*)(const struct mrpt::nav::CLogFileRecord::TInfoPerPTG &)) &mrpt::nav::CLogFileRecord::TInfoPerPTG::operator=, "C++: mrpt::nav::CLogFileRecord::TInfoPerPTG::operator=(const struct mrpt::nav::CLogFileRecord::TInfoPerPTG &) --> struct mrpt::nav::CLogFileRecord::TInfoPerPTG &", pybind11::return_value_policy::automatic, pybind11::arg(""));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ struct PyCallBack_mrpt_nav_CAbstractHolonomicReactiveMethod : public mrpt::nav::

void bind_mrpt_nav_tpspace_CParameterizedTrajectoryGenerator(std::function< pybind11::module &(std::string const &namespace_) > &M)
{
{ // mrpt::nav::CPTG_RobotShape_Polygonal file:mrpt/nav/tpspace/CParameterizedTrajectoryGenerator.h line:501
{ // mrpt::nav::CPTG_RobotShape_Polygonal file:mrpt/nav/tpspace/CParameterizedTrajectoryGenerator.h line:505
pybind11::class_<mrpt::nav::CPTG_RobotShape_Polygonal, std::shared_ptr<mrpt::nav::CPTG_RobotShape_Polygonal>, mrpt::nav::CParameterizedTrajectoryGenerator> cl(M("mrpt::nav"), "CPTG_RobotShape_Polygonal", "Base class for all PTGs using a 2D polygonal robot shape model.\n \n\n\n ");
cl.def("setRobotShape", (void (mrpt::nav::CPTG_RobotShape_Polygonal::*)(const class mrpt::math::CPolygon &)) &mrpt::nav::CPTG_RobotShape_Polygonal::setRobotShape, "@{ *\n\n Robot shape must be set before initialization, either from ctor params\n or via this method. \n\nC++: mrpt::nav::CPTG_RobotShape_Polygonal::setRobotShape(const class mrpt::math::CPolygon &) --> void", pybind11::arg("robotShape"));
cl.def("getRobotShape", (const class mrpt::math::CPolygon & (mrpt::nav::CPTG_RobotShape_Polygonal::*)() const) &mrpt::nav::CPTG_RobotShape_Polygonal::getRobotShape, "C++: mrpt::nav::CPTG_RobotShape_Polygonal::getRobotShape() const --> const class mrpt::math::CPolygon &", pybind11::return_value_policy::automatic);
Expand All @@ -285,7 +285,7 @@ void bind_mrpt_nav_tpspace_CParameterizedTrajectoryGenerator(std::function< pybi
cl.def_static("static_add_robotShape_to_setOfLines", (void (*)(class mrpt::opengl::CSetOfLines &, const class mrpt::poses::CPose2D &, const class mrpt::math::CPolygon &)) &mrpt::nav::CPTG_RobotShape_Polygonal::static_add_robotShape_to_setOfLines, "C++: mrpt::nav::CPTG_RobotShape_Polygonal::static_add_robotShape_to_setOfLines(class mrpt::opengl::CSetOfLines &, const class mrpt::poses::CPose2D &, const class mrpt::math::CPolygon &) --> void", pybind11::arg("gl_shape"), pybind11::arg("origin"), pybind11::arg("robotShape"));
cl.def("assign", (class mrpt::nav::CPTG_RobotShape_Polygonal & (mrpt::nav::CPTG_RobotShape_Polygonal::*)(const class mrpt::nav::CPTG_RobotShape_Polygonal &)) &mrpt::nav::CPTG_RobotShape_Polygonal::operator=, "C++: mrpt::nav::CPTG_RobotShape_Polygonal::operator=(const class mrpt::nav::CPTG_RobotShape_Polygonal &) --> class mrpt::nav::CPTG_RobotShape_Polygonal &", pybind11::return_value_policy::automatic, pybind11::arg(""));
}
{ // mrpt::nav::CPTG_RobotShape_Circular file:mrpt/nav/tpspace/CParameterizedTrajectoryGenerator.h line:545
{ // mrpt::nav::CPTG_RobotShape_Circular file:mrpt/nav/tpspace/CParameterizedTrajectoryGenerator.h line:549
pybind11::class_<mrpt::nav::CPTG_RobotShape_Circular, std::shared_ptr<mrpt::nav::CPTG_RobotShape_Circular>, mrpt::nav::CParameterizedTrajectoryGenerator> cl(M("mrpt::nav"), "CPTG_RobotShape_Circular", "Base class for all PTGs using a 2D circular robot shape model.\n \n\n\n ");
cl.def("setRobotShapeRadius", (void (mrpt::nav::CPTG_RobotShape_Circular::*)(const double)) &mrpt::nav::CPTG_RobotShape_Circular::setRobotShapeRadius, "@{ *\n\n Robot shape must be set before initialization, either from ctor params\n or via this method. \n\nC++: mrpt::nav::CPTG_RobotShape_Circular::setRobotShapeRadius(const double) --> void", pybind11::arg("robot_radius"));
cl.def("getRobotShapeRadius", (double (mrpt::nav::CPTG_RobotShape_Circular::*)() const) &mrpt::nav::CPTG_RobotShape_Circular::getRobotShapeRadius, "C++: mrpt::nav::CPTG_RobotShape_Circular::getRobotShapeRadius() const --> double");
Expand Down
Loading

0 comments on commit e3366f9

Please sign in to comment.