.. _program_listing_file_include_reach_reach_study.h: Program Listing for File reach_study.h ====================================== |exhale_lsh| :ref:`Return to documentation for file ` (``include/reach/reach_study.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp /* * Copyright 2019 Southwest Research Institute * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef reach_REACH_STUDY_H #define reach_REACH_STUDY_H #include #include #include #include #include #include #include #include #include namespace reach { class ReachStudy { public: struct Parameters { int max_steps; float step_improvement_threshold; float radius; std::size_t max_threads = std::thread::hardware_concurrency(); std::map seed_state; }; ReachStudy(IKSolver::ConstPtr ik_solver, Evaluator::ConstPtr evaluator, TargetPoseGenerator::ConstPtr pose_generator, Display::ConstPtr display, Logger::Ptr logger, Parameters params); ReachStudy(const ReachStudy&); void load(const std::string& filename); void run(); void optimize(); void save(const std::string& filename) const; ReachResultSummary getResults() const; const ReachDatabase& getDatabase() const; std::tuple getAverageNeighborsCount() const; protected: void checkSeedState(); Parameters params_; ReachDatabase db_; // Plugins IKSolver::ConstPtr ik_solver_; Evaluator::ConstPtr evaluator_; Display::ConstPtr display_; Logger::Ptr logger_; mutable std::mutex mutex_; const VectorIsometry3d target_poses_; SearchTreePtr search_tree_ = nullptr; }; void runReachStudy(const YAML::Node& config, const std::string& config_name = "reach_study", const boost::filesystem::path& results_dir = "/tmp", const bool wait_after_completion = true); } // namespace reach #endif // reach_REACH_STUDY_H