9 #ifndef CHOMP_PLANNING_GROUP_HPP
10 #define CHOMP_PLANNING_GROUP_HPP
12 #include "API/Device/joint.hpp"
13 #include "API/Device/robot.hpp"
15 #include "planner/Greedy/CollisionPoint.hpp"
57 template <
typename Derived>
71 void draw(std::vector<Eigen::Affine3d>& segment)
const;
72 void draw(std::vector<std::vector<double> >& segment)
const;
75 template <
typename Derived>
76 void ChompPlanningGroup::ChompPlanningGroup::getRandomState(Eigen::MatrixBase<Derived>& state_vec)
const
78 for (
int i=0; i<num_joints_; i++)
80 double min = chomp_joints_[i].joint_limit_min_;
81 double max = chomp_joints_[i].joint_limit_max_;
83 if (!chomp_joints_[i].has_joint_limits_)
89 state_vec(i) = ((((double)rand())/RAND_MAX) * (max-min)) + min;
const Joint * move3d_joint_
Pointer to the Move3D joint in the tree.
Definition: chompPlanningGroup.hpp:22
std::vector< CollisionPoint > collision_points_
Ordered list of collision checking points (from root to tip)
Definition: chompPlanningGroup.hpp:52
bool has_joint_limits_
Are there joint limits?
Definition: chompPlanningGroup.hpp:29
Contains information about a planning group.
Definition: chompPlanningGroup.hpp:38
std::vector< std::string > link_names_
Links used in planning.
Definition: chompPlanningGroup.hpp:50
Contains information about a single joint for CHOMP planning.
Definition: chompPlanningGroup.hpp:20
double joint_update_limit_
Maximum amount the joint value can be updated in an iteration.
Definition: chompPlanningGroup.hpp:32
Definition: CollisionPoint.hpp:48
int chomp_joint_index_
Joint index for CHOMP.
Definition: chompPlanningGroup.hpp:25
This class holds a the robot represented by a kinematic chain.
Definition: robot.hpp:42
bool wrap_around_
Does this joint wrap-around?
Definition: chompPlanningGroup.hpp:28
double joint_limit_min_
Minimum joint angle value.
Definition: chompPlanningGroup.hpp:30
bool addCollisionPoint(CollisionPoint &collision_point)
Adds the collision point to this planning group, if any of the joints in this group can control the c...
Definition: chompPlanningGroup.cpp:62
void getRandomState(Eigen::MatrixBase< Derived > &state_vec) const
Gets a random state vector within the joint limits.
std::string link_name_
Name of the corresponding link (from planning.yaml)
Definition: chompPlanningGroup.hpp:27
This class holds a Joint and is associated with a Body (Link) It's the basic element of a kinematic c...
Definition: joint.hpp:27
std::string name_
Move3D robot which is planned.
Definition: chompPlanningGroup.hpp:47
double joint_limit_max_
Maximum joint angle value.
Definition: chompPlanningGroup.hpp:31
std::string joint_name_
Name of the joint.
Definition: chompPlanningGroup.hpp:26
int num_joints_
Number of joints used in planning.
Definition: chompPlanningGroup.hpp:48
std::vector< ChompJoint > chomp_joints_
Joints used in planning.
Definition: chompPlanningGroup.hpp:49
std::vector< std::string > collision_link_names_
Links used in collision checking.
Definition: chompPlanningGroup.hpp:51
void draw() const
Displays all bounding spheres.
Definition: chompPlanningGroup.cpp:87
int move3d_dof_index_
Index in the configuration.
Definition: chompPlanningGroup.hpp:24
int move3d_joint_index_
Index for use in a Move3D joint array.
Definition: chompPlanningGroup.hpp:23