| 37 | namespace rviz_imu_plugin { |
| 38 | |
| 39 | MagVisual::MagVisual(Ogre::SceneManager* scene_manager, |
| 40 | Ogre::SceneNode* parent_node) |
| 41 | : heading_vector_(nullptr), |
| 42 | arrow_length_(2.0), |
| 43 | arrow_radius_(0.10), |
| 44 | head_length_(0.20), |
| 45 | head_radius_(0.10), |
| 46 | scale_(0.05), |
| 47 | alpha_(1.0), |
| 48 | color_(1.0, 1.0, 0.0), |
| 49 | is_2d_(true) |
| 50 | { |
| 51 | scene_manager_ = scene_manager; |
| 52 | |
| 53 | // Ogre::SceneNode s form a tree, with each node storing the |
| 54 | // transform (position and orientation) of itself relative to its |
| 55 | // parent. Ogre does the math of combining those transforms when it |
| 56 | // is time to render. |
| 57 | // |
| 58 | // Here we create a node to store the pose of the Imu's header frame |
| 59 | // relative to the RViz fixed frame. |
| 60 | frame_node_ = parent_node->createChildSceneNode(); |
| 61 | } |
| 62 | |
| 63 | MagVisual::~MagVisual() |
| 64 | { |
nothing calls this directly
no outgoing calls
no test coverage detected