Class ReachStudy

Nested Relationships

Nested Types

Class Documentation

class ReachStudy

Class for performing reachability analysis.

Public Functions

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)

Loads the results of a reach study from file.

void run()

Runs the first iteration of the reach study process.

void optimize()

Runs successive iterations of the reach study process.

void save(const std::string &filename) const

Saves the results of the reach study to a file.

ReachResultSummary getResults() const
const ReachDatabase &getDatabase() const
std::tuple<double, double> getAverageNeighborsCount() const

Finds the average number of neighbors that are “recursively” reachable from each target pose and the average joint distance of the set of neighbors from each target pose.

Finding the “recursive” reachability from a given target pose means:

  1. Identifying the neighbors of the target pose within a given radius (defined by a reach study parameter)

  2. For each neighbor, attempt to solve IK for that neighbor using the IK solution of the original pose as the IK seed

  3. If the neighbor is reachable, repeat this process using the neighbor as the source pose. Continue until a source pose has no more reachable neighbors

The result of this function can be a proxy for the motion planning ability of a robot. The larger the average number of neighbors and greater the average joint distance to those neighbors, the further the robot will be able to travel away from a given starting location while maintaining a consistent IK configuration.

Returns:

tuple, where the first element is the average number of neighbors that is “recursively” reachable from each target pose, and the second element is the average joint distance between the set of neighbors and the target pose

Protected Functions

void checkSeedState()

Checks the seed state parameter for validity and sets it to a default value if it does not exist.

Throws:

Throws – an exception if all of the IK solver joint names cannot be found in the seed state parameter

Protected Attributes

Parameters params_
ReachDatabase db_
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
struct Parameters

Public Members

int max_steps
float step_improvement_threshold
float radius
std::size_t max_threads = std::thread::hardware_concurrency()
std::map<std::string, double> seed_state