32 #include <OGRE/OgreVector3.h>
33 #include <OGRE/OgreMatrix3.h>
34 #include <OGRE/OgreSceneNode.h>
35 #include <OGRE/OgreSceneManager.h>
62 goals_.resize(msg->robots.size());
64 for (
size_t i = 0; i < msg->robots.size(); i++){
68 if(msg->robots[i].destinations.size() == 0) {
73 const geometry_msgs::Pose &pose = msg->robots[i].destinations.back();
75 Ogre::Vector3 position = Ogre::Vector3 ( pose.position.x, pose.position.y, pose.position.z );
76 Ogre::Quaternion orientation = Ogre::Quaternion ( pose.orientation.x, pose.orientation.y, pose.orientation.z, pose.orientation.w );
81 Ogre::Quaternion rotation1 = Ogre::Quaternion ( Ogre::Degree( -90 ), Ogre::Vector3::UNIT_Y );
82 Ogre::Quaternion rotation2 = Ogre::Quaternion ( Ogre::Degree( -180 ), Ogre::Vector3::UNIT_X );
83 orientation = rotation2 * rotation1 * orientation;
85 arrow->setPosition( position );
86 arrow->setOrientation( orientation );
104 goal->setScale ( Ogre::Vector3 ( scale, scale, scale ));
112 goal->setColor ( color );;