00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef RVIZ_COMMON_H
00031 #define RVIZ_COMMON_H
00032
00033 #ifndef RVIZ_COMMON_H_NOWARN
00034 #warning "This header is deprecated! Conversions between ROS and Ogre are not needed anymore."
00035 #endif
00036
00037 #include <OGRE/OgreVector3.h>
00038 #include <OGRE/OgreQuaternion.h>
00039 #include <OGRE/OgreMatrix3.h>
00040
00041 #include <boost/function.hpp>
00042
00047 namespace rviz
00048 {
00049
00050 extern Ogre::Matrix3 g_ogre_to_robot_matrix;
00051 extern Ogre::Matrix3 g_robot_to_ogre_matrix;
00052
00053 extern Ogre::Quaternion g_ogre_to_robot_quat;
00054 extern Ogre::Quaternion g_robot_to_ogre_quat;
00055
00056 void initializeCommon();
00057 inline void robotToOgre( Ogre::Vector3& point ) {}
00058 inline void scaleRobotToOgre( Ogre::Vector3& scale ) {}
00059 inline void robotToOgre( Ogre::Quaternion& quat ) {}
00060 inline void robotToOgre( Ogre::Matrix3& mat ) {}
00061 inline void ogreToRobot( Ogre::Vector3& point ) {}
00062 inline void scaleOgreToRobot( Ogre::Vector3& scale ) {}
00063 inline void ogreToRobot( Ogre::Quaternion& quat ) {}
00064 inline void ogreToRobot( Ogre::Matrix3& mat ) {}
00065
00066 inline Ogre::Matrix3 ogreMatrixFromRobotEulers( float yaw, float pitch, float roll )
00067 {
00068 Ogre::Matrix3 mat;
00069 mat.FromEulerAnglesZYX( Ogre::Radian( yaw ), Ogre::Radian( pitch ), Ogre::Radian( roll ) );
00070 return mat;
00071 }
00072
00073 }
00074 #endif