void NavViewPanel::createRadiusObject() { static int count = 0; std::stringstream ss; ss << "NavViewRadius" << count++; radius_object_ = scene_manager_->createManualObject( ss.str() ); Ogre::SceneNode* node = root_node_->createChildSceneNode(); node->attachObject( radius_object_ ); radius_object_->begin( "BaseWhiteNoLighting", Ogre::RenderOperation::OT_LINE_STRIP ); { Ogre::ColourValue color( 0.2, 1.0, 0.4 ); for( float f = 0; f < Ogre::Math::TWO_PI; f += 0.5f ) { radius_object_->position( ROBOT_RADIUS * cos(f), ROBOT_RADIUS * sin(f), 0.0f ); radius_object_->colour(color); } radius_object_->position( ROBOT_RADIUS , 0.0f, 0.0f ); radius_object_->colour(color); radius_object_->position( 0.0f, 0.0f, 0.0f ); radius_object_->colour(color); } radius_object_->end(); updateRadiusPosition(); }
void NavViewPanel::onUpdate( wxTimerEvent& event ) { if ( !map_object_ ) { static int count = 0; --count; if ( count < 0 ) { loadMap(); count = 100; } } if ( new_cloud_ ) { processParticleCloud(); } if ( new_gui_path_ ) { processGuiPath(); } if ( new_local_path_ ) { processLocalPath(); } if ( new_robot_footprint_ ) { processRobotFootprint(); } if ( new_inflated_obstacles_ ) { processInflatedObstacles(); } if ( new_raw_obstacles_ ) { processRawObstacles(); } if ( new_gui_laser_ ) { processGuiLaser(); } updateRadiusPosition(); }
void NavViewPanel::onUpdate( wxTimerEvent& event ) { updateRadiusPosition(); ros::spinOnce(); }