CeilingMap.cpp
Go to the documentation of this file.
00001 #include "CeilingMap.h"
00002 
00007 CeilingMap::CeilingMap(void)
00008 {
00009 }
00010 
00015 CeilingMap::~CeilingMap(void)
00016 {
00017 }
00018 
00023 void CeilingMap::ReadNavigationMap(std::string map_name)
00024 {
00025         LoadImage(map_name);
00026 }
00027 
00034 void CeilingMap::SetLocation(unsigned long x, unsigned long y, double theta)
00035 {
00036         m_CurOdometry.m_x               = x;
00037         m_CurOdometry.m_y               = y;
00038         m_CurOdometry.m_theta   = theta;
00039 }
00040 
00046 void CeilingMap::SetLocation(CeilingOdometry_st value)
00047 {
00048         SetLocation(value.m_x, value.m_y, value.m_theta);
00049 }
00050 
00055 CeilingOdometry_st      CeilingMap::GetLocation()
00056 {
00057         return m_CurOdometry;
00058 }
00059 
00067 void CeilingMap::IncrementOdometry(long x, long y, double theta)
00068 {
00069         m_CurOdometry.m_x += x;
00070         m_CurOdometry.m_y += y;
00071         m_CurOdometry.m_theta += theta;
00072 
00073         /* ±180度に収まるように調整する */
00074         while (m_CurOdometry.m_theta > M_PI)
00075                 m_CurOdometry.m_theta = -M_PI*2 + m_CurOdometry.m_theta;
00076         while (m_CurOdometry.m_theta < -M_PI)
00077                 m_CurOdometry.m_theta =  M_PI*2 + m_CurOdometry.m_theta;
00078 }
00079 
00085 void CeilingMap::IncrementOdometry(SignedOdometry_st value)
00086 {
00087         IncrementOdometry(value.m_x, value.m_y, value.m_theta);
00088 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


RS003
Author(s):
autogenerated on Thu Jun 27 2013 14:58:49