State.cpp
Go to the documentation of this file.
00001 // SVN $HeadURL: https://alufr-ros-pkg.googlecode.com/svn/trunk/humanoid_stacks/humanoid_navigation/footstep_planner/src/State2.cpp $
00002 // SVN $Id: State2.cpp 2852 2012-06-26 14:07:35Z Garimort.Johannes $
00003 
00004 /*
00005  * A footstep planner for humanoid robots
00006  *
00007  * Copyright 2010-2011 Johannes Garimort, Armin Hornung, University of Freiburg
00008  * http://www.ros.org/wiki/footstep_planner
00009  *
00010  * D* Lite (Koenig et al. 2002) partly based on the implementation
00011  * by J. Neufeld (http://code.google.com/p/dstarlite/)
00012  *
00013  *
00014  * This program is free software: you can redistribute it and/or modify
00015  * it under the terms of the GNU General Public License as published by
00016  * the Free Software Foundation, version 3.
00017  *
00018  * This program is distributed in the hope that it will be useful,
00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  * GNU General Public License for more details.
00022  *
00023  * You should have received a copy of the GNU General Public License
00024  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00025  */
00026 
00027 #include <footstep_planner/State.h>
00028 
00029 
00030 namespace footstep_planner
00031 {
00032 State::State()
00033 : ivX(0.0), ivY(0.0), ivTheta(0.0), ivLeg(NOLEG)
00034 {}
00035 
00036 
00037 State::State(double x, double y, double theta, Leg leg)
00038 : ivX(x), ivY(y), ivTheta(theta), ivLeg(leg)
00039 {}
00040 
00041 
00042 State::~State()
00043 {}
00044 
00045 
00046 bool
00047 State::operator ==(const State& s2)
00048 const
00049 {
00050   return (fabs(ivX - s2.getX()) < FLOAT_CMP_THR &&
00051       fabs(ivY - s2.getY()) < FLOAT_CMP_THR &&
00052       fabs(angles::shortest_angular_distance(ivTheta, s2.getTheta()))
00053   < FLOAT_CMP_THR &&
00054   ivLeg == s2.getLeg());
00055 }
00056 
00057 
00058 bool
00059 State::operator !=(const State& s2)
00060 const
00061 {
00062   return not (*this == s2);
00063 }
00064 } // end of namespace
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


footstep_planner
Author(s): Johannes Garimort, Armin Hornung
autogenerated on Tue Oct 15 2013 10:06:52