1 #include <OGRE/OgreSceneNode.h>
2 #include <OGRE/OgreSceneManager.h>
8 #include <rviz/properties/property_manager.h>
24 , messages_received_( 0 )
25 , color_( .8, .2, .8 )
56 vis_manager_->getFrameManager()
57 ->registerFilterForTransformStatusCheck(
tf_filter_,
this );
64 for(
size_t i = 0; i <
visuals_.size(); i++ )
75 for(
size_t i = 0; i <
visuals_.size(); i++ )
82 setStatus( rviz::status_levels::Warn,
"Topic",
"No messages received" );
157 for(
size_t i = 0; i <
visuals_.size(); i++ )
190 (new_visuals.size() >
visuals_.size()) ?
191 visuals_.size() : new_visuals.size();
192 for(
size_t i = 0; i < copy_len; i++ )
196 new_visuals[ new_index ] =
visuals_[ old_index ];
201 for(
size_t i = 0; i <
visuals_.size(); i++ ) {
227 setStatus( rviz::status_levels::Ok,
"Topic",
"OK" );
231 setStatus( rviz::status_levels::Error,
"Topic",
232 std::string(
"Error subscribing: " ) + e.what() );
267 std::stringstream ss;
269 setStatus( rviz::status_levels::Ok,
"Topic", ss.str() );
274 Ogre::Quaternion orientation;
275 Ogre::Vector3 position;
276 if( !vis_manager_->getFrameManager()->getTransform(
msg->header.frame_id,
278 position, orientation ))
280 ROS_DEBUG(
"Error transforming from frame '%s' to frame '%s'",
319 property_manager_->createProperty<rviz::ROSTopicStringProperty>(
"Topic",
325 setPropertyHelpText(
topic_property_,
"jsk_hark_msgs::HarkPower topic to subscribe to." );
327 topic_prop->setMessageType( ros::message_traits::datatype<jsk_hark_msgs::HarkPower>() );
336 setPropertyHelpText(
color_property_,
"Color to draw the acceleration arrows." );
345 setPropertyHelpText(
alpha_property_,
"0 is fully transparent, 1.0 is fully opaque." );