@@ -57,6 +57,7 @@ PYBIND11_SMART_HOLDER_TYPE_CASTERS(Connect)
5757PYBIND11_SMART_HOLDER_TYPE_CASTERS(FixCollisionObjects)
5858PYBIND11_SMART_HOLDER_TYPE_CASTERS(GenerateGraspPose)
5959PYBIND11_SMART_HOLDER_TYPE_CASTERS(GeneratePlacePose)
60+ PYBIND11_SMART_HOLDER_TYPE_CASTERS(GenerateRandomPose)
6061PYBIND11_SMART_HOLDER_TYPE_CASTERS(GeneratePose)
6162PYBIND11_SMART_HOLDER_TYPE_CASTERS(Pick)
6263PYBIND11_SMART_HOLDER_TYPE_CASTERS(Place)
@@ -405,6 +406,26 @@ void export_stages(pybind11::module& m) {
405406 )" )
406407 .def (py::init<const std::string&>(), " name" _a);
407408
409+ py::enum_<GenerateRandomPose::PoseDimension>(m, " PoseDimension" ,
410+ R"( Define the dimensions of a pose that can be randomized.)" )
411+ .value (" X" , GenerateRandomPose::PoseDimension::X, " X dimension" )
412+ .value (" Y" , GenerateRandomPose::PoseDimension::Y, " Y dimension" )
413+ .value (" Z" , GenerateRandomPose::PoseDimension::Z, " Z dimension" )
414+ .value (" ROLL" , GenerateRandomPose::PoseDimension::ROLL, " Roll dimension" )
415+ .value (" PITCH" , GenerateRandomPose::PoseDimension::PITCH, " Pitch dimension" )
416+ .value (" YAW" , GenerateRandomPose::PoseDimension::YAW, " Yaw dimension" );
417+
418+ properties::class_<GenerateRandomPose, GeneratePose>(m, " GenerateRandomPose" , R"(
419+ Monitoring generator stage which can be used to generate random poses, based on solutions provided
420+ by the monitored stage and the specified pose dimension samplers.
421+ )" )
422+ .def (py::init<const std::string&>(), " name" _a)
423+ .def (" set_max_solutions" , &GenerateRandomPose::setMaxSolutions, " max_solutions" _a)
424+ .def (" sample_dimension" , [](GenerateRandomPose& self, const GenerateRandomPose::PoseDimension pose_dimension,
425+ const double width) {
426+ self.sampleDimension <std::uniform_real_distribution>(pose_dimension, width);
427+ }, " pose_dimension" _a, " width" _a);
428+
408429 properties::class_<Pick, SerialContainer>(m, " Pick" , R"(
409430 The Pick stage is a specialization of the PickPlaceBase class, which
410431 wraps the pipeline to pick or place an object with a given end effector.
0 commit comments