3 #include <boost/unordered_set.hpp> 4 #include <boost/functional/hash.hpp> 13 : cell_size(cell_size)
14 , angle_bin_size(angle_bin_size)
20 : cell_size(cell_size)
21 , angle_bin_size(angle_bin_size)
23 std::vector<double> state;
29 :
std::vector<int>(other)
37 unsigned long int size = std::min(this->size(), other.size());
39 for (
unsigned long int i = 0; i < size; i++)
41 if ((*
this)[i] == other[i])
52 unsigned long int size = std::min(this->size(), other.size());
54 for (
unsigned long int i = 0; i < size; i++)
56 if ((*
this)[i] == other[i])
59 if ((*
this)[i] < other[i])
62 if ((*
this)[i] > other[i])
72 this->reserve(state.size());
100 state.reserve(this->size());
129 tf::Pose left_foot_pose = left_foot.getPose();
130 tf::Pose right_foot_pose = right_foot.getPose();
131 tf::Pose swing_foot_pose = swing_foot.getPose();
134 tf::Pose left_foot_before;
135 tf::Pose left_foot_after;
138 if (swing_foot.getLeg() == LEFT)
141 tf::Transform world_to_right_foot = tf::Transform(right_foot_pose.getRotation(), right_foot_pose.getOrigin());
142 world_to_right_foot = world_to_right_foot.inverse();
145 left_foot_before = world_to_right_foot * left_foot_pose;
148 left_foot_after = world_to_right_foot * swing_foot_pose;
154 tf::Transform world_to_left_foot = tf::Transform(left_foot_pose.getRotation(), left_foot_pose.getOrigin());
155 world_to_left_foot = world_to_left_foot.inverse();
158 tf::Pose right_foot_before;
159 right_foot_before = world_to_left_foot * right_foot_pose;
162 tf::Pose right_foot_after;
163 right_foot_after = world_to_left_foot * swing_foot_pose;
175 left_foot_before.getBasis().getRPY(r, p, y);
176 state.push_back(left_foot_before.getOrigin().getX());
177 state.push_back(left_foot_before.getOrigin().getY());
184 left_foot_after.getBasis().getRPY(r, p, y);
185 state.push_back(left_foot_after.getOrigin().getX());
186 state.push_back(left_foot_after.getOrigin().getY());
202 mirror.setBasis(orig.getBasis());
203 tf::Matrix3x3& basis = mirror.getBasis();
204 basis[0][1] = -basis[0][1];
205 basis[1][0] = -basis[1][0];
206 basis[2][1] = -basis[2][1];
208 mirror.setOrigin(orig.getOrigin());
209 tf::Vector3& origin = mirror.getOrigin();
210 origin[1] = -origin[1];
249 std::size_t seed = 0;
250 for (
unsigned int i = 0; i <
STATE_DIM; i++)
252 boost::hash_combine(seed, key[i]);
std::size_t hash_value(const vigir_footstep_planning::StepCostKey &key)