Exemplo n.º 1
0
void MapCloudDisplay::onInitialize()
{
	MFDClass::onInitialize();

	transformer_class_loader_ = new pluginlib::ClassLoader<rviz::PointCloudTransformer>( "rviz", "rviz::PointCloudTransformer" );
	loadTransformers();

	updateStyle();
	updateBillboardSize();
	updateAlpha();

	spinner_.start();
}
Exemplo n.º 2
0
PointCloudBase::PointCloudBase( const std::string& name, VisualizationManager* manager )
: Display( name, manager )
, spinner_(1, &cbqueue_)
, new_cloud_(false)
, new_xyz_transformer_(false)
, new_color_transformer_(false)
, needs_retransform_(false)
, style_( Billboards )
, billboard_size_( 0.01 )
, point_decay_time_(0.0f)
, selectable_(false)
, coll_handle_(0)
, messages_received_(0)
, total_point_count_(0)
{
  cloud_ = new ogre_tools::PointCloud();
  scene_node_ = scene_manager_->getRootSceneNode()->createChildSceneNode();
  scene_node_->attachObject(cloud_);
  coll_handler_ = PointCloudSelectionHandlerPtr(new PointCloudSelectionHandler(this));

  setStyle( style_ );
  setBillboardSize( billboard_size_ );
  setAlpha(1.0f);

  setSelectable(true);

  PluginManager* pman = vis_manager_->getPluginManager();
  const L_Plugin& plugins = pman->getPlugins();
  L_Plugin::const_iterator it = plugins.begin();
  L_Plugin::const_iterator end = plugins.end();
  for (; it != end; ++it)
  {
    const PluginPtr& plugin = *it;
    PluginConns pc;
    pc.loaded = plugin->getLoadedSignal().connect(boost::bind(&PointCloudBase::onPluginLoaded, this, _1));
    pc.unloading = plugin->getUnloadingSignal().connect(boost::bind(&PointCloudBase::onPluginUnloading, this, _1));
    loadTransformers(plugin.get());
    plugin_conns_[plugin.get()] = pc;
  }

  threaded_nh_.setCallbackQueue(&cbqueue_);
  spinner_.start();
}
Exemplo n.º 3
0
void PointCloudBase::onPluginLoaded(const PluginStatus& status)
{
  loadTransformers(status.plugin);
}