<commit_before>#include <Eigen/Core>
#include <vector>
#include <list>
#include "robotics/World.h"
#include "RRT.h"
#include <iostream>
#include "robotics/Robot.h"
#include <limits>

#ifndef _RST_PATH_PLANNER_
#define _RST_PATH_PLANNER_

namespace planning {

template <class R = RRT>
class PathPlanner {
public:
	PathPlanner(); // You need to call one of the other constructors before the object is usable.
	PathPlanner(robotics::World& world, double stepsize = 0.1 );
	~PathPlanner();
	double stepsize;
	robotics::World* world;
	bool planPath(int robotId, const std::vector<int> &dofs, const Eigen::VectorXd &start, const Eigen::VectorXd &goal, std::list<Eigen::VectorXd> &path, bool bidirectional = true, bool connect = true, unsigned int maxNodes = 0) const;
	bool planPath(int robotId, const std::vector<int> &dofs, const std::vector<Eigen::VectorXd> &start, const std::vector<Eigen::VectorXd> &goal, std::list<Eigen::VectorXd> &path, bool bidirectional = true, bool connect = true, unsigned int maxNodes = 0) const;
	static inline double randomInRange(double min, double max);
private:
	bool planSingleTreeRrt(int robot, const std::vector<int> &dofs, const std::vector<Eigen::VectorXd> &start, const Eigen::VectorXd &goal, std::list<Eigen::VectorXd> &path, bool connect, unsigned int maxNodes) const;
	bool planBidirectionalRrt(int robot, const std::vector<int> &dofs, const std::vector<Eigen::VectorXd> &start, const std::vector<Eigen::VectorXd> &goal, std::list<Eigen::VectorXd> &path, bool connect, unsigned int maxNodes) const;
};


template <class R>
PathPlanner<R>::PathPlanner() : world(NULL) {}

template <class R>
PathPlanner<R>::PathPlanner(robotics::World& world, double stepsize) :
	world(&world),
	stepsize(stepsize)
{
}

template <class R>
PathPlanner<R>::~PathPlanner() {
}<commit_msg>There seems to be a problem with the bidirectional path planner. As a workaround default to single tree.<commit_after>#include <Eigen/Core>
#include <vector>
#include <list>
#include "robotics/World.h"
#include "RRT.h"
#include <iostream>
#include "robotics/Robot.h"
#include <limits>

#ifndef _RST_PATH_PLANNER_
#define _RST_PATH_PLANNER_

namespace planning {

template <class R = RRT>
class PathPlanner {
public:
	PathPlanner(); // You need to call one of the other constructors before the object is usable.
	PathPlanner(robotics::World& world, double stepsize = 0.1 );
	~PathPlanner();
	double stepsize;
	robotics::World* world;
	bool planPath(int robotId, const std::vector<int> &dofs, const Eigen::VectorXd &start, const Eigen::VectorXd &goal, std::list<Eigen::VectorXd> &path, bool bidirectional = false, bool connect = true, unsigned int maxNodes = 0) const;
	bool planPath(int robotId, const std::vector<int> &dofs, const std::vector<Eigen::VectorXd> &start, const std::vector<Eigen::VectorXd> &goal, std::list<Eigen::VectorXd> &path, bool bidirectional = false, bool connect = true, unsigned int maxNodes = 0) const;
	static inline double randomInRange(double min, double max);
private:
	bool planSingleTreeRrt(int robot, const std::vector<int> &dofs, const std::vector<Eigen::VectorXd> &start, const Eigen::VectorXd &goal, std::list<Eigen::VectorXd> &path, bool connect, unsigned int maxNodes) const;
	bool planBidirectionalRrt(int robot, const std::vector<int> &dofs, const std::vector<Eigen::VectorXd> &start, const std::vector<Eigen::VectorXd> &goal, std::list<Eigen::VectorXd> &path, bool connect, unsigned int maxNodes) const;
};


template <class R>
PathPlanner<R>::PathPlanner() : world(NULL) {}

template <class R>
PathPlanner<R>::PathPlanner(robotics::World& world, double stepsize) :
	world(&world),
	stepsize(stepsize)
{
}

template <class R>
PathPlanner<R>::~PathPlanner() {
}
{'fraction_non_alphanumeric': 0.13711201079622132, 'fraction_numerical': 0.0021592442645074223, 'mean_word_length': 7.12719298245614, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 53, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2103475', 'n_tokens_mistral': 1281, 'n_tokens_neox': 1251, 'n_words': 357}